X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=2f41fac00f3d1af342c7c0db3b0c50de3c50a879;hb=4855de56590e2f27d39036922339992c96bce9d1;hp=f305f30ebfd8c9a417dfece2fdb6a764bbd567c5;hpb=ee580d19b7920904587e18d72a3465d52eab6204;p=fms.git
diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp
index f305f30..2f41fac 100644
--- a/src/http/pages/homepage.cpp
+++ b/src/http/pages/homepage.cpp
@@ -1,6 +1,8 @@
#include "../../../include/http/pages/homepage.h"
#include "../../../include/stringfunctions.h"
#include "../../../include/global.h"
+#include "../../../include/fmsapp.h"
+#include "../../../include/option.h"
#ifdef XMEM
#include Home
";
@@ -19,15 +30,64 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m
content+="FMS version ";
content+=FMS_VERSION;
content+="
";
+
+ bool showgenericupdate=true;
+ SQLite3DB::Statement st=m_db->Prepare("SELECT Major, Minor, Release, PageKey FROM tblFMSVersion ORDER BY Major DESC, Minor DESC, Release DESC LIMIT 1;");
+ 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(currentmajor
";
+ content+="You can see the release info here
";
+ showgenericupdate=false;
+ }
+
+ }
+
+ if(showgenericupdate)
+ {
+ content+="Check for new versions at the FMS Freesite
";
+ }
+
content+="Use these pages to administer your FMS installation.";
content+="
"; content+="
"; content+=""; - return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content); + + return StringFunctions::Replace(m_template,"[CONTENT]",content); } const bool HomePage::WillHandleURI(const std::string &uri)