//load configuration require "conf/config.php"; require "conf/constants.inc.php"; //load utility libraries require "includes/common/utilities.php"; require "includes/common/forms.php"; $controller = new Controller(); if ($_REQUEST['mod'] == 'index.php') { $controller->redirect(APP_ROOT . "/dashboard"); } if ($_REQUEST['mod'] != 'login' && (!isset($_SESSION['user']) || empty($_SESSION['user']['admin_id']))) { $controller->redirect(APP_ROOT . "/login"); } $controller->module = isset($_REQUEST['mod']) && $_REQUEST['mod'] != "" && $_REQUEST['mod'] != "index.php" ? $_REQUEST['mod'] : "dashboard"; $controller->parseFile(); $action = $controller->getAction(); $breadcrumb = $controller->getBreadcrumb(); if ($action) { include $action; $page = $controller->getPage(); if ($page) { if (!is_object($view)) { $view = new View(); } $view->page = $page; if (!$controller->isAjax()) { header("Content-type: text/html; charset=UTF-8"); $template = $controller->getTemplate(); include $template; } else { include $view->page;