error_reporting(-1); ini_set('display_errors', '1'); } else { error_reporting(0); ini_set('display_errors', '0'); } // Stop loading stuff below, because its media if (strpos((string) $_SERVER['REQUEST_URI'], "media/")) { $file = $APP_DIR . "/public" . $_SERVER['REQUEST_URI']; if (!file_exists($file)) { header("HTTP/1.0 404 Not Found"); } die; } //Globals $cms->addGlobal("baseurl", $config->baseurl); $cms->addGlobal("siteTitle", $config->siteTitle); //session/user globals if ($user->isSinged()) { $cms->addGlobal("isSinged", "1"); $cms->addGlobal("username", $_SESSION['userName']); } // Routing require_once $APP_DIR . "/class/router/route.php"; require_once $APP_DIR . "/class/router/router.php"; $router = new Router(); $router->setBasePath(''); require_once $APP_DIR . "/routes.php"; $route = $router->matchCurrentRequest(); if ($route) { $array = $route->getTarget();