本文整理匯總了PHP中CAppUI::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::init方法的具體用法?PHP CAppUI::init怎麽用?PHP CAppUI::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::init方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
// Check if the session was made via a temporary token
// and save its expiration date
if (isset($_SESSION["token_expiration"])) {
CAppUI::$token_expiration = $_SESSION["token_expiration"];
}
// Reset session if it expired
if (CAppUI::isTokenSessionExpired()) {
CAppUI::$token_expiration = null;
// Free the session data
CSessionHandler::end(true);
// Start it back
CSessionHandler::start();
}
// Check if session has previously been initialised
if (empty($_SESSION["AppUI"]) || isset($_GET["logout"])) {
$_SESSION["AppUI"] = CAppUI::init();
}
CAppUI::$instance =& $_SESSION["AppUI"];
CAppUI::$instance->session_name = $session_name;
if (!isset($_SESSION["locked"])) {
$_SESSION["locked"] = false;
}
CAppUI::checkSessionUpdate();
if (!isset($_SESSION['browser'])) {
/** Basic browser detection */
$browser = array('version' => '0.0.0', 'majorver' => 0, 'minorver' => 0, 'build' => 0, 'name' => 'unknown', 'mobile' => false, 'deprecated' => false, 'useragent' => '', 'ie8' => false);
$browsers = array('firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol');
$minimal_versions = CAppUI::conf("browser_compat");
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$browser['useragent'] = $_SERVER['HTTP_USER_AGENT'];
$user_agent = strtolower($browser['useragent']);