setUrlVarNames(array("playerId", "seasonId")); } function makePath() { return "/admin"; } function initZone($inPath) { global $sGlobals; global $gui; //do things here that you want to happen on every request, because zone_default is //part of every request, therefore initzone is part of every request. //for example, assign the user's name into the gui. } function initPages($inPath) { global $sGlobals; //do things here that you want to happen for every page in zone_default RequireCondition(isset($sGlobals->user_id)); if (isset($sGlobals->company)) { $this->guiAssign("UserCompany_id", $sGlobals->company["company_id"]); } //RequireCondition sends to login page when fails. //define login page in config.php //automatically uses the global variable $gui. $this->guiAssign("forms",false); } function pageDefault($inPath) { global $sGlobals; global $gui; //this is for gets. It displays the page $gui->Generate("admin/main.tpl", "blank.tpl", "mainmenu.tpl", "Supernerd Admin"); // $gui->display("default.tpl"); } function postDefault($inPath) { global $sGlobals; //this is for posts, it handles when forms get submitted. } function pageKeepOpen($inPath) { //you can write some javascript in your //templates that requests this page every so often //to keep your sessions alive. } }