<?php 
error_reporting(0); 
include("../config/ht.php");
if(ubo($_GET)){
$td=ubo($_GET['lx']);
$code=ubo(base64_decode($_GET[code]));
if (strpos($code, "|ubo|") !== false) {
$p= explode("|ubo|",$code); 
$ddh=$p[0].date("YmdHis");//提交的订单号
$ddhto=$p[0];//提交的订单号
$money=$p[1];//提交的支付金额
$userid=$p[2];//提交的用户ID
$shipinid=$p[3];//提交的资源ID
$lx=$p[4];
$ip=$p[5];
}
$type="where biaoshi='$td'";
$hzpay=queryall(hzpay,$type);
if($hzpay[zt]==1){
$type="where biaoshi='$td'";
$hzpayto=queryall(hzpayto,$type);
if($hzpayto){
if($hzpayto[sz]==1){
$type="where biaoshi='$td'  and userid='$userid'";
$hzpaylist=queryall(hzpaylist,$type);
if($hzpaylist){
if($hzpaylist[sz]==1){
$paycode=base64_encode($ddh.'|ubo|'.$money.'|ubo|'.$userid.'|ubo|'.$shipinid.'|ubo|'.$lx.'|ubo|'.$ip.'|ubo|'.$ddhto.'|ubo|'.$hzpaylist[id]);
if($td=='wxgzh'){
$url='/wxgzhpay-'.$userid.'-'.$paycode.'.html';
}else{
$url='/hztpay/'.$td.'/'.$paycode.'/';
}
header ("location:$url");
exit;
}else{
echo '代理通道已被停止使用';
exit;
}
}else{
echo '代理通道未添加';
exit;
}
}else{
echo '通道未启用';
exit;
}
}else{
echo '通道未配置';
exit;
}
}else{
$paycode=base64_encode($ddh.'|ubo|'.$money.'|ubo|'.$userid.'|ubo|'.$shipinid.'|ubo|'.$lx.'|ubo|'.$ip.'|ubo|'.$ddhto.'|ubo|'.$hzpay[id]);
if($td=='wxgzh'){
$url='/wxgzhpay-'.$userid.'-'.$paycode.'.html';
}else{
$url='/hztpay/'.$td.'/'.$paycode.'/';
}
header ("location:$url");
exit;
}
}else{ 
echo err();
}
?>
