Example #1
0
<?php

define('CK', 1);
require_once 'global.php';
if (GetServer('HTTP_IF_MODIFIED_SINCE') || 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');
class CkCode
{
    var $width;
    var $height;
    var $num;
    var $style;
    var $gdtype;
    function CkCode()
    {
        list($w, $h, $n) = explode("\t", $GLOBALS['db_gdsize']);
        (!is_numeric($w) || $w < 50 || $w > 200) && ($w = 150);
        (!is_numeric($h) || $h < 20 || $h > 80) && ($h = 60);
        (!is_numeric($n) || $n < 1) && ($n = 4);
        $this->width = $w;
        $this->height = $h;
        $this->num = (int) $n;
        $this->style = $GLOBALS['db_gdstyle'];
Example #2
0
<?php

!defined('W_P') && exit('Forbidden');
!$winduid && (wap_msg('not_login') && exit);
$returnUrl = "index.php";
$pwServer['HTTP_ACCEPT_LANGUAGE'] = GetServer('HTTP_ACCEPT_LANGUAGE');
wap_header();
require_once PrintWAP('myphone');
wap_footer();
Example #3
0
            $sys_mail = 'Unix Sendmail ( Path: ' . $sendmail_path . ')';
        } 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]}");
    }
    $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, '', GetServer('SERVER_SOFTWARE'));
    $ifcookie = isset($_COOKIE) ? 'SUCCESS' : 'FAIL';
}
if (!$job || $job == 'desktop') {
    if (CkInArray($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')) {
Example #4
0
function ObContents($output)
{
    //Copyright (c) 2003-09 PHPWind
    ob_end_clean();
    $getHAE = 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;
}
function GetAllServers()
{
    global $paths, $tag_values, $list_file, $tags_file, $server_file_maxage, $list_file_maxage, $region, $regions, $filters, $list, $list_mtime, $list_age;
    $servers = array();
    // Process servers
    foreach ($list as $item) {
        $servers[] = GetServer($item['ipAddress'], $item['port']);
    }
    return $servers;
}