function _getHeaderInfoByType($type) { $headerInfo = S::getServer('HTTP_INFO'); $headerInfo = explode(';', $headerInfo); foreach ($headerInfo as $key => $value) { list($k, $v) = explode('=', $value); $result[$k] = $v; } return $this->_getPhoneSystemType($result[$type]); }
/** * 全局变量过滤 */ function filter() { $allowed = array('GLOBALS' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, 'P_S_T' => 1); foreach ($GLOBALS as $key => $value) { if (!isset($allowed[$key])) { $GLOBALS[$key] = null; unset($GLOBALS[$key]); } } if (!get_magic_quotes_gpc()) { S::slashes($_POST); S::slashes($_GET); S::slashes($_COOKIE); } S::slashes($_FILES); $GLOBALS['pwServer'] = S::getServer(array('HTTP_REFERER', 'HTTP_HOST', 'HTTP_X_FORWARDED_FOR', 'HTTP_USER_AGENT', 'HTTP_CLIENT_IP', 'HTTP_SCHEME', 'HTTPS', 'PHP_SELF', 'REQUEST_URI', 'REQUEST_METHOD', 'REMOTE_ADDR', 'QUERY_STRING')); !$GLOBALS['pwServer']['PHP_SELF'] && ($GLOBALS['pwServer']['PHP_SELF'] = S::getServer('SCRIPT_NAME')); }
/** * 压缩内容,并设置响应头为压缩格式 * * @global string $db_obstart * @param string $output 要压缩的内容 * @return string */ function ObContents($output) { ob_end_clean(); $getHAE = S::getServer('HTTP_ACCEPT_ENCODING'); if (!headers_sent() && $GLOBALS['db_obstart'] && $getHAE && N_output_zip() != 'ob_gzhandler') { $encoding = ''; if (strpos($getHAE, 'x-gzip') !== false) { $encoding = 'x-gzip'; } elseif (strpos($getHAE, 'gzip') !== false) { $encoding = 'gzip'; } if ($encoding && function_exists('crc32') && function_exists('gzcompress')) { header('Content-Encoding: ' . $encoding); $outputLen = strlen($output); $outputZip = "�"; $outputZip .= substr(gzcompress($output, $GLOBALS['db_obstart']), 0, -4); $outputZip .= @pack('V', crc32($output)); $output = $outputZip . @pack('V', $outputLen); } else { ObStart(); } } else { ObStart(); } return $output; }
} elseif ($SMTP = ini_get('SMTP')) { $sys_mail = 'SMTP ( Server: ' . $SMTP . ')'; } else { $sys_mail = 'Disabled'; } @extract($db->get_one('SELECT totalmember,yposts FROM pw_bbsinfo WHERE id=1')); @extract($db->get_one('SELECT SUM(topic) AS threads,SUM(article) AS posts FROM pw_forumdata')); $hits = $db->get_value('SELECT SUM(hits) FROM pw_threads'); $cachetime = $timestamp + 60 * 60 * 12; /** writeover(D_P.'data/bbscache/admin_cache.php',"<?php die;?>$cachetime|$pw_size|$o_size|$dbversion|$max_upload|$max_ex_time|$sys_mail|$totalmember|$threads|$posts|$hits|$yposts\r\n{$cachetext[1]}"); **/ pwCache::setData(D_P . 'data/bbscache/admin_cache.php', "<?php die;?>{$cachetime}|{$pw_size}|{$o_size}|{$dbversion}|{$max_upload}|{$max_ex_time}|{$sys_mail}|{$totalmember}|{$threads}|{$posts}|{$hits}|{$yposts}\r\n{$cachetext[1]}"); } $altertime = gmdate('Y-m-d H:i', $timestamp + $db_timedf * 3600); $systemtime = $db_cvtime == 0 ? $altertime : gmdate('Y-m-d H:i', time() + $db_timedf * 3600); $sysversion = PHP_VERSION; $sysos = str_replace('PHP/' . $sysversion, '', S::getServer('SERVER_SOFTWARE')); $ifcookie = isset($_COOKIE) ? 'SUCCESS' : 'FAIL'; } if (!$job || $job == 'desktop') { if (S::inArray($admin_name, $manager)) { $u = 1; if (pwWritable(D_P . 'data/sql_config.php')) { $warnid += 1; } if (is_dir('data')) { $warnid += 2; } if (ini_get('register_globals')) { $warnid += 4; } if (file_exists('admin.php')) {
<?php define('CK', 1); require_once 'global.php'; if (S::getServer('HTTP_IF_MODIFIED_SINCE') || S::getServer('HTTP_IF_NONE_MATCH') || empty($_COOKIE) && !$pwServer['HTTP_USER_AGENT']) { sendHeader('304'); exit; } if ($_GET['admin']) { $db_ckpath = '/'; $db_ckdomain = ''; } header('Pragma:no-cache'); header('Cache-control:no-cache'); $checkCode = L::loadClass('checkcode', 'site'); $checkCode->out(); exit;