Exemplo n.º 1
0
        exit;
        //No errors
    }
    if ($MCache) {
        $MCache->set(MemCachePrefix . 'Config', $Config, 86400);
    }
}
// 热门标签列表
$HotTagsArray = json_decode($Config['CacheHotTags'], true);
$HotTagsArray = $HotTagsArray ? $HotTagsArray : array();
$PHPSelf = addslashes(htmlspecialchars($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']));
$UrlPath = $Config['WebsitePath'] ? str_ireplace($Config['WebsitePath'] . '/', '', substr($PHPSelf, 0, -4)) : substr($PHPSelf, 1, -4);
//For IIS ISAPI_Rewrite
$RequestURI = isset($_SERVER['HTTP_X_REWRITE_URL']) ? $_SERVER['HTTP_X_REWRITE_URL'] : $_SERVER['REQUEST_URI'];
$IsAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
$CurProtocol = IsSSL() ? 'https://' : 'http://';
//消除低版本中魔术引号的影响
if (version_compare(PHP_VERSION, '5.4.0') < 0 && get_magic_quotes_gpc()) {
    function StripslashesDeep($var)
    {
        return is_array($var) ? array_map('StripslashesDeep', $var) : stripslashes($var);
    }
    $_GET = StripslashesDeep($_GET);
    $_POST = StripslashesDeep($_POST);
    $_COOKIE = StripslashesDeep($_COOKIE);
    $_REQUEST = StripslashesDeep($_REQUEST);
}
// At某人并提醒他,使用时常在其前后加空格或回车,如 “@admin ”
function AddingNotifications($Content, $TopicID, $PostID, $FilterUser = '')
{
    /*
Exemplo n.º 2
0
    ?>
"></script>
<?php 
    if ($Config['PageHeadContent']) {
        echo $Config['PageHeadContent'] . '
';
    }
    if (isset($PageMetaKeyword) && $PageMetaKeyword) {
        echo '	<meta name="keywords" content="', $PageMetaKeyword, '" />
';
    }
    if (isset($PageMetaDesc) && $PageMetaDesc) {
        echo '	<meta name="description" content="', $PageMetaDesc, '" />
';
    }
    if (IsSSL()) {
        echo '	<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
';
    }
    if ($Config['MobileDomainName']) {
        ?>
	<meta http-equiv="mobile-agent" content="format=xhtml; url=<?php 
        echo $CurProtocol . $Config['MobileDomainName'] . $RequestURI;
        ?>
" />
<?php 
    }
    ?>
</head>

<body>