X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=15cf76e37a24f4d46cdd09f0bc7ead4c5ac66ecd;hp=9264ca112c943d72da721a6de8ad9e47cfa14486;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hpb=b7f3b3e6ae9dc527f02b5c06e2eeae0e9cac3ad8 diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index 9264ca1..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,12 +68,16 @@ 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
"; + } } if(showgenericupdate) { - content+="Check for new versions at the FMS Freesite
"; + content+="Check for new versions at the FMS Freesite
"; } content+="Use these pages to administer your FMS installation."; @@ -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();