⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_payonline.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
Option Explicit
Response.buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
%>
<!--#Include File="../Conn.asp"-->
<!--#Include File="../Inc/Const.asp"-->
<!--#Include File="User_CheckPurview.asp"-->
<!--#Include File="../Inc/ClassPayOnline.asp"-->
<!--#Include File="../Inc/MD5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="User_Style.css" type="text/css" rel="stylesheet">
<script language="javascript" src="../Js/Common.js"></script>
<title>在线支付</title>
</head>
<body>
<div id="dd" style="position:absolute;width:0px; height:0px;z-index:99; background:#333333; display:none; filter: Alpha(Opacity=30);"></div>
<%
Dim EnablePayOnline
EnablePayOnline = EL_Common.GetFieldValue("EnablePayOnline", "EL_Config", "1=1")
If EnablePayOnline = False Then
   EL_Common.ShowErrorMsg("对不起,本站暂时不接受在线支付")
   Call ApplicationTerminate()
End If

Dim CurrentPage, CurrentPath, PayOnlineProvider(10), URLParameters

PayOnlineProvider(1) = "网银在线1.1版"
PayOnlineProvider(2) = "网银在线2.0版"
PayOnlineProvider(3) = "中国在线支付网"
PayOnlineProvider(4) = "易付通"
PayOnlineProvider(5) = "支付宝支付"
PayOnlineProvider(6) = ""
PayOnlineProvider(7) = ""
PayOnlineProvider(8) = ""
PayOnlineProvider(9) = "上海环迅IPS"

CurrentPage = EL_Common.ELRequest("page", 2)

URLParameters = request.ServerVariables("QUERY_STRING")
If CurrentPage<1 Then 
   CurrentPage = 1
Else
   URLParameters = EL_Common.ReplaceText(URLParameters, "&*page=[0-9]*", "")
End If

CurrentPath = "·您现在的位置:<a href='"& EL_CurrentScriptName &"'>在线支付管理</a> "

%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="13%" background="Images/navbg.gif"><img src="Images/navtitle.gif" width="113" height="37"></td>
    <td width="87%" background="Images/navbg.gif">| <a href="User_PayOnline.asp" class="nav">在线支付</a> | <a href="User_PayOnline.asp?Action=Log" class="nav">在线支付记录</a> | </td>
  </tr>
</table>
<div class="dw">
<%
Select Case Action
  Case "", "Step1": Call PayOnline1()
  Case "Step2": Call PayOnline2()
  Case "Log": Call PayLog()
  Case "Show": Call ShowPayOnline()
End Select
Call ApplicationTerminate()

Function ShowBookType(ByVal b)
   Select Case LCase(b)
      Case "el_hotelbook", "1": ShowBookType = "酒店订单"
	  Case "el_flightbook", "2": ShowBookType = "机票订单"
	  Case "el_productbook", "3": ShowBookType = "度假订单"
	  Case "el_sightbook", "4": ShowBookType = "景点订单"  
	  Case "el_carbook", "5": ShowBookType = "租车订单"  
   End Select
End Function

Sub PayOnline2()
On Error Resume Next
Dim BookType, BookNumber, PayMoney, EL_PayOnline, ChannelID, BookTableName, rURL
Dim ArrBookInfo, BookID, BookName, BookTruePrice, BookPayedMoney, ArrFlightType(2)

BookType = EL_Common.ELRequest("BookType", 2)
BookNumber = EL_Common.ELRequest("BookNumber", 3)
PayMoney = EL_Common.ELRequest("PayMoney", 2)
ArrFlightType(1) = "单程"
ArrFlightType(2) = "往返"

If InStr(ComeURL, EL_CurrentScriptName)>0 Then
   rURL =  EL_CurrentScriptName
Else
   rURL = ComeURL
End If
If rURL = "" Then  rURL = EL_CurrentScriptName

If PayMoney <= 0 Then
   EL_Common.ShowErrorMsg("请输入要支付的金额")
   Exit Sub
End If

