zhifu.asp
来自「易和阳光购物商城 v1.3 | 功能简介 增加了防注入文件」· ASP 代码 · 共 163 行
ASP
163 行
<!--#include file="conn.asp"-->
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim action,Payid
Payid=request.QueryString("id")
if Payid<>"" then
if not isnumeric(Payid) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
end if
action=request.QueryString("action")
set rs=server.CreateObject("adodb.recordset")
select case action
'////修改支付方式
case "zhifusave"
rs.open "select * from Iheeo_Pay where Payid="&Payid,conn,1,3
rs("PayName")=trim(request("PayName"))
rs("PayList")=request("PayList")
rs("PayKey")=request("PayKey")
rs("PayShopID")=trim(request("PayShopID"))
rs("PayShopKey")=trim(request("PayShopKey"))
rs.update
rs.close
response.write "<script>alert('成功修改了支付方式!');location.href=""zhifu.asp"";</script>"
response.End
'/////添加支付方式
case "zhifuadd"
rs.open "select * from Iheeo_Pay",conn,1,3
rs.addnew
rs("PayName")=trim(request("PayName"))
rs("PayList")=request("PayList")
rs("PayKey")=request("PayKey")
rs("PayShopID")=trim(request("PayShopID"))
rs("PayShopKey")=trim(request("PayShopKey"))
rs.update
rs.close
response.write "<script>alert('成功添加了支付方式!');location.href=""zhifu.asp"";</script>"
response.End
'/////删除支付方式
case "zhifudel"
conn.execute "delete from Iheeo_Pay where Payid="&Payid
response.redirect "zhifu.asp"
end select
set rs=nothing
%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6a7f9a">
<tr>
<td align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">修改支付方式</font></b></td>
</tr>
<tr>
<td><table width="700" border="0" align="center" cellpadding="2" cellspacing="1" >
<tr >
<td width="20%" align="center" background="../images/admin_bg_1.gif"><font color="#ffffff">支付方式</font></td>
<td width="10%" align="center" background="../images/admin_bg_1.gif"><font color="#ffffff">排 序</font></td>
<td width="10%" align="center" background="../images/admin_bg_1.gif"><font color="#FFFFFF">KEY</font></td>
<td width="20%" align="center" background="../images/admin_bg_1.gif"><font color="#FFFFFF">商户ID</font></td>
<td width="20%" align="center" background="../images/admin_bg_1.gif"><font color="#FFFFFF">商户KEY</font></td>
<td width="20%" align="center" background="../images/admin_bg_1.gif"><font color="#ffffff">操 作</font></td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Iheeo_Pay order by PayList",conn,1,1
j=rs.recordcount
do while not rs.eof%>
<tr>
<form name="form1" method="post" action="zhifu.asp?action=zhifusave&id=<%=rs("Payid")%>">
<td align="center">
<input name="PayName" type="text" id="PayName" size="14" value=<%=trim(rs("PayName"))%>>
</td>
<td align="center">
<input name="PayList" type="text" id="PayList" size="6" value=<%=rs("PayList")%> onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">
</td>
<td align="center">
<input name="PayKey" type="text" id="PayKey" size="6" value=<%=rs("PayKey")%>></td>
<td align="center">
<input name="PayShopID" type="text" id="PayShopID" size="16" value=<%=rs("PayShopID")%>></td>
<td align="center">
<input name="PayShopKey" type="text" id="PayShopKey" size="16" value=<%=rs("PayShopKey")%>></td>
<td STYLE='PADDING-LEFT: 20px'><input type="submit" name="Submit2" value="确 认">
<a href="zhifu.asp?action=zhifudel&id=<%=rs("Payid")%>" onClick="return confirm('您确定进行删除操作吗?')"><font color="#FF0000">删除</font></a>
</td>
</form>
<%rs.movenext
loop
rs.close
set rs=nothing%>
</tr>
<tr>
<td align="center" colspan="7" background="../images/admin_bg_1.gif"><font color="#ffffff">添加支付方式</font></td>
</tr>
<tr>
<form name="form2" method="post" action="zhifu.asp?action=zhifuadd">
<td align="center">
<input name="PayName" type="text" id="PayName" size="14">
</td>
<td align="center">
<input name="PayList" type="text" id="PayList" value=<%=j+1%> size="6" onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">
</td>
<td align="center">
<input name="PayKey" type="text" id="PayKey" size="6"></td>
<td align="center">
<input name="PayShopID" type="text" id="PayShopID" size="16"></td>
<td align="center">
<input name="PayShopKey" type="text" id="PayShopKey" size="16"></td>
<td STYLE='PADDING-LEFT: 20px'>
<input type="submit" name="Submit32" value="添 加">
</td>
</form>
</tr>
</table>
<p align="center">备注<div align="center">
<table border="0" width="700" cellpadding="3">
<tr>
<td width="20%" align="center" bgcolor="#6A7F9A">
<font color="#FFFFFF">支付方式</font></td>
<td align="center" bgcolor="#6A7F9A" width="10%"><font color="#FFFFFF">KEY值</font></td>
<td align="center" bgcolor="#6A7F9A"><font color="#FFFFFF">备注</font></td>
</tr>
<tr>
<td align="center" bgcolor="#DFE2D9">预存款支付</td>
<td align="center" bgcolor="#DFE2D9">71</td>
<td align="center" bgcolor="#DFE2D9" align="left">
<p align="left"> 使用用户预存款支付</td>
</tr>
<tr>
<td align="center" bgcolor="#FFFF00">网银在线支付</td>
<td align="center" bgcolor="#FFFF00">3</td>
<td align="center" bgcolor="#FFFF00" align="left">
<p align="left"> 推荐使用支付方式 <a target="_blank" href="http://www.chinabank.com.cn"><u>申请地址>></u></a></td>
</tr>
<tr>
<td align="center" bgcolor="#DFE2D9">财付通支付</td>
<td align="center" bgcolor="#DFE2D9">1</td>
<td align="center" bgcolor="#DFE2D9">
<p align="left"> <a target="_blank" href="https://www.tenpay.com"><u>申请地址>></u></a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?