X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=b295f451653fff51139f91f89f21293f0d71de46;hb=76805933f794915a72b7f0a21b12af6654759f4f;hp=37d8dc624817d7bdf4c962eb81de06ca1a25b92e;hpb=dec33c63afafabf83c3039e916725cac6faef9b3;p=fms.git diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index 37d8dc6..b295f45 100644 --- a/src/http/pages/homepage.cpp +++ b/src/http/pages/homepage.cpp @@ -30,11 +30,41 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m content+="FMS version "; content+=FMS_VERSION; content+="
"; - content+="Check for new versions at the FMS Freesite
"; + + bool showgenericupdate=true; + SQLite3DB::Statement st=m_db->Prepare("SELECT Major, Minor, Release, PageKey FROM tblFMSVersion ORDER BY Major DESC, Minor DESC, Release DESC;"); + st.Step(); + if(st.RowReturned()) + { + std::string currentmajor=VERSION_MAJOR; + std::string currentminor=VERSION_MINOR; + std::string currentrelease=VERSION_RELEASE; + std::string major=""; + std::string minor=""; + std::string release=""; + std::string freesite=""; + st.ResultText(0,major); + st.ResultText(1,minor); + st.ResultText(2,release); + st.ResultText(3,freesite); + + if(currentmajorFMS "+major+"."+minor+"."+release+"
"; + showgenericupdate=false; + } + + } + + if(showgenericupdate) + { + content+="Check for new versions at the FMS Freesite
"; + } + content+="Use these pages to administer your FMS installation."; content+="

"; - SQLite3DB::Statement st=m_db->Prepare("SELECT COUNT(*) FROM tblMessageInserts WHERE Inserted='false';"); + st=m_db->Prepare("SELECT COUNT(*) FROM tblMessageInserts WHERE Inserted='false';"); st.Step(); if(st.RowReturned()) {