Select Case BookType
   Case 1: 
      ArrBookInfo = EL_Common.GetFieldValue("BookID,HotelName,RoomName,TruePrice,PayedMoney,ChannelID", "EL_HotelBook", "BookNumber='"& BookNumber &"' And Deleted=0 And UserID="& EL_User.UserID)
	  BookID = ArrBookInfo(0)
	  BookName = ArrBookInfo(1) &"("& ArrBookInfo(2) &")"
	  BookTruePrice = ArrBookInfo(3)
	  BookPayedMoney = ArrBookInfo(4)
	  ChannelID = ArrBookInfo(5)
	  BookTableName = "EL_HotelBook"
   Case 2: 
      ArrBookInfo = EL_Common.GetFieldValue("BookID,DepartCity,DestinationCity,FlightType,DepartFlightNumber,BackFlightNumber,DepartTruePrice,BackTruePrice,PayedMoney,ChannelID", "EL_FlightBook", "BookNumber='"& BookNumber &"' And Deleted=0 And UserID="& EL_User.UserID)
      BookID = ArrBookInfo(0)
	  If ArrBookInfo(3) = "2" Then
	     BookName = ArrBookInfo(1) &" - "& ArrBookInfo(2) &"["& ArrFlightType(ArrBookInfo(3)) &"](去程:"& ArrBookInfo(4) &" &nbsp; 返程:"& ArrBookInfo(5) &")"
	  Else
	     BookName = ArrBookInfo(1) &" - "& ArrBookInfo(2) &"["& ArrFlightType(ArrBookInfo(3)) &"]("& ArrBookInfo(4) &")"
	  End If
	  BookTruePrice = ArrBookInfo(6) + ArrBookInfo(7)
	  BookPayedMoney = ArrBookInfo(8)
	  ChannelID = ArrBookInfo(9)
	  BookTableName = "EL_FlightBook"
   Case 3: 
      ArrBookInfo = EL_Common.GetFieldValue("BookID,ProductName,TruePrice,PayedMoney,ChannelID", "EL_ProductBook", "BookNumber='"& BookNumber &"' And Deleted=0 And UserID="& EL_User.UserID)
      BookID = ArrBookInfo(0)
	  BookName = ArrBookInfo(1)
	  BookTruePrice = ArrBookInfo(2)
	  BookPayedMoney = ArrBookInfo(3)
	  ChannelID = ArrBookInfo(4)
	  BookTableName = "EL_ProductBook"
   Case 4: 
      ArrBookInfo = EL_Common.GetFieldValue("BookID,SightName,TruePrice,PayedMoney,ChannelID", "EL_SightBook", "BookNumber='"& BookNumber &"' And Deleted=0 And UserID="& EL_User.UserID)
	  BookID = ArrBookInfo(0)
	  BookName = ArrBookInfo(1)
	  BookTruePrice = ArrBookInfo(2)
	  BookPayedMoney = ArrBookInfo(3)
	  ChannelID = ArrBookInfo(4)
	  BookTableName = "EL_SightBook"
   Case 5: 
      ArrBookInfo = EL_Common.GetFieldValue("BookID,CarName,TruePrice,PayedMoney,ChannelID", "EL_CarBook", "BookNumber='"& BookNumber &"' And Deleted=0 And UserID="& EL_User.UserID)
	  BookID = ArrBookInfo(0)
	  BookName = ArrBookInfo(1)
	  BookTruePrice = ArrBookInfo(2)
	  BookPayedMoney = ArrBookInfo(3)
	  ChannelID = ArrBookInfo(4)
	  BookTableName = "EL_CarBook"
   Case Else
      EL_Common.ShowErrorMsg("订单类型错误")
	  Exit Sub
End Select

If BookID="" OR BookName="" OR BookTruePrice="" OR BookPayedMoney="" Then
   EL_Common.ShowErrorMsg("找不到指定订单")
   Exit Sub
End If

Set EL_PayOnline = New ClassPayOnline
	  
EL_PayOnline.BookNumber = BookNumber
EL_PayOnline.UserName = EL_User.UserName
EL_PayOnline.Email = EL_User.Email
EL_PayOnline.Address = EL_User.Address
EL_PayOnline.Mobile = EL_User.Mobile
EL_PayOnline.Telephone = EL_User.Phone
EL_PayOnline.PayDate = Replace(EL_Common.FormatDate(Date()), "-", "")
EL_PayOnline.ZipCode = EL_User.ZipCode
EL_PayOnline.BackURL = "http://"& Request.ServerVariables("HTTP_HOST") & InstallDir &"User/User_PayOnlineResult.asp?ChannelID="& ChannelID &"&BookTableName="& BookTableName
EL_PayOnline.PayMoney = PayMoney
EL_PayOnline.Execute()

