コード例 #1
0
ファイル: admin.mod.php プロジェクト: bo-blog/bw
if ($canonical->currentArgs['mainAction'] == 'login') {
    if ($canonical->currentArgs['subAction'] == 'logout') {
        if (array_key_exists('authmobile', $_SESSION)) {
            stopError(bw::$conf['l']['admin:msg:CannotLogout']);
        }
        $admin->checkCSRFCode('logout');
        @session_destroy();
        header("Location: {$conf['siteURL']}/index.php?cleartoken");
        exit;
    } elseif ($canonical->currentArgs['subAction'] == 'verify') {
        $s_token = $_REQUEST['s_token'];
        $admin->verifyToken($s_token);
        if (!$admin->verified) {
            stopError('');
        } else {
            $admin->storeSessionToken($s_token);
            $navCSRFCode = $admin->getCSRFCode('navibar');
            ajaxSuccess('-' . $navCSRFCode);
        }
    } else {
        $view->setTheme(bw::$conf['siteTheme']);
        $view->setMaster('adminlogin');
        $view->setWorkFlow(array('adminlogin'));
        $view->finalize();
    }
}
if ($canonical->currentArgs['mainAction'] == 'center') {
    if ($canonical->currentArgs['subAction'] == 'store') {
        $admin->checkCSRFCode('saveconfig');
        if (!isset($_REQUEST['smt'])) {
            stopError('No data is submitted.');