示例#1
0
 /**
  * Make application die properly
  * 
  * @return void
  */
 static function rip()
 {
     // If the client doesn't support cookies, we destroy its session
     // Sometimes, the cookie is empty while the client support cookies (url auth in IE)
     /*if (empty($_COOKIE)) {
         CSessionHandler::end();
       }*/
     //access log
     include "./includes/access_log.php";
     // Long request log
     include "./includes/long_request_log.php";
     if (CAppUI::$token_restricted || CAppUI::$auth_info && CAppUI::$auth_info->restricted) {
         CSessionHandler::end(true);
     } else {
         // Explicit close of the session before object destruction
         CSessionHandler::writeClose();
     }
     self::$inPeace = true;
     die;
 }
示例#2
0
文件: main.php 项目: fbone/mediboard4
        $tplLogin->assign("mediboardStyle", $mediboardStyle);
        // JS
        $tplLogin->assign("mediboardScript", CJSLoader::loadFiles());
        $tplLogin->assign("errorMessage", CAppUI::getMsg());
        $tplLogin->assign("time", time());
        $tplLogin->assign("redirect", $redirect);
        $tplLogin->assign("uistyle", $uistyle);
        $tplLogin->assign("browser", $browser);
        $tplLogin->assign("nodebug", true);
        $tplLogin->assign("offline", false);
        $tplLogin->assign("allInOne", CValue::get("_aio"));
        $tplLogin->assign("applicationVersion", $applicationVersion);
        $tplLogin->display("login.tpl");
    }
    // Destroy the current session and output login page
    CSessionHandler::end(true);
    CApp::rip();
}
$tab = 1;
$m = $m_get = CValue::get("m");
$post_request = $_SERVER['REQUEST_METHOD'] == 'POST';
if ($post_request) {
    $m = CValue::post("m") ?: $m;
}
$m = CAppUI::checkFileName($m);
if (null == $m) {
    $m = CPermModule::getFirstVisibleModule();
    $parts = explode("-", CAppUI::pref("DEFMODULE"), 2);
    $pref_module = $parts[0];
    if ($pref_module && CPermModule::getViewModule(CModule::getInstalled($pref_module)->mod_id, PERM_READ)) {
        $m = $pref_module;