<?php //ini_set('display_errors', 1); //error_reporting(E_ERROR | E_WARNING | E_PARSE); require_once "config.php"; /**< include the site configuration that is edited by the coder. */ require_once "config/configuration/config.php"; /**< include the site configuration that is edited by the site admin by the configuration module. */ require_once "lib/inc.php"; set_error_handler('error_handler'); /**< set the custom error handler function the function is in inc.php */ require_once "lib/" . SESSION_METHOD . ".php"; require_once "lib/router.php"; require_once "lib/dispatcher.php"; $__out['lang'] = dispatcher::set_language(); require_once "config/translation/" . $__out['lang'] . ".php"; try { dispatcher::request(); // handle request } catch (PermissionDeniedException $ex) { if ($_SESSION['group_id'] == 0) { // visitor dispatcher::redirect(array("controller" => "user", "action" => "login"), "please_login_first"); } else { dispatcher::redirect(array("controller" => "errors", "action" => "permission_denied")); } } catch (PageNotFoundException $ex) { if (DEBUG) { exception_handler($ex); } else { dispatcher::redirect(array("controller" => "errors", "action" => "page_not_found"));