📄 payconfirm.php
字号:
<?php
session_start();
include("../inc/conn.php");
include_once($_SESSION["inclanguage"]);
include("check.php");
include("../inc/main.js.php");
function vf($sign)
{
global $conn;
$sqls=mysql_query("select * from config where sign='$sign'",$conn);
$p=mysql_result($sqls,0,"content");
return $p;
}
$sqlpay=mysql_query("select * from payinfo where sign='1'",$conn);
if(isset($_POST["pay"]))
{ $money=$_POST["money"];
if($money==""||$money<0.01) echo "<script language=javascript>alert('".$pn_paymoneynonull."!');window.location='buy_lottery.php';</script>";
$payuser=$_POST["user_account"];
$MD5key = mysql_result($sqlpay,0,"md5num"); //MD5私钥
$MerNo = mysql_result($sqlpay,0,"conum"); //商户号
$BillNo =date("YmdHis"); //订单号
$Currency = "1"; //币种
$Amount = $money; //金额
$DispAmount="0"; //外币金额
$Language = "1"; //语言
$ReturnURL = "http://".mysql_result($sqlpay,0,"siteurl")."/opuser/PayResult.php"; //返回地址
$bankinterface=mysql_result($sqlpay,0,"payinterface");
$Remark = vf(1); //备注
$md5src = $MerNo.$BillNo.$Currency.$Amount.$Language.$ReturnURL.$MD5key; //校验源字符串
$MD5info = strtoupper(md5($md5src)); //MD5检验结果
$times=date("Y-m-d H:i:s");
$ok=mysql_query("insert into payment(order_number,user_account,money_type,money,remark,times)values('$BillNo','$payuser','$Currency','$money','$Remark','$times')",$conn);
if($ok)
{
?>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="../styles/css_g/css2.CSS" rel="stylesheet" type="text/css">
<title><?=vf(1)?> <?=$pn_payinfoconfirm?></title>
<style type="text/css">
<!--
body {
margin-left: 8px;
margin-top: 0px;
margin-right: 10px;
background-color: #FFFFFF;
}
-->
</style></head>
<script language="javascript">
function fs()
{
reform.fsubmit.disabled=true;
setTimeout("window.location='buy_lottery.php';",5000);
return true;
}
</script>
<body onLoad="show5();">
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5" ></td>
</tr>
</table>
<?php include("../inc/linemsg.php");?>
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5" ></td>
</tr>
</table>
<table width="688" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%" height="24"><img src="../styles/nimg/menu_l.gif" width="10" height="29"></td>
<td width="97%" valign="bottom" background="../styles/nimg/menu_c.gif"><table width="100%" height="19" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13%" class="fw12"><?=$pn_buylottery?></td>
<td width="41%" nowrap></td>
<td width="44%" align="right" nowrap><div id="liveclock"> </div></td>
<td width="2%"> </td>
</tr>
</table></td>
<td width="2%"><img src="../styles/nimg/menu_r.gif" width="10" height="29"></td>
</tr>
</table>
<table width="685" height="290" border="0" cellpadding="0" cellspacing="1" class="t11">
<tr>
<td valign="top" class="t20"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30" valign="top" class="t20"><span class="fb12"><img src="../images/Internetpay.jpg" width="173" height="72"></span></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="558" height="152" border="0" align="center">
<form action="<?=$bankinterface?>" method="post" target="_blank" name="reform" onsubmit="return fs();"> <tr align="center">
<td colspan="2"><strong><?=$pn_nowpayinfo?></strong></td>
</tr>
<tr>
<td align="right"><?=$pn_ordernumber?>:</td>
<td><?=$BillNo?></td>
</tr>
<tr>
<td align="right"><?=$pn_ordermoney?>:</td>
<td><?=$Amount?>
<?=$pn_rmb?></td>
</tr>
<tr>
<td align="right">
<?=$pn_payaccount?>:</td>
<td width="292"><?=$payuser?>
<input type="hidden" name="MerNo" value="<?=$MerNo?>"> <!--商户号-->
<input type="hidden" name="Currency" value="<?=$Currency?>"><!--交易币种-->
<input type="hidden" name="BillNo" value="<?=$BillNo?>"><!--订单编号-->
<input type="hidden" name="Amount" value="<?=$Amount?>"><!--订单金额-->
<input type="hidden" name="Amount" value="<?=$DispAmount?>"><!--外币金额-->
<input type="hidden" name="ReturnURL" value="<?=$ReturnURL?>" size="60">
<input type="hidden" name="Language" value="<?=$Language?>">
<input type="hidden" name="MD5info" value="<?=$MD5info?>">
<input type="hidden" name="Remark" value="<?=$Remark?>"><!--备注--></td>
</tr><!--
<tr>
<td align="right">商品名称:</td>
<td><?=$Remark?></td>
</tr>-->
<tr align="center">
<td colspan="2"><input type="submit" name="fsubmit" value="<?=$pn_paynextinfo?>"></td>
</tr> </form>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
<?
}else echo "<script language=javascript>alert('".$pn_systemerror."!');window.location='buy_lottery.php';</script>";
}else echo "<h1>".$pn_payconfirmagain."...</h1>";?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -