X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=15cf76e37a24f4d46cdd09f0bc7ead4c5ac66ecd;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hp=3ebe2f1f36c68689566e33836b60a14e4058d5a8;hpb=dabd19d7f764b8275c9c8370c7b89675b6a78243;p=fms.git diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index 3ebe2f1..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)) { @@ -66,6 +68,10 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m content+="You can see the release info here
"; showgenericupdate=false; } + else + { + content+="Release info
"; + } } @@ -83,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()) @@ -91,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();