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

📄 addmoney.asp

📁 一套开源WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		Exit Sub
	End If
	If Not IsNumeric(Request.Form("paytype")) Then
		Founderr = True
		ErrMsg = ErrMsg + "<li>请选择支付方式!</li>"
		Exit Sub
	End If
	If Trim(Request.Form("OrderForm")) = Empty Then
		Founderr = True
		ErrMsg = ErrMsg + "<li>你的定单号错误!</li>"
		Exit Sub
	End If
	If Not Newasp.CodeIsTrue() Then
		ErrMsg = ErrMsg + "<meta http-equiv=refresh content=""2;URL=addmoney.asp""><li>验证码校验失败,请返回刷新页面再试。两秒后自动返回</li>"
		Session("BankPayCode") = ""
		Founderr = True
		Exit Sub
	End If
	Session("GetCode") = ""
	Set Rs = Newasp.Execute("SELECT id FROM NC_AddMoney WHERE OrderForm='"& Newasp.CheckBadstr(Request.Form("OrderForm")) &"'")
	If Not (Rs.BOF And Rs.EOF) Then
		ErrMsg = ErrMsg + "<li>您已经提交了表单,请不要重复提交!!!</li>"
		Session("BankPayCode") = ""
		Founderr = True
		Set Rs = Nothing
		Exit Sub
	End If
	Set Rs = Nothing
	Dim strpaytype
	Select Case CInt(Request.Form("paytype"))
	Case 0
		strpaytype = "银行汇款"
	Case 1
		strpaytype = "在线支付"
	Case 2
		strpaytype = "邮局汇款"
	Case 3
		strpaytype = "上门交费"
	Case Else
		strpaytype = "其它汇款"
	End Select
	If CInt(Request.Form("paytype")) = 1 Then
		
		Call Web_Payment
	Else
		If Founderr = True Then Exit Sub
		Set Rs = Server.CreateObject("ADODB.Recordset")
		SQL = "SELECT * FROM NC_AddMoney WHERE (id is null)"
		Rs.Open SQL,Conn,1,3
		Rs.AddNew
			Rs("userid").Value = Newasp.memberid
			Rs("username").Value = Newasp.membername
			Rs("title").Value = Newasp.CheckBadstr(Request.Form("title"))
			Rs("OrderForm").Value = Newasp.CheckBadstr(Request.Form("OrderForm"))
			Rs("addmoney").Value = CCur(Request.Form("addmoney"))
			Rs("addtime").Value = Now()
			Rs("readme").Value = Newasp.CheckBadstr(Request.Form("readme"))
			Rs("paytype").Value = strpaytype
			Rs("finished").Value = 0
			Rs("deletion").Value = 0
		Rs.Update
		Rs.Close:Set Rs = Nothing
		Call Returnsuc("<li>恭喜您!充值信息提交成功。</li>")
	End If
	
End Sub

Sub Web_Payment()
	
	Response.Write "<table cellspacing=1 align=center cellpadding=3 border=0 class=Usertableborder>"
	Response.Write "	<tr>"
	Response.Write "		<th colspan=2>确认在线支付信息</th>"
	Response.Write "	</tr>"
	Response.Write "	<tr>"
	Response.Write "		<td class=Usertablerow1 align=right><b>用户名称:</b></td>"
	Response.Write "		<td class=Usertablerow1>" & Newasp.membername & "</td>"
	Response.Write "	</tr>"
	Response.Write "	<tr>"
	Response.Write "		<td class=Usertablerow1 align=right><b>定单号:</b></td>"
	Response.Write "		<td class=Usertablerow1><font color=red>" & Trim(Request.Form("OrderForm")) & "</font></td>"
	Response.Write "	</tr>"
	Response.Write "	<tr>"
	Response.Write "		<td class=Usertablerow1 align=right><b>实际支付金额:</b></td>"
	Response.Write "		<td class=Usertablerow1>¥ " & Newasp.ReadPayMoney(Request.Form("addmoney"),0) & " 元</td>"
	Response.Write "	</tr>"
	Response.Write "	<tr>"
	Response.Write "		<td class=Usertablerow1 colspan=2>&nbsp;&nbsp;<font color=blue>如果以上信息正确,请您前往在线支付平台交费。</font></td>"
	Response.Write "	</tr>"
	Response.Write "	<tr align=center>"
	Response.Write "		<td class=Usertablerow2 colspan=2>"
	Dim wp
	Set wp = New WebPayment_Cls
	wp.PayPlatform = CInt(Newasp.StopBankPay)
	wp.Paymentid = Trim(strChinaeBank(0))
	wp.Paymentkey = Trim(strChinaeBank(1))
	wp.Percent = Newasp.CheckNumeric(strChinaeBank(2))
	wp.Returnurl = Newasp.GetSiteUrl &"/user/receive.asp"
	wp.Orderid = Newasp.CheckBadstr(Request.Form("OrderForm"))
	wp.Paymoney = Newasp.CheckNumeric(Request.Form("addmoney"))
	wp.Consignee = MemberName
	wp.Consigner = MemberName
	wp.Email = MemberEmail
	wp.Address = Newasp.SiteUrl
	wp.PaymentPlatform
	Select Case CInt(wp.ErrNumber)
	Case 1
		ErrMsg = wp.Description
		Founderr = True
	Case 2
		ErrMsg = wp.Description
		Founderr = True
	Case 6
		ErrMsg = wp.Description
		Founderr = True
	Case 8
		ErrMsg = wp.Description
		Founderr = True
	End Select
	Set wp = Nothing
	Response.Write "</td>"
	Response.Write "	</tr>"
	Response.Write "</table>"
	If Founderr = True Then Exit Sub
