X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=c89d92c0a85d431b45f96def4c52751f1e61963c;hp=cbc57e44b50eef5e09f0049ea324836226f4678d;hb=f60495a029c54358f82956482fe203fe2b7b5b23;hpb=f208e33c29132aacaec448e74341edea1b925a2a diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp index cbc57e4..c89d92c 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,22 @@ 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+="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); }