?php
//error_reporting(0);
set_magic_quotes_runtime(1);
$mtime = explode(' ', microtime());
$discuz_starttime = $mtime[1] + $mtime[0];
define('SYS_DEBUG', FALSE);
define('HSK_ROOT', substr(dirname(__FILE__), 0, -7));
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
define('IMGDIR', "images/default/");
!defined('CURSCRIPT') && define('CURSCRIPT', '');
if($_SERVER['SERVER_NAME'] != 'www.94apt.com'){
$url = "http://www.94apt.com".$_SERVER['REQUEST_URI'];
header("locationurl");
die();
}
if(PHP_VERSION < '4.1.0') {
$_GET = &$HTTP_GET_VARS;
$_POST = &$HTTP_POST_VARS;
$_COOKIE = &$HTTP_COOKIE_VARS;
$_SERVER = &$HTTP_SERVER_VARS;
$_ENV = &$HTTP_ENV_VARS;
$_FILES = &$HTTP_POST_FILES;
}
require_once HSK_ROOT.'./include/global.func.php';
if(defined('NOROBOT') && ISROBOT) {
exit(header("HTTP/1.1 403 Forbidden"));
}
foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
foreach($$_request as $_key => $_value) {
$_key{0} != '_' && $$_key = daddslashes($_value);
}
}
$_DCOOKIE = $_DSESSION = $_DCACHE = $_DPLUGIN = $advlist = array();
$charset = $dbcharset = $forumfounders = $metakeywords = $extrahead = $seodescription = '';
require_once HSK_ROOT.'./config.inc.php';
$GLOBALS['debug'] = 1;
$prelength = strlen($cookiepre);
foreach($_COOKIE as $key => $val) {
if(substr($key, 0, $prelength) == $cookiepre) {
$scook = substr($key, $prelength);
$$scook = MAGIC_QUOTES_GPC ? $val : daddslashes($val);
}
}
unset($prelength, $_request, $_key, $_value, $scook);
$timestamp = time();
$saytime = gmdate('Y-m-d H:i', $timestamp+8*3600);
//*数据库连接
if($opensql){
require_once HSK_ROOT.'./include/db_'.$database.'.class.php';
$db = new dbstuff;
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
$dbuser = $dbpw = $dbname = $pconnect = NULL;
}
//*//数据库连接结束
$cachelost = (@include HSK_ROOT.'./forumdata/cache/cache_settings.php') ? '' : 'settings';
@extract($_DCACHE['settings']);
if($gzipcompress && function_exists('ob_gzhandler')) {
ob_start('ob_gzhandler');
} else {
$gzipcompress = 0;
ob_start();
}
define('FORMHASH', formhash());
if(PHP_VERSION > '5.1') {
@date_default_timezone_set('Etc/GMT'.($timeoffset > 0 ? '-' : '+').(abs($timeoffset)));
}
$myself = (substr($_SERVER["HP_SELF"], strrpos($_SERVER["HP_SELF"], "/")+1));
if($bbclosed && $myself != 'admincp.php'){
showmessage("站点目前处于关闭状态,请稍候再来访问!");
}
?>
|