本文整理匯總了PHP中Authenticate::setLastVisitCookie方法的典型用法代碼示例。如果您正苦於以下問題:PHP Authenticate::setLastVisitCookie方法的具體用法?PHP Authenticate::setLastVisitCookie怎麽用?PHP Authenticate::setLastVisitCookie使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Authenticate
的用法示例。
在下文中一共展示了Authenticate::setLastVisitCookie方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: redirect
// Redirects to the index if the URL is invalid (eg. file.php/folder/)
if ($_SERVER['SCRIPT_NAME'] != $_SERVER['PHP_SELF']) {
redirect($settings['siteurl']);
}
// Load the Global language file
include LOCALE . LOCALESET . "global.php";
if (iADMIN) {
define("iAUTH", substr(md5($userdata['user_password'] . USER_IP), 16, 16));
$aidlink = "?aid=" . iAUTH;
}
// PHP-Fusion user cookie functions
if (!isset($_COOKIE[COOKIE_PREFIX . 'visited'])) {
$result = dbquery("UPDATE " . DB_SETTINGS . " SET settings_value=settings_value+1 WHERE settings_name='counter'");
setcookie(COOKIE_PREFIX . "visited", "yes", time() + 31536000, "/", "", "0");
}
$lastvisited = Authenticate::setLastVisitCookie();
// Set theme
set_theme($userdata['user_theme']);
// Check if a given theme exists and is valid
function theme_exists($theme)
{
global $settings;
if ($theme == "Default") {
$theme = $settings['theme'];
}
if (!file_exists(THEMES) || !is_dir(THEMES) || !is_string($theme) || !preg_match("/^([a-z0-9_-]){2,50}\$/i", $theme) || !file_exists(THEMES . $theme)) {
return FALSE;
} elseif (file_exists(THEMES . $theme . "/theme.php") && file_exists(THEMES . $theme . "/styles.css")) {
return TRUE;
} else {
return FALSE;