<?php
error_reporting(0);
define('IN_CRONLITE', true);
define('IN_OTHER', true);
define('CACHE_FILE', 0);
define('SYSTEM_ROOT', dirname(__FILE__).'/');
define('ROOT', dirname(SYSTEM_ROOT).'/');
date_default_timezone_set('Asia/Shanghai');
$date = date("Y-m-d H:i:s");

if (function_exists("set_time_limit"))
{
	@set_time_limit(0);
}
if (function_exists("ignore_user_abort"))
{
	@ignore_user_abort(true);
}

$scriptpath=str_replace('\\','/',$_SERVER['SCRIPT_NAME']);
$sitepath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
$siteurl = ($_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$sitepath.'/';

if (is_file(ROOT."ZR/360safe/360webscan.php")) {
    require_once(ROOT."ZR/360safe/360webscan.php");
	require_once(ROOT."ZR/360safe/xss.php");
}

require ROOT.'ZR_config.php';
//连接数据库
include_once(ROOT."ZR/db.class.php");
$DB=new DB($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port']);

include ROOT.'ZR/cache.class.php';
$CACHE=new CACHE();
$conf=$CACHE->pre_fetch();
$password_hash='S^!@#%!*~&=+_-F';
include ROOT.'ZR/function.php';
include ROOT."ZR/sysmsg.php";
include ROOT.'ZR/member.php';

$clientip = real_ip();
$payapi = $conf['epay_url'];

function showalert($msg,$status,$orderid=null,$othertype=null){
	if($othertype=='buyye')$link = '../user/';
	else $link = '../';
	echo '<meta charset="utf-8"/><script>alert("'.$msg.'");window.location.href="'.$link.'";</script>';
}