📄 send.php
字号:
<?php
session_start();
include("../inc/conn.php");
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('金额不能为空!');window.location='buy_lottery.php';</script>";
}else
{
$payuser=$_POST["user_account"];
$merchant_id = mysql_result($sqlpay,0,"conum"); ///商户编号
$merchant_key = mysql_result($sqlpay,0,"md5num"); ///商户密钥
$orderid = date("YmdHis"); ///订单编号
$amount = $money; ///订单金额
$curr = "1"; ///货币类型,1为人民币
$isSupportDES = "2"; ///是否安全校验,2为必校验,推荐
$merchant_url ="http://".mysql_result($sqlpay,0,"siteurl")."/opuser/receive.php"; //返回地址
$bankinterface=mysql_result($sqlpay,0,"payinterface");
$pname = $payuser; ///支付人姓名
$commodity_info = "游戏点卡"; ///商品信息
$merchant_param = "游戏点卡"; ///商户私有参数
$pemail="situjunhua@126.com"; ///传递email到快钱网关页面
$pid=""; ///代理/合作伙伴商户编号
///生成加密串,注意顺序
$ScrtStr="merchant_id=".$merchant_id."&orderid=".$orderid."&amount=".$amount."&merchant_url=".$merchant_url."&merchant_key=".$merchant_key;
$mac = strtoupper(md5($ScrtStr));
$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)
{
?>
<body onLoad="show5();">
<link href="../styles/css_g/css2.CSS" rel="stylesheet" type="text/css">
<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">买彩</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 name="frm" method="post" action="<?=$bankinterface?>" target="_blank"> <tr align="center">
<td colspan="2"><strong>您当前的支付信息</strong></td>
</tr>
<tr>
<td align="right">订单编号:</td>
<td><?php echo $orderid; ?></td>
</tr>
<tr>
<td align="right">订单金额:</td>
<td><?php echo $amount; ?>
元</td>
</tr>
<tr>
<td align="right">
支付账号:</td>
<td width="292"><?php echo $pname; ?>
<input name="merchant_id" type="hidden" value="<?php echo $merchant_id; ?>">
<input name="orderid" type="hidden" value="<?php echo $orderid; ?>">
<input name="amount" type="hidden" value="<?php echo $amount; ?>">
<input name="currency" type="hidden" value="<?php echo $curr; ?>">
<input name="isSupportDES" type="hidden" value="<?php echo $isSupportDES; ?>">
<input name="mac" type="hidden" value="<?php echo $mac; ?>">
<input name="merchant_url" type="hidden" value="<?php echo $merchant_url; ?>">
<input name="pname" type="hidden" value="<?php echo $pname; ?>">
<input name="commodity_info" type="hidden" value="<?php echo $commodity_info; ?>">
<input name="merchant_param" type="hidden" value="<?php echo $merchant_param; ?>">
<input name="pemail" type="hidden" value="<?php echo $pemail; ?>">
<input name="pid" type="hidden" value="<?php echo $pid; ?>">
</tr>
<tr>
<td align="right">商品名称:</td>
<td><?php echo $commodity_info; ?></td>
</tr>
<tr align="center">
<td colspan="2"><input name="payby99bill" type="image" src="../images/nowpay.gif" value="快钱支付"></td>
</tr> </form>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
<?
}else echo "<script language=javascript>alert('系统发生错误!');window.location='buy_lottery.php';</script>";
}else echo "<h1>发生错误!请重新提交支付信息...</h1>";?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -