📄 admin_payment.asp
字号:
<%
Option Explicit
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
%>
<!--#Include File="../Conn.asp"-->
<!--#Include File="Admin_CheckPurview.asp"-->
<!--#Include File="../inc/ClassSendMail.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href='Admin_Style.css' type='text/css' rel='stylesheet'>
<title>订单付款记录管理</title>
<script language="javascript" src="../js/Common.js"></script>
<script language="javascript" src="../js/InstallDir.js"></script>
<script language="javascript" src="../Js/Ajax.js"></script>
</head>
<body>
<%
If EL_Admin.Purview <> 1 Then
If EL_Admin.CheckAdminPurview(24, 3) = False Then
EL_Admin.ShowPurviewError("对不起!您没有足够的管理权限")
End If
End If
Dim CurrentPath, Search_Keywords, Search_Field
Dim BookType, PayType, SearchType
Search_Keywords = EL_Common.ReplaceBadChar(EL_Common.ELRequest("Search_Keywords", 1))
Search_Field = EL_Common.ReplaceBadChar(EL_Common.ELRequest("Search_Field", 1))
BookType = EL_Common.ELRequest("BookType", 2)
PayType = EL_Common.ELRequest("PayType", 1)
SearchType = EL_Common.ELRequest("SearchType", 2)
If PayType = "" Then
PayType = -1
Else
PayType = EL_Common.ELClng(PayType)
End If
CurrentPath = "·您现在的位置:<a href='"& EL_CurrentScriptName &"'>订单付款记录管理</a> "
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td align="center" class="top_25"><strong>订单付款记录管理</strong></td>
</tr>
<tr>
<td class="td_50">管理导航:<a href="Admin_Payment.asp">所有付款记录</a> | <a href="Admin_Payment.asp?BookType=1">酒店订单</a> | <a href="Admin_Payment.asp?BookType=2">机票订单</a> | <a href="Admin_Payment.asp?BookType=3">度假订单</a> | <a href="Admin_Payment.asp?BookType=4">景点订单</a> | <a href="Admin_Payment.asp?BookType=5">租车订单</a></td>
</tr>
<tr>
<td class="item_25">
<div style="float:left; padding-top:2px;">
<input name="PayType" type="radio" class="nomargin" value="-1" <%=EL_Common.SetObjectChecked(-1, PayType)%> onClick="location.href='Admin_Payment.asp?BookType=<%=BookType%>&SearchType=<%=SearchType%>&PayType='+this.value">
所有类型
<input name="PayType" type="radio" class="nomargin" value="0" <%=EL_Common.SetObjectChecked(0, PayType)%> onClick="location.href='Admin_Payment.asp?BookType=<%=BookType%>&SearchType=<%=SearchType%>&PayType='+this.value">
银行汇款
<input name="PayType" type="radio" class="nomargin" value="1" <%=EL_Common.SetObjectChecked(1, PayType)%> onClick="location.href='Admin_Payment.asp?BookType=<%=BookType%>&SearchType=<%=SearchType%>&PayType='+this.value">
在线支付
</div>
<div style="float:left; margin-left:30px;">
<select name="SearchType" id="SearchType" onChange="location.href='Admin_Payment.asp?PayType=<%=PayType%>&BookType=<%=BookType%>&SearchType='+this.value">
<option value="0" <%=EL_Common.SetObjectSelected(0, SearchType)%>>所有付款记录</option>
<option value="1" <%=EL_Common.SetObjectSelected(1, SearchType)%>>一周内的付款记录</option>
<option value="2" <%=EL_Common.SetObjectSelected(2, SearchType)%>>半个月内的付款记录</option>
<option value="3" <%=EL_Common.SetObjectSelected(3, SearchType)%>>一个月内的付款记录</option>
</select>
</div>
<div style="float:left; margin-left:50px; padding-top:4px;"><strong> 记录搜索:</strong></div>
<div style="float:left;">
<form name="search" action="Admin_Payment.asp" method="get">
<select name="Search_Field" id="Search_Field">
<option value="BookNumber">订单号</option>
<option value="TrueName" selected>客户名</option>
<option value="UserName">会员名</option>
<option value="BankName">银行名称</option>
<option value="PayDateTime">交易时间</option>
</select>
<input name="Search_Keywords" type="text" id="Search_Keywords">
<input type="submit" name="Submit4" value="搜索">
</form>
</div>
</td>
</tr>
</table>
<br>
<%
Select Case Action
Case "": Call ManagePayment()
Case "Add": Call AddPayment()
Case "Save": Call SavePayment()
Case "Show": Call ShowPayment()
End Select
Call EL_Common.Bottom()
Call ApplicationTerminate()
Sub SavePayment()
On Error Resume Next
Dim PaymentCmd
Dim BookID, BankName, PayDateTime, PayMoney, Remark, SendMessage, SendEmail, MessageTitle, MessageContent
Dim BookType, BookTableName, UserName, Email
BookID = EL_Common.ELRequest("BookID", 2)
BankName = EL_Common.ELRequest("BankName", 1)
PayDateTime = EL_Common.ELRequest("PayDateTime", 1)
PayMoney = EL_Common.ELRequest("PayMoney", 2)
Remark = EL_Common.ELRequest("Remark", 1)
SendMessage = EL_Common.ELRequest("SendMessage", 2)
SendEmail = EL_Common.ELRequest("SendEmail", 2)
BookType = EL_Common.ELRequest("BookType", 2)
MessageTitle = EL_Common.ELRequest("Title", 1)
MessageContent = EL_Common.ELRequest("Content", 1)
If PayMoney <= 0 Then
EL_Common.ShowErrorMsg("汇款金额不能小于或等于0")
Exit Sub
End If
If IsDate(PayDateTime) = False Then
EL_Common.ShowErrorMsg("汇款日期格式错误")
Exit Sub
End If
Select Case BookType
Case 1: BookTableName = "EL_HotelBook" : ComeURL = "Admin_HotelBook.asp?Action=Show&BookID="& BookID
Case 2: BookTableName = "EL_FlightBook" : ComeURL = "Admin_FlightBook.asp?Action=Show&BookID="& BookID
Case 3: BookTableName = "EL_ProductBook" : ComeURL = "Admin_ProductBook.asp?Action=Show&BookID="& BookID
Case 4: BookTableName = "EL_SightBook" : ComeURL = "Admin_SightBook.asp?Action=Show&BookID="& BookID
Case 5: BookTableName = "EL_CarBook" : ComeURL = "Admin_CarBook.asp?Action=Show&BookID="& BookID
Case Else
EL_Common.ShowErrorMsg("订单类型错误")
Exit Sub
End Select
Call EL_Common.InitCommand(PaymentCmd, "EL_SP_Payment")
With PaymentCmd
.Parameters.Append .CreateParameter("RETURN", 2, 4)
.Parameters.Append .CreateParameter("@BookTableName", 200, 1, 50, BookTableName)
.Parameters.Append .CreateParameter("@BookID", 3, 1, 4, BookID)
.Parameters.Append .CreateParameter("@BankName", 200, 1, 50, BankName)
.Parameters.Append .CreateParameter("@PayType", 3, 1, 4, 0)
.Parameters.Append .CreateParameter("@PayMoney", 6, 1, 8, PayMoney)
.Parameters.Append .CreateParameter("@Remark", 200, 1, 500, Remark)
.Parameters.Append .CreateParameter("@PayDateTime", 135, 1, 8, PayDateTime)
.Parameters.Append .CreateParameter("@Editor", 200, 1, 50, EL_Admin.AdminName)
.Parameters.Append .CreateParameter("@IpAddress", 200, 1, 15, RemoteIp)
.Parameters.Append .CreateParameter("@UserName", 200, 2, 50)
.Parameters.Append .CreateParameter("@Email", 200, 2, 100)
.Execute()
End With
Select Case PaymentCmd(0)
Case -1:
EL_Common.ShowErrorMsg("汇款金额不能小于或等于0")
Exit Sub
Case -2:
EL_Common.ShowErrorMsg("指定订单不存在")
Exit Sub
End Select
UserName = PaymentCmd(10)
Email = PaymentCmd(11)
Set PaymentCmd = Nothing
If SendMessage = 1 And UserName<>"" Then Call dSendMessage(UserName, MessageTitle, MessageContent)
If SendEmail = 1 And Email<>"" Then Call dSendMail(Email, MessageTitle, MessageContent)
EL_Common.ShowScriptError()
Call EL_Common.InsertLog(3, ComeURL, "添加汇款记录", EL_Admin.AdminName)
Response.Redirect ComeURL
End Sub
Sub dSendMessage(ByVal UserName, ByVal Title, ByVal Content)
Dim MessageCmd
Call EL_Common.InitCommand(MessageCmd, "EL_SP_SendMessage")
With MessageCmd
.Parameters.Append .CreateParameter("@SendType", 3, 1, 4, 2)
.Parameters.Append .CreateParameter("@GroupID", 200, 1, 500, 0)
.Parameters.Append .CreateParameter("@Title", 200, 1, 255, Title)
.Parameters.Append .CreateParameter("@Sender", 200, 1, 50, SiteName)
.Parameters.Append .CreateParameter("@Receiver", 200, 1, 4000, UserName)
.Parameters.Append .CreateParameter("@Content", 203, 1, EL_Common.LenParameter(Content), Content)
.Execute()
End With
Set MessageCmd = Nothing
End Sub
Sub dSendMail(ByVal ToEmail, ByVal Title, ByVal Content)
Dim EL_SendMail
Set EL_SendMail = New ClassSendMail
EL_SendMail.SubjectName = Title
EL_SendMail.FromUserName = SiteName
EL_SendMail.FromEmail = WebmasterEmail
EL_SendMail.EmailBody = "<HTML><BODY bgcolor=""#FFFFFF"">"& EL_Common.HTMLEncode(Content) &"</BODY></HTML>"
EL_SendMail.ToEmail = ToEmail
EL_SendMail.SendMail()
Set EL_SendMail = Nothing
End Sub
Sub ShowPayment()
On Error Resume Next
Dim PaymentCmd, rsPayment
Dim PaymentID, ArrPayType(1)
ArrPayType(0) = "银行汇款"
ArrPayType(1) = "<span class=bluetext>在线支付</span>"
PaymentID = EL_Common.ELRequest("PaymentID", 2)
Call EL_Common.InitCommonCmd(PaymentCmd, rsPayment, "EL_Payment", "*", "PaymentID="& PaymentID)
rsPayment.Close()
If PaymentCmd(0) <> 1 Then
EL_Common.ShowErrorMsg("指定记录不存在")
Exit Sub
End If
rsPayment.Open()
CurrentPath = CurrentPath &" >> 查看付款记录"
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="2" class="top_25"><strong>查看付款记录</strong></td>
</tr>
<tr>
<td width="16%" class="td_ItemName"><strong>客户名</strong></td>
<td width="84%" class="td_25"><input name="textfield3" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("TrueName"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>会员名</strong></td>
<td class="td_25"><input name="textfield32" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("UserName"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>订单号</strong></td>
<td class="td_25"><input name="textfield33" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("BookNumber"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>付款类型</strong></td>
<td class="item_25">
<%=ArrPayType(rsPayment("PayType"))%>
<%
If rsPayment("PayType") = 1 Then Response.Write "(<a href='Admin_PayOnline.asp?Action=Show&PayOnlineID="& rsPayment("PayOnlineID") &"' style='text-decoration:underline; color:red;'>查看在线支付记录</a>)"
%>
</td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇入银行</strong></td>
<td class="td_25"><input name="textfield34" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("BankName"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇款日期</strong></td>
<td class="td_25"><input name="textfield35" type="text" value="<%=rsPayment("PayDateTime")%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇款金额</strong></td>
<td class="td_25"><input name="textfield36" type="text" value="<%=EL_Common.ELFormatCurrency(rsPayment("PayMoney"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>备注</strong></td>
<td class="td_25"><textarea name="textarea" cols="50" rows="6" readonly="true"><%=EL_Common.ServerHTMLEncode(rsPayment("Remark"))%></textarea></td>
</tr>
<tr>
<td class="td_ItemName"><strong>操作员</strong></td>
<td class="td_25"><input name="textfield37" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("Editor"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>操作时间</strong></td>
<td class="td_25"><input name="textfield38" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("EditorDateTime"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>IP地址</strong></td>
<td class="td_25"><input name="textfield39" type="text" value="<%=EL_Common.ServerHTMLEncode(rsPayment("IpAddress"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"> </td>
<td class="td_50"><input type="button" name="Submit3" value=" 返 回 " onClick="history.back()"></td>
</tr>
</table>
<%
rsPayment.Close()
Set rsPayment = Nothing
Set PaymentCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub ManagePayment()
On Error Resume Next
Dim PaymentCmd, rsPayment, RowCount, i, StrFields, StrCondition
Dim PageCounts, TotalRowCount, ArrPayType(1), PageTotal, AllTotal
PageTotal = 0
AllTotal = 0
ArrPayType(0) = "银行汇款"
ArrPayType(1) = "<span class=bluetext>在线支付</span>"
StrFields = "*"
StrCondition = "1=1"
If BookType <> 0 Then
Select Case BookType
Case 1: StrCondition = StrCondition &" And BookTableName='EL_HotelBook'"
Case 2: StrCondition = StrCondition &" And BookTableName='EL_FlightBook'"
Case 3: StrCondition = StrCondition &" And BookTableName='EL_ProductBook'"
Case 4: StrCondition = StrCondition &" And BookTableName='EL_SightBook'"
Case 5: StrCondition = StrCondition &" And BookTableName='EL_CarBook'"
End Select
End If
Select Case SearchType
Case 1: StrCondition = StrCondition &" And PayDateTime>='"& DateAdd("d", -7, Date()) &"' "
Case 2: StrCondition = StrCondition &" And PayDateTime>='"& DateAdd("d", -15, Date()) &"' "
Case 3: StrCondition = StrCondition &" And PayDateTime>='"& DateAdd("d", -30, Date()) &"' "
End Select
If PayType <> -1 Then StrCondition = StrCondition &" And PayType="& PayType
If Search_Keywords<>"" And Search_Field<>"" Then
If lCase(Search_Field) = "username" Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -