HTTPServer/__setupadmin.cpp
2022-06-29 11:38:44 -07:00

44 lines
1.9 KiB
C++

#include "__setupadmin.h"
#include "__mainmenu.h"
namespace http {
__setupadmin::__setupadmin(HTTPParameters &p) { page(p); }
int __setupadmin::page(HTTPParameters &p) {
button1Click *click = new button1Click();
coreutils::ZString button1_Click(p.actionList.addAction(click));
p.data << "<form name=\"setupadmin\" method=\"POST\">"
" <p>Please enter credential information"
" for the security officer, then press Set Admin Profile button below:"
" <div style=\"border: 1pt solid white; background-color: #000; padding: 3px; margin-bottom: 5px;\">"
" <div>User Name:</div>"
" <input type=\"text\" name=\"username\" size=\"30\">"
" </div>"
" <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">"
" <div>Password:</div>"
" <input type=\"password\" name=\"password\" size=\"30\">"
" </div>"
" <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">"
" <div>Verify Password:</div>"
" <input type=\"password\" name=\"verify\" size=\"30\">"
" </div>"
" <br><br>Session Id: " << p.httpSession.getSessionId() << ""
" <br>The configuration has not yet been established for this web site.</p>"
" <input type=\"button\" onmousedown=\"process('" << button1_Click << "', 'setupadmin', 'admin'); return true;\" name=\"button1\" value=\"Set Admin Profile\">"
" </form>";
p.httpRequest.response.addHeader(coreutils::IMFHeader("Content-Type", "text/html"));
return 1;
}
bool __setupadmin::button1Click::action(HTTPParameters &p) {
__mainmenu mainmenu(p);
return true;
}
}