X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=15cf76e37a24f4d46cdd09f0bc7ead4c5ac66ecd;hp=ec4ea3298faf550cd9f0fd06eca2d82a57365803;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hpb=4e96d123460d6363cf7274e36bd9357768eb86ad diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index ec4ea32..15cf76e 100644 --- a/src/http/pages/homepage.cpp +++ b/src/http/pages/homepage.cpp @@ -11,13 +11,15 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::map &queryvars) { + Option option(m_db); + std::string messagecountstr=""; std::string filecountstr=""; std::string fcphost="127.0.0.1"; std::string fproxyport="8888"; - Option::Instance()->Get("FCPHost",fcphost); - Option::Instance()->Get("FProxyPort",fproxyport); + option.Get("FCPHost",fcphost); + option.Get("FProxyPort",fproxyport); if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown" && ValidateFormPassword(queryvars)) { @@ -87,7 +89,12 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m { st.ResultText(0,messagecountstr); } - content+="Messages waiting to be inserted:"+messagecountstr+"
"; + content+="Messages waiting to be inserted:"+messagecountstr; + if (messagecountstr!="0") //show link to message page + { + content+=" (show messages)"; + } + content+="
"; st=m_db->Prepare("SELECT COUNT(*) FROM tblFileInserts WHERE Key IS NULL;"); st.Step(); if(st.RowReturned()) @@ -95,7 +102,6 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m st.ResultText(0,filecountstr); } content+="Files waiting to be inserted:"+filecountstr+"
"; - content+="

"; content+="

"; content+=CreateFormPassword();