示例#1
0
<?php

\System\Database::init();
if (Godmode\Router::entered($request)) {
    Godmode\Router::init();
    if ($request->logged_in()) {
        if (!\Godmode\Gatekeeper::canAccessGodmode($request->user)) {
            throw new \System\Error\AccessDenied();
        }
    } else {
        $url_login = \System\Router::get_url($request->host, 'god_login');
        if ($request->path != $url_login) {
            redirect_now($url_login);
        }
    }
}