<%@ LANGUAGE = VBScript.Encode %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>在线支付编辑</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<body style="margin-left:8px;margin-top:8px;background-color:#FFFFFF;">
<%
action=request("ok")
if action="" then
Set rs = conn.Execute("select * from liangjing_Pay") 
show=request("show") 
if show="" then show=rs("pay")
%>
<form action="pay.asp" method="post" name="pay">
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr class=backs><td colspan=2 class=td height=18>在线支付设置</td></tr>
<tr><td height=35  colspan="2"><input type="radio" name="pay" value="0" <%if show="0" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=0';">关闭在线支付</td></TR>
<tr><td height=35  colspan=2> <input type="radio" name="pay" value="1" <%if show="1" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=1';"> <a href=http://www.westpay.com.cn target="_blank">西部支付</a>&nbsp;</td></tr>    
<%if show="1" then%>
<tr><td height=35  width=20% align=right>商 户 名&nbsp;</td><td  > <input type=text value="<%=rs("westid")%>" name=westid size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在西部支付申请的商户ID"></td></tr>
<tr><td height=35  width=20% align=right rowspan=1 >返回地址&nbsp;</td><td  > <input type=text value="<%=rs("westback")%>" name=westback size=45> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="在线支付成功后的返回页面<br>一般不必填写">&nbsp;</td></tr>
<%end if%>
<tr><td height=35  colspan=2 ><input type="radio" name="pay" value="2" <%if show="2" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=2';"> <a href=http://www.chinabank.com.cn target="_blank">网银在线</a>&nbsp;</td></tr>    
<%if show="2" then%>
<tr><td height=35  width=20% align=right >商 户 号&nbsp;</td><td  > <input type=text value="<%=rs("chinaid")%>" name=chinaid size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在网银在线申请的商户号<br>一般为4或5位数字"></td></tr>
<tr><td height=35  width=20% align=right >MD5 私钥&nbsp;</td><td  > <input type=text value="<%=rs("chinakey")%>" name=chinakey size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="应与网银后台设置的密钥一致</font>"></td></tr>
<tr><td height=35  width=20% align=right rowspan=1 >返回地址&nbsp;</td><td  > <input type=text value="<%=rs("chinaback")%>" name=chinaback size=45> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="在线支付成功后的返回页面<br>一般不必填写">&nbsp;</td></tr>
<%end if%>
<tr><td height=35  colspan=2><input type="radio" name="pay" value="3" <%if show="3" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=3';"> <a href=http://www.pay88.com target="_blank">PAY88.COM</a> </td></tr>
<%if show="3" then%>
<tr><td height=35  width=20% align=right >商户编号&nbsp;</td><td  > <input type=text value="<%=rs("pay88id")%>" name=pay88id size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在PAY88申请的4位数商户编号"></td></tr>
<tr><td height=35  width=20% align=right >产品或服务说明&nbsp;</td><td  > <input type=text value="<%=rs("pay88name")%>" name=pay88name size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写产品或者服务的说明，此项必须填写"></td></tr>
<%end if%>
<tr><td height=35  colspan=2><input type="radio" name="pay" value="4" <%if show="4" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=4';"> <a href=http://www.NPS.cn target="_blank">NPS支付</a>&nbsp;</td></tr> 
<%if show="4" then%>
<tr><td height=35  width=20% align=right >商户编号&nbsp;&nbsp;</td><td  > <input type=text value="<%=rs("npsid")%>" name="npsid" size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在NPS申请的商户编号"></td></tr>
<%end if%>
<tr><td height=35  colspan=2><input type="radio" name="pay" value="5" <%if show="5" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=5';"> <a href=http://www.ips.com.cn target="_blank">环讯IPS支付</a>&nbsp;</td></tr> 
<%if show="5" then%>
<tr><td height=35  width=20% align=right >商户编号&nbsp;&nbsp;</td><td  > <input type=text value="<%=rs("ipsid")%>" name="ipsid" size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在IPS申请的6位数商户编号"></td></tr>
<%end if%>
<tr><td height=35  colspan=2><input type="radio" name="pay" value="6" <%if show="6" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=6';"> <a href=http://www.paypal.com target="_blank">PayPal.COM</a>&nbsp;</td></tr> 
<%if show="6" then%>
<tr><td height=35  width=20% align=right >Business&nbsp;&nbsp;</td><td  > <input type=text value="<%=rs("paypalid")%>" name=paypalid size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您在Paypal.com申请的帐号<br>一般为电子邮箱地址"></td></tr>
<%end if%>

