admin_payment.asp
来自「个人网站比较简短」· ASP 代码 · 共 375 行 · 第 1/2 页
ASP
375 行
<!--#include file="Admin_Common.asp"-->
<!--#include file="../Include/PowerEasy.Bankroll.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Const NeedCheckComeUrl = True '是否需要检查外部访问
Const PurviewLevel = 2 '0--不检查,1--超级管理员,2--普通管理员
Const PurviewLevel_Channel = 0 '0--不检查,1--频道管理员,2--栏目总编,3--栏目管理员
Const PurviewLevel_Others = "Payment" '其他权限
strFileName = "Admin_Payment.asp?SearchType=" & SearchType & "&Field=" & strField & "&Keyword=" & Keyword
Response.Write "<html><head><title>在线支付记录管理</title>"
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
Response.Write "<link rel='stylesheet' href='Admin_Style.css' type='text/css'>"
Call ShowJS_Main("在线支付记录")
Response.Write "</head>"
Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>"
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' Class='border'>"
Call ShowPageTitle("在 线 支 付 记 录 管 理", 10204)
Response.Write " <tr class='tdbg' height='30'> "
Response.Write " <form name='form1' action='Admin_Payment.asp' method='get'>"
Response.Write " <td>快速查找:"
Response.Write " <select size=1 name='SearchType' onChange='javascript:submit()'>"
Response.Write " <option value='0'"
If SearchType = 0 Then Response.Write " selected"
Response.Write ">所有在线支付记录</option>"
Response.Write " <option value='1'"
If SearchType = 1 Then Response.Write " selected"
Response.Write ">最近10天内的新在线支付记录</option>"
Response.Write " <option value='2'"
If SearchType = 2 Then Response.Write " selected"
Response.Write ">最近一月内的新在线支付记录</option>"
Response.Write " <option value='3'"
If SearchType = 3 Then Response.Write " selected"
Response.Write ">未提交的在线支付记录</option>"
Response.Write " <option value='4'"
If SearchType = 4 Then Response.Write " selected"
Response.Write ">未成功的在线支付记录</option>"
Response.Write " <option value='5'"
If SearchType = 5 Then Response.Write " selected"
Response.Write ">支付成功的在线支付记录</option>"
Response.Write " </select> <a href='Admin_Payment.asp'>在线支付记录首页</a></td>"
Response.Write " </form>"
Response.Write "<form name='form2' method='post' action='Admin_Payment.asp'>"
Response.Write " <td>高级查询:"
Response.Write " <select name='Field' id='Field'>"
Response.Write " <option value='PaymentNum'>在线支付记录编号</option>"
Response.Write " <option value='UserName'>用户名</option>"
Response.Write " <option value='PayTime'>支付时间</option>"
Response.Write " </select>"
Response.Write " <input name='Keyword' type='text' id='Keyword' size='20' maxlength='30'>"
Response.Write " <input type='submit' name='Submit2' value=' 查 询 '>"
Response.Write " <input name='SearchType' type='hidden' id='SearchType' value='10'>"
Response.Write " </td>"
Response.Write "</form>"
Response.Write "</table>"
Response.Write "<br>"
If Action = "Cancel" Then
Call DelPayment
ElseIf Action = "Success" Then
Call PaySuccess
Else
Call main
End If
If FoundErr = True Then
Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Response.Write "</body></html>"
Call CloseConn
Sub main()
Dim rsPaymentList, sqlPaymentList, Querysql
Dim TotalMoneyPay, TotalMoneyTrue
TotalMoneyPay = 0
TotalMoneyTrue = 0
sqlPaymentList = "select top " & MaxPerPage & " * from PE_Payment "
Response.Write "<table width='100%'><tr><td align='left'><img src='images/img_u.gif' align='absmiddle'>您现在的位置:<a href='Admin_Payment.asp'>在线支付记录管理</a> >> "
Querysql = Querysql & " where 1=1 "
Select Case SearchType
Case 0
Response.Write "所有在线支付记录"
Case 1
Querysql = Querysql & " and datediff(" & PE_DatePart_D & ",PayTime," & PE_Now & ")<10"
Response.Write "最近10天内的新在线支付记录"
Case 2
Querysql = Querysql & " and datediff(" & PE_DatePart_M & ",PayTime," & PE_Now & ")<1"
Response.Write "最近一月内的新在线支付记录"
Case 3
Querysql = Querysql & " and Status=1"
Response.Write "未提交的在线支付记录"
Case 4
Querysql = Querysql & " and Status=2"
Response.Write "未成功的在线支付记录"
Case 5
Querysql = Querysql & " and Status=3"
Response.Write "支付成功的在线支付记录"
Case 10
If Keyword = "" Then
Response.Write "所有在线支付记录"
Else
Select Case strField
Case "PaymentNum"
Querysql = Querysql & " and PaymentNum like '%" & Keyword & "%'"
Response.Write "在线支付记录编号中含有“ <font color=red> " & Keyword & " </font> ”的在线支付记录"
Case "UserName"
Querysql = Querysql & " and UserName like '%" & Keyword & "%'"
Response.Write "用户名中含有“ <font color=red>" & Keyword & "</font> ”的在线支付记录"
Case "PayTime"
If IsDate(Keyword) = True Then
If SystemDatabaseType = "SQL" Then
Querysql = Querysql & " and PayTime='" & Keyword & "'"
Else
Querysql = Querysql & " and PayTime=#" & Keyword & "#"
End If
Response.Write "支付时间为 <font color=red>" & Keyword & "</font> 的在线支付记录"
Else
FoundErr = True
ErrMsg = ErrMsg & "<li>查询的支付时间格式不正确!</li>"
End If
End Select
End If
Case Else
FoundErr = True
ErrMsg = ErrMsg & "<li>错误的参数!</li>"
End Select
totalPut = PE_CLng(Conn.Execute("select Count(*) from PE_Payment " & Querysql)(0))
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage > 1 Then
Querysql = Querysql & " and PaymentID < (select min(PaymentID) from (select top " & ((CurrentPage - 1) * MaxPerPage) & " PaymentID from PE_Payment " & Querysql & " order by PaymentID desc) as QueryPayment) "
End If
sqlPaymentList = sqlPaymentList & Querysql & " order by PaymentID desc"
Response.Write "</td></tr></table>"
If FoundErr = True Then Exit Sub
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
Response.Write " <tr>"
Response.Write " <form name='myform' method='Post' action='Admin_Payment.asp' onsubmit=""return confirm('确定要删除选定的在线支付记录吗?');"">"
Response.Write " <td>"
Response.Write "<table width='100%' border='0' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr align='center' class='title'>"
Response.Write " <td width='30'>选中</td>"
Response.Write " <td width='80'>支付序号</td>"
Response.Write " <td width='60'>用户名</td>"
Response.Write " <td width='70'>支付平台</td>"
Response.Write " <td width='120'>交易时间</td>"
Response.Write " <td width='70'>汇款金额</td>"
Response.Write " <td width='70'>实际转账<br>金额</td>"
Response.Write " <td width='60'>交易状态</td>"
Response.Write " <td width='70'>银行信息</td>"
Response.Write " <td>备注</td>"
Response.Write " <td>操作</td>"
Response.Write " </tr>"
Set rsPaymentList = Server.CreateObject("Adodb.RecordSet")
rsPaymentList.Open sqlPaymentList, Conn, 1, 1
If rsPaymentList.BOF And rsPaymentList.EOF Then
totalPut = 0
Response.Write "<tr class='tdbg' height='50'><td colspan='20' align='center'>没有任何符合条件的在线支付单!</td></tr>"
Else
Dim i
i = 0
Do While Not rsPaymentList.EOF
Response.Write " <tr class='tdbg' onmouseout=""this.className='tdbg'"" onmouseover=""this.className='tdbgmouseover'"">"
Response.Write " <td width='30' align='center'><input name='PaymentID' type='checkbox' onclick='unselectall()' id='PaymentID' value='" & rsPaymentList("PaymentID") & "'></td>"
Response.Write " <td width='80' align='center'>" & rsPaymentList("PaymentNum") & "</td>"
Response.Write " <td width='60' align='center'><a href='Admin_User.asp?Action=Show&UserName=" & rsPaymentList("UserName") & "'>" & rsPaymentList("UserName") & "</a></td>"
Response.Write " <td width='70' align='center'>" & GetPayOnlineProviderName(rsPaymentList("eBankID")) & "</td>"
Response.Write " <td width='120' align='center'>" & rsPaymentList("PayTime") & "</td>"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?