%>
<script language="javascript">
var strname="";
function setDocumentDisabled(type){
   var e = getObject("dd");
	if(type==1){
		e.style.width = '100%';		
		e.style.height = document.body.clientHeight>document.body.scrollHeight?document.body.clientHeight:document.body.scrollHeight;
		e.style.top=0;
		e.style.left=0;
		e.style.display = '';
		document.body.onresize = function(){
			e.style.width='100%';
			e.style.height = document.body.clientHeight>document.body.scrollHeight?document.body.clientHeight:document.body.scrollHeight;			
			if(strname!="") show(strname)
		}
	}else{
		if(e){
			e.style.width = '0px';
		    e.style.height = '0px';
			e.style.display = 'none';
		}
	}
}
function modify(){
   setDocumentDisabled(1);
   show("ModifyMoney");
   getObject("PayMoney").focus();
}
function show(name){
   strname = name;
   var o = getObject(strname);
   o.style.left = (document.body.clientWidth-parseInt(o.style.width)) / 2 + 'px';
   o.style.top = '110px'
   o.style.display= '';
}
function dosubmit(frm){
   setDocumentDisabled(1);
   parent.topFrame.setDocumentDisabled(1);
   show("PayResult");
   SubmitOnce(frm);
}
function completed(){
   setDocumentDisabled(0);
   parent.topFrame.setDocumentDisabled(0);
   getObject("PayResult").style.display= 'none';
   this.location.href = "User_PayOnline.asp?Action=Log";
}
function closed(){
   setDocumentDisabled(0);
   parent.topFrame.setDocumentDisabled(0);
   getObject("PayResult").style.display= 'none';
   getObject("bprev").disabled = false;
   getObject("bnext").disabled = false;
   strname = "";
}
</script>
<div id="ModifyMoney" style="position:absolute;width:280px;height:50px;z-index:100; border:1px solid #FFFFFF; display:none;">
<form name="myform" action="User_PayOnline.asp" method="get">
  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" class="Border">
    <tr>
      <td colspan="2" class="top_26"><strong>修改支付金额</strong></td>
    </tr>
    <tr>
      <td width="37%" align="right" class="td_ItemName">请输入金额:</td>
      <td width="63%" class="td_22" style="height:40px;"><input name="PayMoney" type="text" id="PayMoney" value="<%=PayMoney%>" size="15" onFocus="this.select();"></td>
    </tr>
    <tr>
      <td colspan="2" align="center" class="td_22" style="height:40px;"><input type="submit" name="Submit3" value=" 提 交 ">
        <input type="button" name="Submit4" value=" 取 消 " onClick="setDocumentDisabled(0);getObject('ModifyMoney').style.display= 'none';strname=''">
        <input name="Action" type="hidden" id="Action" value="Step2">
        <input name="BookType" type="hidden" id="BookType" value="<%=BookType%>">
        <input name="BookNumber" type="hidden" id="BookNumber" value="<%=BookNumber%>">
		<input name="ComeURL" type="hidden" id="ComeURL" value="<%=rURL%>">
      </td>
    </tr>
  </table>
</form>
</div>
<div id="PayResult" style="position:absolute;width:400px;height:50px;z-index:101; border:1px solid #FFFFFF; display:none;">
   <table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border" bgcolor="#FFFFFF">
        <tr>
          <td align="center" class="top_26"><strong>在线支付(第三步)</strong></td>
        </tr>
        <tr>
          <td align="center" class="td_50" style="height:150px;"><p><strong>正在完成支付操作……</strong></p>
            <p>操作成功请点击“完成支付操作”按钮</p></td>
        </tr>
        <tr>
          <td align="center" class="td_50"><input type="button" name="Submit6" value="完成支付操作" onClick="completed()"> <input type="button" name="Submit6" value="关闭窗口" onClick="closed()"></td>
        </tr>
  </table>
</div>
<form name="myform" action="<%=EL_PayOnline.FormAction%>" method="post" onSubmit="dosubmit(this)" target="_blank">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td align="center"><table width="500" border="0" cellpadding="0" cellspacing="1" class="Border">
      <tr>
        <td colspan="2" align="center" class="top_26"><strong>在 线 支 付 (第二步) </strong></td>
      </tr>
      <tr>
        <td align="right" class="td_ItemName">订单类型:</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -