コード例 #1
0
ファイル: general.inc.php プロジェクト: polarlight1989/08cms
} elseif (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) {
    $onlineip = $_SERVER['REMOTE_ADDR'];
}
preg_match("/[\\d\\.]{7,15}/", $onlineip, $onlineipmatches);
$onlineip = $onlineipmatches[0] ? $onlineipmatches[0] : '';
unset($onlineipmatches);
if (empty($_GET['use_push'])) {
    if ($gzipenable && function_exists('ob_gzhandler')) {
        ob_start('ob_gzhandler');
    } else {
        $gzipenable = 0;
        ob_start();
    }
}
$dbcharset = !$dbcharset && in_array(strtolower($mcharset), array('gbk', 'big5', 'utf-8')) ? str_replace('-', '', $mcharset) : $dbcharset;
$db = new cls_mysql();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset);
$authorization = md5($authkey);
load_cache('grouptypes,permissions,repugrades');
sys_cache('nouserinfos');
$curuser = new cls_userinfo();
if (defined('M_ANONYMOUS')) {
    $curuser->activeuser(1);
} else {
    $curuser->currentuser();
    $memberid = $curuser->info['mid'];
    if ($phpviewerror == 2 || $phpviewerror == 1 && $curuser->isadmin()) {
        //		error_reporting(2047);
        error_reporting(E_ERROR | E_WARNING | E_PARSE);
    }
}