Class ExtWebApp extends Object implements(IQueryHandler); var WebAdmin webadmin; var string ExtWebURL; var int EditPageIndex; var ExtWebAdmin_UI ExtAdminUI; var ServerExtMut MyMutator; function cleanup() { webadmin = None; MyMutator = None; if (ExtAdminUI!=None) { ExtAdminUI.Cleanup(); ExtAdminUI = None; } } function init(WebAdmin webapp) { webadmin = webapp; } function registerMenuItems(WebAdminMenu menu) { menu.addMenu(ExtWebURL, "ExtServer Mod", self, "Modify settings of Extended Server Mod.", -44); } function bool handleQuery(WebAdminQuery q) { switch (q.request.URI) { case ExtWebURL: handleExtMod(q); return true; } return false; } final function IncludeFile(WebAdminQuery q, string file) { local string S; if (webadmin.HTMLSubDirectory!="") { S = webadmin.Path $ "/" $ webadmin.HTMLSubDirectory $ "/" $ file; if (q.response.FileExists(S)) { q.response.IncludeUHTM(S); return; } } q.response.IncludeUHTM(webadmin.Path $ "/" $ file); } final function SendHeader(WebAdminQuery q, string Title) { local IQueryHandler handler; q.response.Subst("page.title", Title); q.response.Subst("page.description", ""); foreach webadmin.handlers(handler) { handler.decoratePage(q); } q.response.Subst("messages", webadmin.renderMessages(q)); if (q.session.getString("privilege.log") != "") { q.response.Subst("privilege.log", webadmin.renderPrivilegeLog(q)); } IncludeFile(q,"header.inc"); q.response.SendText("
Links | "); q.response.SendText(" |
---|