<%
'**************************************
'* 最后更新 2013-10-17 by 56770.kingdge
'* Copyright www.56770.com
'*************************************
Dim action,tmpstr,other_main
strwebtitle = Lebi_word(9) &"-"
sitename = site_name
description = Replace(trim(Sys_description),chr(13),"")
keywords = Replace(trim(Sys_keywords),chr(13),"")
Showpath = "<a href='"& Eshop_url & LangPath &"'>"& Lebi_word(0) &"</a> → "& Lebi_word(9) &""
action = request("action")

If action = "" Then
        tmpstr = "<script language=""javascript"">maxLen = 200; function checkMaxInput(form) {if (document.getElementById('fuyan').value.length > maxLen) document.getElementById('fuyan').value = document.getElementById('fuyan').value.substring(0, maxLen);else document.getElementById('remLen').value = maxLen - document.getElementById('fuyan').value.length;}</script>"&_
        "<form name=""wqform"" action=""?action=paysave"" method=""post"">"&_
        "<div class=""otherbox""><table cellspacing=""1"" cellpadding=""0"" width=""100%"">"&_
        "<tr>"&_
		"   <th>"& Lebi_user(123) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" class=""form"" size=""10"" maxlength=""10"" name=""l_price"" />&nbsp;<font color=""#FF0000"">*</font></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(21) &"：</th>"&_
		"   <td class=""list2""><input name=""verifycode"" type=""text"" id=""verifycode"" size=""10"" maxlength=""4""  class=""form"" />&nbsp;<img src="""& Eshop_url & Codepath &""" title="""& Lebi_user(21) &""">&nbsp;<font color=""#FF0000"">*</font></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_cart(153) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" class=""form"" maxlength=""50"" size=""15"" name=""l_username"" />&nbsp;<font color=""#FF0000""> *</font></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(19) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" value='"& Lebi_UserId &"' class=""form"" maxlength=""50"" size=""15"" name=""l_userid"" /></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(43) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" class=""form"" maxlength=""50"" size=""15"" name=""l_usertel"" /></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(48) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" class=""form"" maxlength=""100"" size=""35"" name=""l_useradds"" /></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(50) &"：</th>"&_
		"   <td class=""list2""><input type=""text"" class=""form"" maxLength=""10"" size=""15"" name=""l_userzip"" /></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <th>"& Lebi_user(124) &"：</th>"&_
		"   <td class=""list2""><textarea id=""fuyan"" name=""fuyan"" wrap=""physical"" cols=""40"" rows=""6"" onKeyDown=""checkMaxInput(this.form)"" onKeyUp=""checkMaxInput(this.form)"" class=""form-textarea""></textarea>&nbsp;<input class=""form"" readonly type=""text"" id=""remLen"" name=""remLen"" size=""3"" value=""200"" /></td>"&_
		"</tr>"&_
        "<tr>"&_
		"   <td height=""25"" colspan=""2"" align=""center"" class=""list""><input type='submit' name='bt' value=' "&Lebi_word(48)&" ' class='button' />&nbsp;&nbsp;<input type='reset' name='reset' value=' "&Lebi_word(49)&" ' class='button' /></td>"&_
		"</tr></table></form>"
		other_main = tmpstr
End If

If action = "paysave" Then
        Dim verifycode,l_price,l_username,l_userid,l_usertel,l_useradds,l_userzip,fuyan,IS_error,error_type,name
        Dim yy,mm,dd,ymd,xiaoshi,fenzhong,miao,billno,order_num,order_number
        verifycode	= request.form("verifycode")
        if verifycode <> cstr(Session("verifycode"))then
                IS_error=True
                error_type = error_type &",5,"
        end If
        l_price=checknum(request.form("l_price"),0)
        l_username=safereplace(request.form("l_username"))
        l_userid=safereplace(request.form("l_userid"))
		l_usertel=safereplace(request.form("l_usertel"))
		l_useradds=safereplace(request.form("l_useradds"))
		l_userzip=safereplace(request.form("l_userzip"))
        fuyan=safereplace(request.form("fuyan"))
        '生成订单号
        yy=year(date)
        mm=right("00"&month(date),2)
        dd=right("00"&day(date),2)
        ymd=yy&mm&dd
        xiaoshi=right("00"&hour(time),2)
        fenzhong=right("00"&minute(time),2)
        miao=right("00"&second(time),2)
        BillNo=xiaoshi&fenzhong&miao
        order_num=ymd&BillNo
		If l_price = 0 Then
                IS_error=True
                error_type = error_type &",1,"
		End If
		If l_username = "" Or Len(l_username)>50 Then
                IS_error=True
                error_type = error_type &",2,"
		End If
        If IS_error=True Then
                response.redirect  Eshop_url & PagePath(1) &"?action=paysave&error_type="& error_type
				response.End
        Else
                set rs=server.createobject("adodb.recordset")
                rs.open "select * from [Lebi_pay_log]",conn,1,3
                rs.addnew
                rs("l_type") = 0
				rs("l_userid") = l_userid
				rs("l_username") = l_username
				rs("l_usertel") = l_usertel
				rs("l_useradds") = l_useradds
				rs("l_userzip") = l_userzip
				rs("l_ordernum") = order_num
				rs("l_pro_id") = 0
				rs("l_price") = l_price
				rs("l_time") = Now()
				rs("l_state") = 0
				rs("l_mes") = "[在线支付页提交] "& fuyan
                rs.update
                rs.close : set rs=nothing

                tmpstr = "<div class=""myuserinfo""><table cellspacing=""1"" cellpadding=""0"" width=""100%"">"
                tmpstr = tmpstr &"<tr><td height='60' class='list' align='center'>"
				If Pay_chinabank(0) = 1 Then
						If Pay_chinabank(7) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=4&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|' title='"& Pay_chinabank(10) &"' target='_blank'><img src='"& Eshop_url & Pay_chinabank(7) &"' alt='"& Pay_chinabank(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=4&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|');"" value='"& Pay_chinabank(10) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_alipay(0) = 1 Then
						If Pay_alipay(9) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=1&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|' title='"& Pay_alipay(12) &"' target='_blank'><img src='"& Eshop_url & Pay_alipay(9) &"' alt='"& Pay_alipay(12) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=1&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|');"" value='"& Pay_alipay(12) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_paypal(0) = 1 Then
						If Pay_paypal(5) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_paypal(7) &"&custom="& LangPath &"|' title='"& Pay_paypal(10) &"' target='_blank'><img src='"& Eshop_url & Pay_paypal(5) &"' alt='"& Pay_paypal(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_paypal(7) &"&custom="& LangPath &"|');"" value='"& Pay_paypal(10) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_bill(0) = 1 Then
						If Pay_bill(6) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=2&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|' title='"& Pay_bill(9) &"' target='_blank'><img src='"& Eshop_url & Pay_bill(6) &"' alt='"& Pay_bill(9) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=2&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|');"" value='"& Pay_bill(9) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_tenpay(0) = 1 Then
						If Pay_tenpay(7) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=5&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_tenpay(4) &"&Pay_tenpay_attach="& LangPath &"|' title='"& Pay_tenpay(10) &"' target='_blank'><img src='"& Eshop_url & Pay_tenpay(7) &"' alt='"& Pay_tenpay(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=5&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_tenpay(4) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay(10) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_tenpay2(0) = 1 Then
						If Pay_tenpay2(7) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=6&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_tenpay2(4) &"&Pay_tenpay_attach="& LangPath &"|' title='"& Pay_tenpay2(10) &"' target='_blank'><img src='"& Eshop_url & tenpay2_paymentpic &"' alt='"& Pay_tenpay2(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=6&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_tenpay2(4) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay2(10) &"' class='button'>&nbsp;"
						End If
				End If
				If Pay_paypal_cn(0) = 1 Then
						If Pay_paypal_cn(5) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_paypal_cn(7) &"&custom="& LangPath &"|' title='"& Pay_paypal_cn(10) &"' target='_blank'><img src='"& Eshop_url & Pay_paypal_cn(5) &"' alt='"& Pay_paypal_cn(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_paypal_cn(7) &"&custom="& LangPath &"|');"" value='"& Pay_paypal_cn(10) &"' class='button'>&nbsp;"
						End If
				End If
                If Pay_ips(0)="1" And InStr(Pay_ips(11),LangName)>0 Then
						If Pay_ips(7) <> "" Then
							    tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=8&pro_id=0&subject="& order_number &"&trade_no="& order_number &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_ips(4) &"' title='"& Pay_ips(10) &"&attach="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_ips(7) &"' alt='"& Pay_ips(10) &"' border='0' align='absmiddle'></a>"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=8&pro_id=0&subject="& order_number &"&trade_no="& order_number &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_ips(4) &"&attach="& LangPath &"|');"" value='"& Pay_ips(10) &"' class='button'>"
						End If
		        End If
				If Pay_baofu(0) = 1 Then
						If Pay_baofu(7) <> "" Then
								tmpstr = tmpstr &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=9&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|' title='"& Pay_baofu(10) &"' target='_blank'><img src='"& Eshop_url & Pay_baofu(7) &"' alt='"& Pay_baofu(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								tmpstr = tmpstr &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=9&pro_id=0&subject="& order_num &"&trade_no="& order_num &"&price="& l_price &"&md5char="& md5(l_price) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|');"" value='"& Pay_baofu(10) &"' class='button'>&nbsp;"
						End If
				End If
				tmpstr = tmpstr &"</td></tr></table>"
                tmpstr = tmpstr &"<table cellspacing=""1"" cellpadding=""0"" width=""100%""><tr>"&_
				"   <th>"& Lebi_user(127) &"：</th>"&_
				"   <td class=""list2"">"& order_num &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(123) &"：</th>"&_
				"   <td class=""list2"">"& dw & formatnumber2(l_price) & dw2 &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_cart(153) &"：</th>"&_
				"   <td class=""list2"">"& l_username &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(19) &"：</th>"&_
				"   <td class=""list2"">"& l_userid &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(43) &"：</th>"&_
				"   <td class=""list2"">"& l_usertel &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(48) &"：</th>"&_
				"   <td class=""list2"">"& l_useradds &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(50) &"：</th>"&_
				"   <td class=""list2"">"& l_userzip &"</td>"&_
                "</tr>"&_
                "<tr>"&_
				"   <th>"& Lebi_user(124) &"：</th>"&_
				"   <td class=""list2"">"& fuyan &"</td>"&_
                "</tr></table></div>"
        End If
        other_main = tmpstr
End If
%>