<tr><td height=35  colspan=2><input type="radio" name="pay" value="7" <%if show="7" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=7';"> <a href=http://www.alipay.com target="_blank">支付宝</a> </td></tr>
<%if show="7" then%>
<tr><td height=35  width=20% align=right >支付宝帐户&nbsp;</td><td  > <input type=text value="<%=rs("alipay_id")%>" name=alipay_id size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您的支付宝帐户，一般为电子邮箱地址"></td></tr>
<tr><td height=35  width=20% align=right >合作伙伴id&nbsp;</td><td  > <input type=text value="<%=rs("Partner_id")%>" name=Partner_id size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="Partner id是在自己的支付宝账户内提取的一串数字"></td></tr>
<tr><td height=35  width=20% align=right >安全校验码 &nbsp;</td><td  > <input type=text value="<%=rs("alipay_securityCode")%>" name=alipay_securityCode size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="请登陆支付宝网站，在“商家工具”中生成安全校验码"></td></tr>
<%end if%>

<tr><td height=35  colspan=2><input type="radio" name="pay" value="8" <%if show="8" then%>checked<%end if%> onClick="javascript:location.href='pay.asp?show=8';"> <a href=http://www.xpay.cn target="_blank">易付通</a> </td></tr>
<%if show="8" then%>
<tr><td height=35  width=20% align=right >商户号&nbsp;</td><td  > <input type=text value="<%=rs("xpay_id")%>" name=xpay_id size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写您的易付通商户号"></td></tr>
<tr><td height=35  width=20% align=right >密钥 &nbsp;</td><td  > <input type=text value="<%=rs("xpay_key")%>" name=xpay_key size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="应与易付通网站后台设置的密钥相同"></td></tr>
<tr><td height=35  width=20% align=right >产品或服务说明 &nbsp;</td><td  > <input type=text value="<%=rs("xpay_name")%>" name=xpay_name size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写产品或者服务的说明，此项必须填写"></td></tr>
<tr><td height=35  width=20% align=right >返回地址 &nbsp;</td><td  > <input type=text value="<%=rs("xpay_url")%>" name=xpay_url size="30"> &nbsp; &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="在线支付成功后的返回地址<br>一般不必填写"></td></tr>
<%end if%>

<tr><td height=35  colspan=2><INPUT name="ok" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="保存设置">&nbsp;</td></tr>
</table>
</form>
</body>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
end if
              
if action="ok" then
if request.form("pay")="" then
response.write "<script language='javascript'>"
response.write "alert('出错了，资料填写不完整或有错误！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if request.form("pay")=1 and request.form("westid")="" then er=1
if request.form("pay")=2 then
if request.form("chinaid")="" or request.form("chinakey")="" then er=2
end if
if request.form("pay")=3 then
if request.form("pay88id")="" or request.form("pay88name")="" then er=3
end if
if request.form("pay")=4 and request.form("npsid")="" then er=4
if request.form("pay")=5 and request.form("ipsid")="" then er=5
if request.form("pay")=6 and request.form("paypalid")="" then er=6
if request.form("pay")=7 then
if request.form("alipay_id")="" or request.form("alipay_securityCode")="" then er=7
end if
if request.form("pay")=8 then
if request.form("xpay_id")="" or request.form("xpay_key")="" or request.form("xpay_name")="" then er=8
end if
if er=1 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“西部支付”，必须填写westpay商户ID！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=2 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“网银在线”，必须填写网银商户ID和MD5私钥！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=3 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“PAY88在线支付”，必须pay88商户ID和产品说明！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=4 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“NPS在线支付”，必须填写NPS商户ID！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=5 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“IPS环讯在线支付”，必须填写IPS商户编号！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=6 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“Paypal在线支付”，必须填写Pyapal Business ID！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=7 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“支付宝”，必须填写支付宝帐户、安全校验码！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if er=8 then
response.write "<script language='javascript'>"
response.write "alert('出错了，您选择了“易付通”，必须填写易付通商户号、密钥、产品和服务说明！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from liangjing_Pay"
rs.open sql,conn,1,3
rs("pay")=request.form("pay")
if request.form("pay")="1" then
rs("westid")=request.form("westid")
rs("westback")=request.form("westback")
end if
if request.form("pay")="2" then
rs("chinaid")=request.form("chinaid")
rs("chinakey")=request.form("chinakey")
rs("chinaback")=request.form("chinaback")
end if
if request.form("pay")="3" then
rs("pay88id")=request.form("pay88id")
rs("pay88name")=request.form("pay88name")
end if
if request.form("pay")="4" then
rs("npsid")=request.form("npsid")
end if
if request.form("pay")="5" then
rs("ipsid")=request.form("ipsid")
end if
if request.form("pay")="6" then
rs("paypalid")=request.form("paypalid")
end if

if request.form("pay")="7" then
rs("alipay_id")=request.form("alipay_id")
rs("alipay_securityCode")=request.form("alipay_securityCode")
rs("Partner_id")=request.form("Partner_id")
end if

if request.form("pay")="8" then
rs("xpay_id")=request.form("xpay_id")
rs("xpay_name")=request.form("xpay_name")
rs("xpay_key")=request.form("xpay_key")
rs("xpay_url")=request.form("xpay_url")
end if

rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功，您设置的在线支付信息已保存！');"
response.write "location.href='pay.asp';"
response.write "</script>"
end if%>
