X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=f305f30ebfd8c9a417dfece2fdb6a764bbd567c5;hb=63376b2a82c3f6cdf2df56b1f134bd7df0aaab3a;hp=cbc57e44b50eef5e09f0049ea324836226f4678d;hpb=f208e33c29132aacaec448e74341edea1b925a2a;p=fms.git diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index cbc57e4..f305f30 100644 --- a/src/http/pages/homepage.cpp +++ b/src/http/pages/homepage.cpp @@ -1,5 +1,6 @@ #include "../../../include/http/pages/homepage.h" #include "../../../include/stringfunctions.h" +#include "../../../include/global.h" #ifdef XMEM #include @@ -7,10 +8,25 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::map &queryvars) { + + if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown") + { + wantshutdown=true; + } + std::string content="

Home

"; content+="

"; + content+="FMS version "; + content+=FMS_VERSION; + content+="
"; content+="Use these pages to administer your FMS installation."; content+="

"; + content+="

"; + content+="

"; + content+=""; + content+=""; + content+="
"; + content+="

"; return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content); }