Пример #1
0
                break;
            case 'login':
                if ($w->allow_login) {
                    require INC_DIR . '/login.php';
                }
                break;
        }
    }
    if ($authok) {
        require INC_DIR . '/session.php';
    }
    // include session handling part of the code
}
// !sess
if (isset($d)) {
    $d->close();
    unset($d);
}
if (isset($r)) {
    $r->disconnect();
    unset($r);
}
if (!$authok) {
    if (!isset($w->token)) {
        // tundmatu teenus
        header('HTTP/1.1 301 Moved Permanently');
        $location = 'Location: ' . FALLBACK;
        header($location);
        exit;
    }
    // render page