End Sub

Sub showCardPay()
%><br>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="Usertableborder">
<tr>
	<th colspan="2">购买充值卡</th>
</tr>
<tr>
	<td class="Usertablerow2"><b>点卡充值</b> - 适合于计点会员</td>
	<td class="Usertablerow2"><b>包月卡充值</b> - 适合于计时会员</td>
</tr>
<tr>
	<form name="cardform1" method="post" action="usercard.asp?action=add&type=0">
	<td class="Usertablerow1" width="50%"><%
	Call ShowPointCard()
	%></td>
	</form>
	<form name="cardform2" method="post" action="usercard.asp?action=add&type=1">
	<td class="Usertablerow1" width="50%"><%
	ShowMonthCard()
	%></td>
	</form>
</tr>
<tr>
	<td class="Usertablerow1"></td>
	<td class="Usertablerow1"></td>
</tr>
</table>

<%
End Sub

Sub ShowPointCard()
	SQL = "SELECT TOP 20 CardID,CardMark,UseDayNum,CardMoney,addPoint FROM [NC_Card] WHERE CardType=0 And IsConsume=0 And UserGroup="& UserGroup &""
	If IsSqlDataBase = 1 Then
		SQL = SQL & " ORDER BY newid()"
	Else
		SQL = SQL & " ORDER BY  rnd(CardID)"
	End If
	Set Rs = Server.CreateObject("ADODB.Recordset")
	Rs.Open SQL,Conn,1,1
	If Not (Rs.BOF And Rs.EOF) Then
		i = 0
		Do While Not Rs.EOF
			If i = 0 Then
				Response.Write "<input type=""radio"" name=""carid"" value=""" & Rs(0) & """ checked>" & vbNewLine
			Else
				Response.Write "<input type=""radio"" name=""carid"" value=""" & Rs(0) & """>" & vbNewLine
			End If
			Response.Write " 点数:"
			Response.Write Rs("addPoint")
			Response.Write " - 面值:"
			Response.Write FormatCurrency(Rs("CardMoney"),2,-1)
			Response.Write " 元<br>" & vbNewLine
			Rs.movenext
			i = i + 1
		Loop
		Response.Write "<input type=""submit"" name=""B1"" class=""buttom"" value=""购点卡下一步"">" & vbNewLine
	End If
	Rs.Close:Set Rs = Nothing
End Sub

Sub ShowMonthCard()
	SQL = "SELECT TOP 20 CardID,CardMark,UseDayNum,CardMoney,addPoint FROM [NC_Card] WHERE CardType=1 And IsConsume=0 And UserGroup="& UserGroup &""
	If IsSqlDataBase = 1 Then
		SQL = SQL & " ORDER BY newid()"
	Else
		SQL = SQL & " ORDER BY  rnd(CardID)"
	End If
	Set Rs = Server.CreateObject("ADODB.Recordset")
	Rs.Open SQL,Conn,1,1
	If Not (Rs.BOF And Rs.EOF) Then
		i = 0
		Do While Not Rs.EOF
			If i = 0 Then
				Response.Write "<input type=""radio"" name=""carid"" value=""" & Rs(0) & """ checked>" & vbNewLine
			Else
				Response.Write "<input type=""radio"" name=""carid"" value=""" & Rs(0) & """>" & vbNewLine
			End If
			Response.Write " 点数:"
			Response.Write Rs("addPoint")
			Response.Write " - 时长:"
			Response.Write Rs("UseDayNum")
			Response.Write "天 - 面值:"
			Response.Write FormatCurrency(Rs("CardMoney"),2,-1)
			Response.Write "<br>" & vbNewLine
			Rs.movenext
			i = i + 1
		Loop
		Response.Write "<input type=""submit"" name=""B2"" class=""buttom"" value=""购包月卡下一步"">" & vbNewLine
	End If
	Rs.Close:Set Rs = Nothing
End Sub
%>
<!--#include file="foot.inc"-->

⌨️ 快捷键说明

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