".mysql_errno()); @mysql_select_db(_mysql_db_) OR fatalStop("unable to select database
".mysql_errno()); @mysql_query("SET NAMES "._mysql_encoding_) OR fatalStop("unable to negotiate encoding
".mysql_errno()); @mysql_query("SET time_zone = '"._mysql_timezone_."'") OR fatalStop("unable set timezone
".mysql_errno()); if (isLoggedIn()) { # if (isManager() AND !isset($_SESSION['userType'])) {$level = "manager";} # else {$level = "user";} #current page # array_push($MENU[$level],"logout"); if (isset($_GET['m']) AND array_key_exists(strtolower($_GET['m']), getCPModules())) { #check privileges here? $M = strtolower($_GET['m']); $_request['module'] = $M; if (isset($_GET['a']) AND in_array(strtolower($_GET['a']), array('view','edit','add','delete'))) { $A = strtolower($_GET['a']); $_request['action'] = $A; $F = "page/".$M."_".$A.".page.php"; } else { $F = "page/".$M.".page.php"; } } else { $M = "master"; $_request['module'] = $M; $F = "page/".$M.".page.php"; } # array_pop($MENU[$level]); #include current page if (file_exists($F)) {include($F);} else {fatalStop("Unable to include ".$F);} #include master template if ($file = "tmpl/header.tmpl.php" AND file_exists($file)) {include($file);} else {fatalStop("Unable to include ".$file);} } else { #include login page if ($file = "page/login.page.php" AND file_exists($file)) {include($file);} else {fatalStop("Unable to include ".$file);} } #include master template $file = "tmpl/master.tmpl.php"; if (file_exists($file)) {include($file);} else {fatalStop("include ".$file);} #close MySQL connection @mysql_close() or fatalStop("unable to close database connection
".mysql_error()); #print_r($_SESSION); ?>