當前位置: 首頁>>代碼示例>>PHP>>正文


PHP startCMSSession函數代碼示例

本文整理匯總了PHP中startCMSSession函數的典型用法代碼示例。如果您正苦於以下問題:PHP startCMSSession函數的具體用法?PHP startCMSSession怎麽用?PHP startCMSSession使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了startCMSSession函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 function __construct($w = 200, $h = 80)
 {
     /* create session to set word for verification */
     startCMSSession();
     $this->set_veriword();
     $this->dir_font = dirname(__FILE__) . '/' . $this->dir_font;
     $this->im_width = $w;
     $this->im_height = $h;
 }
開發者ID:GitKharytonov,項目名稱:Rebind,代碼行數:9,代碼來源:veriword.php

示例2: DocumentParser

}
// include the database configuration file
include_once "config.inc.php";
// initiate the content manager class
include_once "document.parser.class.inc.php";
$modx = new DocumentParser();
$modx->loadExtension("ManagerAPI");
$modx->getSettings();
$etomite =& $modx;
// for backward compatibility
$modx->tstart = $tstart;
$modx->mstart = $mstart;
// connect to the database
$modx->db->connect();
// start session
startCMSSession();
// get the settings from the database
include_once "settings.inc.php";
// get the user settings from the database
include_once "user_settings.inc.php";
// include_once the language file
if (!isset($manager_language) || !file_exists(MODX_MANAGER_PATH . "includes/lang/" . $manager_language . ".inc.php")) {
    $manager_language = "english";
    // if not set, get the english language file.
}
$_lang = array();
include_once "lang/english.inc.php";
$length_eng_lang = count($_lang);
if ($manager_language != "english" && file_exists(MODX_MANAGER_PATH . "includes/lang/" . $manager_language . ".inc.php")) {
    include_once "lang/" . $manager_language . ".inc.php";
}
開發者ID:AlexJS7,項目名稱:church.local,代碼行數:31,代碼來源:index.php

示例3: startSession

 function startSession()
 {
     startCMSSession();
 }
開發者ID:vvp24,項目名稱:tsvshop,代碼行數:4,代碼來源:apiinit.inc.php

示例4: modxWebLogout

function modxWebLogout()
{
    global $modx;
    $dbase = $modx->dbConfig['dbase'];
    $table_prefix = $modx->dbConfig['table_prefix'];
    $internalKey = $_SESSION['webInternalKey'];
    $username = $_SESSION['webShortname'];
    // invoke OnBeforeWebLogout event
    $modx->invokeEvent("OnBeforeWebLogout", array("userid" => $internalKey, "username" => $username));
    // if we were launched from the manager
    // do NOT destroy session
    if (isset($_SESSION['mgrValidated'])) {
        unset($_SESSION['webShortname']);
        unset($_SESSION['webFullname']);
        unset($_SESSION['webEmail']);
        unset($_SESSION['webValidated']);
        unset($_SESSION['webInternalKey']);
        unset($_SESSION['webValid']);
        unset($_SESSION['webUser']);
        unset($_SESSION['webFailedlogins']);
        unset($_SESSION['webLastlogin']);
        unset($_SESSION['webnrlogins']);
        unset($_SESSION['webUsrConfigSet']);
        unset($_SESSION['webUserGroupNames']);
        unset($_SESSION['webDocgroups']);
    } else {
        // Unset all of the session variables.
        $_SESSION = array();
        // destroy session cookie
        if (isset($_COOKIE[session_name()])) {
            setcookie(session_name(), '', time() - 42000, '/');
        }
        session_destroy();
        $sessionID = md5(date('d-m-Y H:i:s'));
        session_id($sessionID);
        startCMSSession();
        session_destroy();
    }
    // invoke OnWebLogout event
    $modx->invokeEvent("OnWebLogout", array("userid" => $internalKey, "username" => $username));
    return;
}
開發者ID:brettflorio,項目名稱:rpxnow-modx,代碼行數:42,代碼來源:AuthRPX.snippet.php


注:本文中的startCMSSession函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。