report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT; if ($DB->connect_errno) exit('Can not connect to MySQL Server'); $DB->set_charset("utf8mb4"); $DB->query("SET collation_connection = 'utf8mb4_unicode_ci'"); # user Object $Doomguy = new Doomguy($DB); # menu Object $Gorenest = new GoreNest($DB,$Doomguy); $_requestMode = "dashboard"; if(isset($_GET['p']) && !empty($_GET['p'])) { $_requestMode = trim($_GET['p']); $_requestMode = Summoner::validate($_requestMode,'nospace') ? $_requestMode : "dashboard"; $_validPages = $Gorenest->allowedPageRequests(); $_validPages["dashboard"] = "dashboard"; if(!isset($_validPages[$_requestMode])) $_requestMode = "dashboard"; $ViewScript = Summoner::themefile($_requestMode.'/'.$_requestMode.'.php', UI_THEME); $View = Summoner::themefile($_requestMode.'/'.$_requestMode.'.html', UI_THEME); } # now include the script # this sets information into $Data and can overwrite $View if(!empty($ViewScript)) { require_once $ViewScript; } if(!empty($TemplateData['refresh'])) { header("Location: ".$TemplateData['refresh']); } # header information header('Content-type: text/html; charset=UTF-8'); ## now inlcude the main view require_once Summoner::themefile('main.php', UI_THEME); $DB->close();