JETServer
/home/bradarant/barant/HTTPServer/__setupadmin.h
1 #ifndef ____setupadmin_h__
2 #define ____setupadmin_h__
3 
4 namespace http {
5 
6  class __setupadmin : public HTTPPage {
7 
8  int processCommand(std::string request, core::Session *session, HTTPSession *httpSession, HTTPRequest &httpRequest, std::stringstream &data) override {
9 
10  data << "<form name=\"setupadmin\" action=\"setupadmin\" method=\"POST\">" << std::endl;
11  data << " <div class=\"window\"><p>Please enter credential information" << std::endl;
12  data << " for the security officer, then press Set Admin Profile button below:" << std::endl;
13  data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
14  data << " <div>User Name:</div>" << std::endl;
15  data << " <input type=\"text\" name=\"username\" size=\"30\">" << std::endl;
16  data << " </div>" << std::endl;
17  data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
18  data << " <div>Password:</div>" << std::endl;
19  data << " <input type=\"password\" name=\"password\" size=\"30\">" << std::endl;
20  data << " </div>" << std::endl;
21  data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
22  data << " <div>Verify Password:</div>" << std::endl;
23  data << " <input type=\"password\" name=\"verify\" size=\"30\">" << std::endl;
24  data << " </div>" << std::endl;
25  data << " <br><br>Session Id: " << httpSession->getSessionId() << "" << std::endl;
26  data << " <br>The configuration has not yet been established for this web site.</p>" << std::endl;
27  data << " <input type=\"button\" onmousedown=\"process('/mainmenu','setupadmin', 'main'); return true;\" name=\"button1\" value=\"Set Admin Profile\">" << std::endl;
28  data << " </div></form>" << std::endl;
29 
30  httpRequest.response.addHeader("Content-Type", "text/html");
31 
32  return true;
33  }
34  };
35 }
36 
37 #endif
Definition: HTTPSession.h:9
Definition: __configure.h:4
Definition: HTTPPage.h:11
Definition: HTTPRequest.h:11
Definition: __setupadmin.h:6