#include "../../../include/http/pages/homepage.h"\r
#include "../../../include/stringfunctions.h"\r
#include "../../../include/global.h"\r
+#include "../../../include/fmsapp.h"\r
+#include "../../../include/option.h"\r
\r
#ifdef XMEM\r
#include <xmem.h>\r
\r
std::string messagecountstr="";\r
std::string filecountstr="";\r
+ std::string fcphost="127.0.0.1";\r
+ std::string fproxyport="8888";\r
+\r
+ Option::Instance()->Get("FCPHost",fcphost);\r
+ Option::Instance()->Get("FProxyPort",fproxyport);\r
\r
if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown")\r
{\r
- wantshutdown=true;\r
+ m_log->trace("HomePage::GeneratePage requested shutdown");\r
+ ((FMSApp *)&FMSApp::instance())->Terminate();\r
}\r
\r
std::string content="<h2>Home</h2>";\r
content+="<b>FMS version ";\r
content+=FMS_VERSION;\r
content+="</b><br>";\r
+ content+="Check for new versions at the <a href=\"http://"+fcphost+":"+fproxyport+"/USK@0npnMrqZNKRCRoGojZV93UNHCMN-6UU3rRSAmP6jNLE,~BG-edFtdCC1cSH4O3BWdeIYa8Sw5DfyrSV-TKdO5ec,AQACAAE/fms/58/\">FMS Freesite</a><br>";\r
content+="Use these pages to administer your FMS installation.";\r
content+="</p>";\r
\r
content+="</form>";\r
content+="</p>";\r
\r
- return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content);\r
+ return StringFunctions::Replace(m_template,"[CONTENT]",content);\r
}\r
\r
const bool HomePage::WillHandleURI(const std::string &uri)\r