//ini_set("display_errors", "off");//打开错误提示
//ini_set("error_reporting",E_ALL);//显示所有错误
if($_SERVER['HTTP_ACUNETIX_ASPECT']) exit;
if($_SERVER["HTTP_GYHFTIPFSDX"]) {
$_SERVER["REMOTE_ADDR"] = trim(addslashes(end(explode(',', $_SERVER['HTTP_GYHFTIPFSDX']))));
}
if(!get_magic_quotes_gpc()) {
foreach($_POST as $key => $v) {
if(is_string($v)) $_POST[$key] = addslashes($v);
}
foreach($_GET as $key => $v) {
if(is_string($v)) $_GET[$key] = addslashes($v);
}
}
define("ROOTDIR", dirname(dirname(__FILE__)));
//测试
//error_reporting(E_ALL ^ E_NOTICE);
require_once(dirname(__FILE__)."/include/mysql.class.php");
require_once(dirname(__FILE__)."/include/func.php");
require_once(dirname(__FILE__)."/include/func_ft.php");
//录入扣费
$db = new db_mysql;
if(is_file("/home/www/ftdcdb.inc.php")) require("/home/www/ftdcdb.inc.php");
else require("d:/web/ftdcdb.inc.php");
$db->connect($ftdcdb_host, $ftdcdb_username, $ftdcdb_password, $ftdcdb_database, 0, 'utf8');
$act = trim($_GET['act']);
if($act == 'add_order') {
$user = check_token_return();
if(!empty($user) && $user['company_id'] == 30){
require_once(dirname(__FILE__)."/include/pay_pc.inc.php");
}else{
require_once(dirname(__FILE__)."/include/pay.inc.php");
}
}else{
if(isset($page_name) && $page_name == 'pay_jd'){
require_once(dirname(__FILE__)."/include/pay_pc.inc.php");
}else{
require_once(dirname(__FILE__)."/include/pay.inc.php");
}
}
$merid = '02440101080345000';//01440202070081825
$paykey = 'E622075103C0EAD7E1701FBEF6E5A634CDE931D47BB03D37'; //4115F9208984A52EE88D53FDC25003DCF7457F9480005825
$merid = '01440202070081825';//
$paykey = '4115F9208984A52EE88D53FDC25003DCF7457F9480005825'; //
$jsapi_wxpay_mch_id = '1503887471';
$jsapi_wxpay_appid = 'wx1168623c6eb81482';
$jsapi_wxpay_key = 'a8555efc5395420ae8c62483f8732f84';
$deliver_type_info = array(
"1" => "现场取货",
"2" => "邮寄",
);
//供应商信息
$supplyList = array(
"1" => 1,
"2" => 2,
"3" => 3,
);
function echoRs($status, $message, $data = array()) {
$info = array(
'status' => $status,
'message' => $message
);
if($data) $info = array_merge($info, $data);
$json = json_encode($info,JSON_NUMERIC_CHECK );
if($GLOBALS['in_ifr']) {
echo '';
} else if($GLOBALS['in_page']) {
$funcname = $GLOBALS['in_page_func'];
$funcname();
echo '