Exemple #1
0
    foreach ($includes as $include) {
        include_once $include;
    }
}
# exception handler
set_exception_handler(array('\\Sky\\ErrorHandler', 'run'));
# canonical redirect hook / session compat / timezone set
include 'lib/core/hooks/env-ini/env-ini.php';
# web services hooks
include 'lib/core/hooks/web-services/mem-connect.php';
include 'lib/core/hooks/web-services/db-connect.php';
include 'lib/core/hooks/web-services/media-connect.php';
# create page router
$router = new \Sky\PageRouter(array('codebase_paths' => $codebase_path_arr, 'db' => $db, 'page_path_404' => $page_404, 'page_path_default' => $default_page, 'uri' => $uri['path']));
# instantiate page using PageRouter
$p = new \Sky\Page($router->getPageProperties());
$p->sky_start_time = $sky_start_time;
$protocol = 'http';
if ($server_ssl_header && $_SERVER[$server_ssl_header]) {
    $protocol = 'https';
}
if ($_SERVER['HTTPS']) {
    $protocol = 'https';
}
$p->protocol = $_SERVER['HTTPS'] ? 'https' : 'http';
# create session if necessary
include 'lib/core/hooks/web-services/session.php';
# $access_groups to global (for authenticate hook)
# authentication hook
$access_groups = $router->settings['access_groups'];
include 'lib/core/hooks/login/authenticate.php';