Example #1
0
} else {
    error_reporting(0);
}
if (!in_array($_W['config']['setting']['cache'], array('mysql', 'file', 'memcache'))) {
    $_W['config']['setting']['cache'] = 'mysql';
}
load()->func('cache');
if (function_exists('date_default_timezone_set')) {
    date_default_timezone_set($_W['config']['setting']['timezone']);
}
if (!empty($_W['config']['memory_limit']) && function_exists('ini_get') && function_exists('ini_set')) {
    if (@ini_get('memory_limit') != $_W['config']['memory_limit']) {
        @ini_set('memory_limit', $_W['config']['memory_limit']);
    }
}
$_W['script_name'] = htmlspecialchars(scriptname());
$sitepath = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'));
$_W['siteroot'] = htmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . $sitepath);
if (substr($_W['siteroot'], -1) != '/') {
    $_W['siteroot'] .= '/';
}
$urls = parse_url($_W['siteroot']);
$urls['path'] = str_replace(array('/web', '/app', '/payment/wechat', '/payment/alipay', '/api'), '', $urls['path']);
$_W['siteroot'] = $urls['scheme'] . '://' . $urls['host'] . (!empty($urls['port']) && $urls['port'] != '80' ? ':' . $urls['port'] : '') . $urls['path'];
$_W['siteurl'] = $urls['scheme'] . '://' . $urls['host'] . (!empty($urls['port']) && $urls['port'] != '80' ? ':' . $urls['port'] : '') . $_W['script_name'] . (empty($_SERVER['QUERY_STRING']) ? '' : '?') . $_SERVER['QUERY_STRING'];
unset($sitepath);
$_W['isajax'] = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
$_W['ispost'] = $_SERVER['REQUEST_METHOD'] == 'POST';
if (MAGIC_QUOTES_GPC) {
    $_GET = istripslashes($_GET);
    $_POST = istripslashes($_POST);
include './includes/daysPerMonth.php';
include './includes/mosaicMakerTable.php';
include './includes/curPageURL.php';
#include('./includes/findprevnextsubnets.php');
include './includes/scriptname.php';
include './includes/factorize.php';
$subnetsToUse = !isset($_REQUEST['subnetsToUse']) ? $subnets[0] : $_REQUEST['subnetsToUse'];
$thumbs = !isset($_REQUEST['thumbs']) ? "small" : $_REQUEST['thumbs'];
?>

<body>

<?php 
# global variables
$debugging = 1;
$scriptname = scriptname();
# Set date/time now
$timenow = now();
################# KISKA TIME ####################
$currentYear = epoch2str($timenow, "%Y");
$currentMonth = epoch2str($timenow, "%m");
$currentDay = epoch2str($timenow, "%d");
$currentHour = epoch2str($timenow, "%H");
$currentMinute = epoch2str($timenow, "%i");
$currentMinute = epoch2str($timenow, "%M");
$currentSec = epoch2str($timenow, "%S");
# Set convenience variables from CGI parameters
if (isset($_REQUEST['starthour']) && isset($_REQUEST['endhour'])) {
    # Called with starthour, endhour
    # Although this script will accept URL variables starthour and endhour, here we translate them into
    # year/month/day hour:minute, and we also change the URL PHP thinks this page has, so posts real time to log posts