?? paymode.asp
字號:
<!--#include file="../Session.asp"-->
<!--#include file="../inc/Ubbhtml.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>億眾購系統--管理支付方式</title>
<link href="../../css/site.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--//
function check() {
if ( document.form.PayMode.value == '' ) {
window.alert('請輸入付款方式!!');
document.form.PayMode.focus();
return false;
}
if ( document.form.Text.value == '' ) {
window.alert('請輸入付款說明!!');
document.form.Text.focus();
return false;
}
if ( document.form.Text.value.length>500 ) {
window.alert('付款說明限500字內!!');
document.form.Text.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="50" colspan="3" valign="middle" align="center" class="tdstyle"><font color="#000000" size="3"><strong>付款方式列表</strong></font></td>
</tr>
<%
sql="select * from PayMode where Sort=0 order by id"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
Response.Write("<tr><td height=30 colspan=3 valign=middle align=center class=text>暫無付款方式,請及時添加!</tr></td>")
else
%>
<tr>
<td width="25%" height="25" align="center" class="tdstyle"><strong>付款方式名稱</strong></td>
<td align="center" class="tdstyle"><strong>詳細信息</strong></td>
<td width="10%" align="center" class="tdstyle"><strong>刪 除</strong></td>
</tr>
<%for i=1 to rs.recordcount%>
<tr>
<td align="center" valign="middle" class="tdstyle"><%=rs("PayMode")%></td>
<td valign="middle" class="tdstyle">
<%dim Text1
Text1 = rs("Text")
Text1=ubbcode(Text1)
Text1 = Replace(Text1, "<br>", "<br>")
Text1 = Replace(Text1, chr(10), "<br>")
Text1 = Replace(Text1, vbCrLf, "<br>")
Response.Write Text1%>
</td>
<td align="center" class="tdstyle"><input name="submit" type="button" class="button2" value="刪 除" onClick="window.location='?Act=del&id=<%=rs("id")%>'"></td>
</tr>
<%rs.movenext
next
rs.close
end if%>
</table>
<form action="?Act=set" method="post" name="form" id="form" >
<%Dim Text2
set rs = conn.execute("select * from PayMode where Sort=1")
if not rs.eof then
PayMode=rs("PayMode")
PayMode=rs("PayMode")
PayId=rs("PayId")
PayKey=rs("PayKey")
PayUrl1=rs("PayUrl1")
PayUrl2=rs("PayUrl2")
Text2=rs("Text")
Text2=ubbcode(Text2)
end if
rs.close
%>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="50" colspan="2" valign="middle" align="center" class="tdstyle"><font color="#000000" size="3"><strong>網銀支付設置</strong></font></td>
</tr>
<tr>
<td width="25%" height="25" align="right" class="tdstyle">網銀名稱:</td>
<td valign="middle" class="tdstyle"> <input name="PayMode" type="text" class="input1" id="PayMode" value="<%=PayMode%>" size="15" maxlength="50" readonly="true">
</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" class="tdstyle">支付ID號:</td>
<td valign="middle" class="tdstyle"> <input name="PayId" type="text" class="input1" id="PayId" value="<%=PayId%>" size="15" maxlength="50">
請填寫您在網銀在線的商戶號</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" class="tdstyle">支付密鑰:</td>
<td valign="middle" class="tdstyle"> <input name="PayKey" type="text" class="input1" id="PayKey" value="<%=PayKey%>" size="15" maxlength="50">
部分網銀需要支付密匙</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" class="tdstyle">連接地址:</td>
<td valign="middle" class="tdstyle"> <input name="PayUrl1" type="text" class="input1" id="PayUrl1" value="<%=PayUrl1%>" size="52" maxlength="100">
*(此項一般不需要修改,只有在網銀接口改動時才改動)</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" class="tdstyle">返回地址:</td>
<td valign="middle" class="tdstyle"> <input name="PayUrl2" type="text" class="input1" id="PayUrl2" value="<%=PayUrl2%>" size="52" maxlength="100">
*(以文件夾ac作為網站的根目錄)</td>
</tr>
<tr>
<td height="25" align="right" valign="middle" class="tdstyle">相關介紹:</td>
<td valign="middle" class="tdstyle"> <textarea name="Text" cols="50" rows="3" class="input1" id="Text"><%=Text2%></textarea>
*</td>
</tr>
<tr>
<td height="30" colspan="2" align="center" class="tdstyle">
<input type="submit" name="Submit" value="修 改" class="button" ONCLICK="javascript:return check()">
</td>
</tr>
</table>
</form>
<form action="?Act=add" method="post" name="form" id="form" >
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="50" colspan="2" valign="middle" align="center" class="tdstyle"><font color="#000000" size="3"><strong>添加付款方式</strong></font></td>
</tr>
<tr>
<td width="25%" height="25" align="right" class="tdstyle">付款方式:</td>
<td valign="middle" class="tdstyle"> <input name="PayMode" type="text" class="input1" id="PayMode" size="15" maxlength="10"> 如:建行銀行、郵政匯款</td>
</tr>
<tr>
<td height="200" align="right" valign="middle" class="tdstyle">付款說明:</td>
<td valign="middle" class="tdstyle"> <textarea name="Text" cols="58" rows="8" class="input1" id="Text"></textarea><br><br> *請填寫銀行帳號/戶名或匯款地址及注意事宜<br></td>
</tr>
<tr>
<td height="30" colspan="2" align="center" class="tdstyle">
<input type="submit" name="Submit" value="添 加" class="button" ONCLICK="javascript:return check()">
<input type="button" name="Submit2" value="返 回" class="button" onClick="history.go(-1)">
</td>
</tr>
</table>
</form>
<br><br><br>
<%
if request("Act")="del" then
conn.execute("Delete From PayMode where Id="&request("id")&"")
Response.Write("<script>alert(""刪除成功"");location.href=""PayMode.asp"";</script>")
end if
if request("Act")="set" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "PayMode where Sort=1", conn, 1, 2
if rs.eof then
rs.AddNew
rs("PayMode") = Request("PayMode")
rs("PayId") = Request("PayId")
rs("PayKey") = Request("PayKey")
rs("PayUrl1") = Request("PayUrl1")
rs("PayUrl2") = Request("PayUrl2")
rs("Text") = Request("Text")
rs("Sort") =1
rs.Update
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Write("<script>alert(""修改成功"");location.href=""PayMode.asp"";</script>")
else
rs("PayMode") = Request("PayMode")
rs("PayId") = Request("PayId")
rs("PayKey") = Request("PayKey")
rs("PayUrl1") = Request("PayUrl1")
rs("PayUrl2") = Request("PayUrl2")
rs("Text") = Request("Text")
rs.Update
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Write("<script>alert(""修改成功"");location.href=""PayMode.asp"";</script>")
end if
end if
if request("Act")="add" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "PayMode", conn, 1, 2
rs.AddNew
rs("PayMode") = Request("PayMode")
rs("Text") = Request("Text")
rs.Update
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Write("<script>alert(""添加成功"");location.href=""PayMode.asp"";</script>")
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -