本文整理汇总了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;
}
示例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";
}
示例3: startSession
function startSession()
{
startCMSSession();
}
示例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;
}