<%
'**************************************
'* 最后更新 2013-10-17 by 56770.kingdge
'* Copyright www.56770.com
'**************************************
strwebtitle = Lebi_word(59) &" - "
sitename = site_name
Showpath = "<a href='"& Eshop_url & LangPath &"'>"& Lebi_word(0) &"</a> → "& Lebi_word(59) &""
IsView = 1
Function query_main()
        Dim order_number,sql,Total_money
        order_number=safereplace(Trim(request("order_number")))
        query_main = "<div class=""myuserinfo"">"
		If order_number = "" Then
				query_main = query_main &"<h2>"& Lebi_word(59) &"</h2>"
				query_main = query_main &"<form name=""form"" method=""post"" action=""?"">"
				query_main = query_main &"<table cellpadding='0' cellspacing='1' align='center'><tr><th>"& Lebi_cart(86) &"</th><td class='list2'><input name=""order_number"" size=""15"" class=""form"" onMouseOver=""this.focus()"" onBlur=""if (value ==''){value='"& Lebi_word(57) &"'}"" onFocus=""this.select()"" onClick=""if(this.value=='"& Lebi_word(57) &"')this.value=''"" value="""& Lebi_word(57) &"""></td></tr>"
				query_main = query_main &"<tr><td height='30' colspan='2' class='list' align='left'><INPUT TYPE=""submit"" name=""submit"" value="""& Lebi_word(58) &""" title="""& Lebi_word(58) &""" class=""button""></td></tr></table>"
				query_main = query_main &"</form>"
		Else
				query_main = query_main &"<h2>"& Lebi_user(161) &"</h2><table cellpadding='0' cellspacing='1' align='center'>"
				sql="select * from [Lebi_orders] where order_number='"&order_number&"'"
				set rs = conn.execute(sql)
				If rs.eof Then
						query_main = query_main &"<tr><td class='list2' align='center'>"& Lebi_word(6) &"</td></tr>"
				Else
						If rs("user_id") <> "" Then 
								If Lebi_UserId ="" Then
										response.redirect Eshop_url & PagePath(1) &"?action=needlogin&HTTP_REFERER="& server.urlencode(GetFileUrl())
										response.End
								Else
										If CStr(rs("user_id")) <> CStr(Lebi_UserId) Then 
												IsView = 0
										End If 
								End If
						End If 
						If IsView = 0 Then 
								query_main = query_main &"<tr><td class='list2' align='center'>"& Lebi_word(6) &"</td></tr>"
						Else 
						coupon_price = checknum(rs("coupon_price"),0)
						Total_money = rs("dis_sum")+rs("fei")+rs("packing_price")-coupon_price
						If Config_Lebi_Eshop(2)="1" Then
								Total_money = Total_money + rs("fapiao_money")
						End If
						query_main = query_main &"<tr><th>"& Lebi_cart(86) &"：</th><td class='list2'>"& rs("order_number") &" <input type=""button"" value="""& Lebi_cart(105) &""" ONCLICK=""window.open('"& PagePath(21) &"?order_id="& rs("id") &"','Sample','toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=no,copyhistory=yes,width=550,height=600,left=100,top=100')"" class=""button"" /></td><th>"& Lebi_cart(87) &"：</th><td class='list2'>"& rs("order_time") &"</td></tr>"
						query_main = query_main &"<tr><th>"& Lebi_cart(113) &"：</th><td class='list2' colspan='3'>"
						query_main = query_main &""& Lebi_cart(114) &"："
						If Instr(rs("orderzt"),1)>0 Then
								query_main = query_main &"<font color=""#ff0000"">√</font>"
						Else
								query_main = query_main &"×"
						End If
						query_main = query_main &"&nbsp;&nbsp;"& Lebi_cart(115) &"："
						If Instr(rs("orderzt"),2)>0 Then
								query_main = query_main &"<font color=""#ff0000"">√</font>"
						Else
								query_main = query_main &"×"
						End If
						query_main = query_main &"&nbsp;&nbsp;"& Lebi_cart(116) &"："
						If Instr(rs("orderzt"),3)>0 Then
								query_main = query_main &"<font color=""#ff0000"">√</font>"
						Else
								query_main = query_main &"×"
						End If
						query_main = query_main &"&nbsp;&nbsp;"& Lebi_cart(117) &"："
						If Instr(rs("orderzt"),4)>0 then
								query_main = query_main &"<font color=""#ff0000"">√</font>"
						Else
								query_main = query_main &"×"
						End If
						query_main = query_main &"&nbsp;&nbsp;"& Lebi_cart(118) &"："
						If Instr(rs("orderzt"),5)>0 Then
								query_main = query_main &"<font color=""#ff0000"">√</font>"
						Else
								query_main = query_main &"×"
						End If
						query_main = query_main &"</td></tr>"
						query_main = query_main &"<tr><th>"&  Lebi_cart(80) &"：</th><td class='list2' colspan='3'><span style=""color:#FF0000;font-size:18px;font-weight:bold;"">"& dw & FormatNumber2(Total_money/moneyhl) & dw2 &"</span> = "& Lebi_cart(77) &"："& dw & FormatNumber2(rs("dis_sum")/moneyhl) & dw2 &" + "& Lebi_cart(78) &"："& dw & FormatNumber2(rs("fei")/moneyhl) & dw2 &""
						If Config_Lebi_Eshop(2)="1" And rs("fapiao_money")>0 Then query_main = query_main &" + "& Lebi_cart(79) &"："& dw & FormatNumber2(rs("fapiao_money")/moneyhl) & dw2 End If
						If rs("packing_price")>0 Then query_main = query_main &" + "& Lebi_cart(164) &"："& dw & FormatNumber2(rs("packing_price")/moneyhl) & dw2
						if coupon_price > 0 Then query_main = query_main &" <font color=""#ff0000"">- "& Lebi_cart(138) &"："& dw & FormatNumber2(coupon_price/moneyhl) &"</font>"
						if rs("paidmoney") > 0 And CDbl(rs("paidmoney")) < CDbl(Total_money) Then query_main = query_main &" <font color=""#ff0000"">（"& Lebi_cart(115) &"："& dw & FormatNumber2(rs("paidmoney")/moneyhl) & dw2 &"）</font>"
						query_main = query_main &"</td></tr>"
						query_main = query_main &"<tr><th>"& Lebi_cart(48) &"：</th><td class='list2'>"& rs("paymenttype") &"</td><th>"& Lebi_cart(49) &"：</th><td class='list2'>"& rs("sendtype") &"</td></tr>"
						Dim ship_name,ship_no,ship_date,ship_fei1
						Set shipdb = conn.execute("select s_name,s_no,s_date,s_fei1 from Lebi_ShipMes where s_order_number = '"& order_number &"'")
						If Not shipdb.eof Then
								ship_name = shipdb(0)
								ship_no = shipdb(1)
								ship_date = shipdb(2)
								ship_fei1 = dw & FormatNumber2(shipdb(3)) & dw2
								query_main = query_main &"<tr><th>"& Lebi_cart(189) &"：</th><td class='list2'>"& ship_name &"</td><th>"& Lebi_cart(190) &"：</th><td class='list2'>"& ship_no &"</td></tr>"
								If Split(sys_kuaidi100,"|")(0) = "1" Then 
								Set rsdeliver = conn.execute("select deliver_code from [Lebi_deliver] where deliver_name"& LangTxt &" = '"& shipdb(0) &"'")
								If Not rsdeliver.eof Then 
									query_main = query_main &"<tr><th></th><td class='list2' colspan=""3"">"
									If InStr("|ems|,|shentong|,|shunfeng|,|youzhengguonei|","|"& rsdeliver(0) &"|") > 0 Then 
										query_main = query_main &"<form>"& Lebi_user(21) &"：<input name=""valicode"" type=""text"" id=""valicode"" size=""5"" class=""form"" /> <img src=""http://api.kuaidi100.com/verifyCode?id="& Split(sys_kuaidi100,"|")(1) &"&com="& rsdeliver(0) &""" align=""absmiddle"" /> <input type=""submit"" name=""submit"" value="""& Lebi_word(48) &""" class=""button"" /><input type=""hidden"" name=""id"" value="""& id &""" /><input type=""hidden"" name=""action"" value=""views"" /></form>"
									End If 
									query_main = query_main & Kuadi100API(rsdeliver(0),shipdb(1),request("valicode")) &"</td></tr>"
								End If 
								rsdeliver.close : Set rsdeliver = Nothing
								End If 
								query_main = query_main &"<tr><th>"& Lebi_cart(191) &"：</th><td class='list2'>"& ship_date &"</td><th>"& Lebi_cart(192) &"：</th><td class='list2'>"& ship_fei1 &"</td></tr>"
						end If
						shipdb.close : Set shipdb = Nothing
						If Trim(rs("fuyan")) <> "" Then
								query_main = query_main &"<tr><th>"& Lebi_cart(158) &"：</th><td class='list2' colspan='3'>"& rs("fuyan") &"</td></tr>"
						End If
						query_main = query_main &"</table>"
'						query_main = query_main &"<tr><td colspan='4' class='listright' height='35'><input type=""button"" name=""paybuyusermoney"" value="""& Lebi_cart(103) &""" ONCLICK=""window.open('" & PagePath(20) &"?order_number="& rs("order_number")&"', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=50,left=100,top=100')"" class=""button""></td></tr>"
						query_main = query_main &"<h2>"& Lebi_word(9) &"：</h2><table cellpadding='0' cellspacing='1' align='center' style='TABLE-LAYOUT: fixed; WORD-BREAK: break-all; border-collapse: collapse'>"
						query_main = query_main &"<td class='list2' style='word-break:break-all;'>"
						rem 在线支付模块
						Dim payprice : payprice = formatnumber2((rs("dis_sum")+rs("fei")+rs("fapiao_money")+rs("packing_price")-rs("paidmoney")-coupon_price)/moneyhl)
						If Pay_chinabank(0)=1 And InStr(Pay_chinabank(11),LangName)>0 Then
								If Pay_chinabank(7) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=4&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_chinabank(7) &"' alt='"& Pay_chinabank(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=4&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_chinabank(4) &"&remark1="& LangPath &"|');"" value='"& Pay_chinabank(10) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_alipay(0)=1 And InStr(Pay_alipay(13),LangName)>0 Then
								If Pay_alipay(9) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=1&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_alipay(9) &"' alt='"& Pay_alipay(12) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=1&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_alipay(6) &"&extra_common_param="& LangPath &"|');"" value='"& Pay_alipay(12) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_paypal(0)=1 And InStr(Pay_paypal(11),LangName)>0 Then
								If Pay_paypal(5) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&CurrencyCode="& paypal_currency_code &"&paypal_currency_code="& Pay_paypal(7) &"&custom="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_paypal(5) &"' alt='"& Pay_paypal(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=3&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paypal_currency_code="& paypal_currency_code &"&paybackurl="& Pay_paypal(7) &"&custom="& LangPath &"|');"" value='"& Pay_paypal(10) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_paypal_cn(0)=1 And InStr(Pay_paypal_cn(11),LangName)>0 Then
								If Pay_paypal_cn(5) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=7&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_paypal_cn(7) &"&custom="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_paypal_cn(5) &"' alt='"& Pay_paypal_cn(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=7&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& paypal_cn_url &"&custom="& LangPath &"|');"" value='"& Pay_paypal_cn(10) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_bill(0)="1" And InStr(Pay_bill(10),LangName)>0 Then
								If Pay_bill(6) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=2&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_bill(6) &"' alt='使用快钱支付付款' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=2&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_bill(3) &"&ext1="& LangPath &"|');"" value='使用快钱支付付款' class='button'>&nbsp;"
								End If
						End If
						If Pay_tenpay(0)="1" And InStr(Pay_tenpay(11),LangName)>0 Then
								If Pay_tenpay(7) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=5&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_tenpay(4) &"&Pay_tenpay_attach="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_tenpay(7) &"' alt='"& Pay_tenpay(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=5&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_tenpay(4) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay(10) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_tenpay2(0)="1" And InStr(Pay_tenpay2(11),LangName)>0 Then
								If Pay_tenpay2(7) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=6&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_tenpay2(4) &"&Pay_tenpay_attach="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_tenpay2(7) &"' alt='"& Pay_tenpay2(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=6&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_tenpay2(4) &"&Pay_tenpay_attach="& LangPath &"|');"" value='"& Pay_tenpay2(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
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=8&pro_id=0&subject="&trim(rs("order_number")) &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_ips(4) &"&attach="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_ips(7) &"' alt='"& Pay_ips(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=8&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_ips(4) &"&attach="& LangPath &"|');"" value='"& Pay_ips(10) &"' class='button'>&nbsp;"
								End If
						End If
						If Pay_baofu(0)=1 And InStr(Pay_baofu(11),LangName)>0 Then
								If Pay_baofu(7) <> "" Then
										query_main = query_main &"<a href='"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=9&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|' target='_blank'><img src='"& Eshop_url & Pay_baofu(7) &"' alt='"& Pay_baofu(10) &"' border='0' align='absmiddle'></a>&nbsp;"
								Else
										query_main = query_main &"<input type='button' onclick=""window.open('"& Eshop_url &"plus/Onlinepay.asp?pay_page=2&pay_type=9&pro_id=0&subject="& rs("order_number") &"&trade_no="& rs("order_number") &"&price="& payprice &"&md5char="& md5(payprice) &"&paybackurl="& Pay_baofu(4) &"&AdditionalInfo="& LangPath &"|');"" value='"& Pay_baofu(10) &"' class='button'>&nbsp;"
								End If
						End If
						query_main = query_main &"</td></tr></table>"
						If sys_soft = 0 Then 
						query_main = query_main &"<h2>"& Lebi_cart(41) &"</h2><table cellpadding='0' cellspacing='1' align='center'>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(42)&"：</th>"&_
								"     <td class='list2'>"&rs("to_name")&"</td>"&_
								"     <th>"&Lebi_cart(43)&"：</th>"&_
								"     <td class='list2'>"&rs("to_tel")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(143)&"：</th>"&_
								"     <td class='list2'>"&rs("to_tel2")&"</td>"&_
								"     <th>"&Lebi_cart(45)&"：</th>"&_
								"     <td class='list2'>"&rs("to_zip")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(46)&"：</th>"&_
								"     <td colspan='3' class='list2'>"&rs("to_adds")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(47)&"：</th>"&_
								"     <td colspan='3' class='list2'>"&rs("to_other")&"</td>"&_
								"   </tr>"&_
								"   <tr></table>"
						query_main = query_main &"<h2>"& Lebi_cart(141) &"</h2><table cellpadding='0' cellspacing='1' align='center'>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(142)&"：</th>"&_
								"     <td class='list2'>"&rs("from_name")&"</td>"&_
								"     <th>"&Lebi_cart(43)&"：</th>"&_
								"     <td class='list2'>"&rs("from_tel")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(44)&"：</th>"&_
								"     <td class='list2'>"&rs("from_email")&"</td>"&_
								"     <th>"&Lebi_cart(45)&"：</th>"&_
								"     <td class='list2'>"&rs("from_zip")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_user(207)&"：</th>"&_
								"     <td class='list2'>"&rs("from_mobile")&"</td>"&_
								"     <th>"&Lebi_cart(144)&"：</th>"&_
								"     <td class='list2'>"&rs("from_adds")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(47)&"：</th>"&_
								"     <td colspan='3' class='list2'>"&rs("from_other")&"</td>"&_
								"   </tr></table>"
						Else
						from_tel = rs("from_tel")
						If InStr(from_tel,",") = 0 Then from_tel = from_tel &",,"
						query_main = query_main &"<h2>"& Lebi_cart(141) &"</h2><table cellpadding='0' cellspacing='1' align='center'>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(142)&"：</th>"&_
								"     <td class='list2'>"&rs("from_name")&"</td>"&_
								"     <th>"&Lebi_user(207)&"：</th>"&_
								"     <td class='list2'>"&rs("from_mobile")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(144)&"：</th>"&_
								"     <td colspan='3' class='list2'>"&rs("from_adds")&" "&rs("from_adds2")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_user(211)&"：</th>"&_
								"     <td class='list2'>"&rs("from_city")&"</td>"&_
								"     <th>"&Lebi_user(212)&"：</th>"&_
								"     <td class='list2'>"&rs("from_state")&"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(45)&"：</th>"&_
								"     <td class='list2'>"&rs("from_zip")&"</td>"&_
								"     <th>"&Lebi_user(213)&"：</th>"&_
								"     <td class='list2'>"
						Set country = conn.execute("Select area_name from [lebi_deliver_area] where id = "& checknum(rs("from_country"),0) &"")
						If Not country.eof Then
							query_main = query_main & Country(0)
						End If
						country.close : Set country = Nothing
						query_main = query_main &"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(44)&"：</th>"&_
								"     <td class='list2'>"&rs("from_email")&"</td>"&_
								"     <th>"&Lebi_cart(43)&"：</th>"&_
								"     <td class='list2'>("& Split(from_tel,",")(0) &")."& Split(from_tel,",")(1) &"."& Split(from_tel,",")(2) &"</td>"&_
								"   </tr>"&_
								"   <tr>"&_
								"     <th>"&Lebi_cart(47)&"：</th>"&_
								"     <td colspan='3' class='list2'>"&rs("from_other")&"</td>"&_
								"   </tr></table>"
						End If 
						If rs("iffapiao")=1 Then
								query_main = query_main &"<h2>"& Lebi_cart(52) &"</h2><table cellpadding='0' cellspacing='1' align='center'>"
								query_main = query_main &"<tr><th>"& Lebi_cart(54) &"：</th><td class='list2'>"& rs("fapiao_company") &"</td></tr>"
								query_main = query_main &"<tr><th>"& Lebi_cart(55) &"：</th><td class='list2'>"& rs("fapiao_adds") &"</td></tr>"
								query_main = query_main &"<tr><th>"& Lebi_cart(45) &"：</th><td class='list2'>"& rs("fapiao_zip") &"</td></tr></table>"
						End If
				query_main = query_main &"<div class=""basketlist"">"
				Dim sqlGift,RsGift
				sqlGift="select b.*,p.pic from [Lebi_basket] as b,[lebi_vipproduct] as p where b.id = p.id and b.order_number="&rs("id")&" and b.IsGift=1"
		'        If IsSqlDataBase = 1 Then sqlGift=sqlGift&" and datediff(s,basket_date,'"&rs("order_time")&"')<172800"
		'        If IsSqlDataBase = 0 Then sqlGift=sqlGift&" and datediff('h',basket_date,'"&rs("order_time")&"')<48"
				set RsGift = conn.execute(sqlGift)
				If Not RsGift.eof Then
						query_main = query_main &"<table cellpadding='0' cellspacing='1' align='center'><tr><th style=""width:64%"" align='center' class='headmenu'>"& Lebi_gift(0) &"</th><th style=""width:12%"" class='headmenu'>"& Lebi_gift(1) &"</th><th style=""width:12%"" align='center' class='headmenu'>"& Lebi_gift(6) &"</th><th style=""width:12%"" align='center' class='headmenu'>"& Lebi_gift(7) &"</th></tr>"
						Do While Not RsGift.eof
						query_main = query_main &"<tr class='list'><td class='list'><table cellpadding=""0"" cellspacing=""0"" style=""margin:5px 0; padding:0""><tr><td width=""50""><div class=""pro-pic""><img src=""../"& RsGift("pic") &""" width=""45"" /></div></td><td valign=""top"">"& RsGift("product_name") &"</td></tr></table></td><td align='center' class='list'>"& RsGift("price") &"</td><td align='center' class='list'>"& RsGift("basket_count") &"</td><td align='center' class='list'>"& RsGift("price")*RsGift("basket_count") &"</td></tr>"
						RsGift.movenext
						Loop
						query_main = query_main &"</table>"
				End If
				RsGift.close : Set RsGift = Nothing

				Dim SqlPro,RsPro,rss,sqls
				SqlPro="select b.*,p.pic from [Lebi_Basket] as b,[lebi_product] as p where b.id = p.id and b.order_number="& rs("id") &" and b.IsGift=0 order by b.id desc"
		'        If IsSqlDataBase = 1 Then SqlPro=SqlPro&" and datediff(s,basket_date,'"&rs("order_time")&"')<172800 order by basket_date desc"
		'        If IsSqlDataBase = 0 Then SqlPro=SqlPro&" and datediff('h',basket_date,'"&rs("order_time")&"')<48 order by basket_date desc"
				Set RsPro = conn.execute(SqlPro)
				If Not Rspro.eof Then
						query_main = query_main &"<table cellpadding='0' cellspacing='1' align='center'><tr><th style=""width:15%"" align='center' class='headmenu'>"& Lebi_cart(33) &"</th><th style=""width:55%"" class='headmenu'>"& Lebi_cart(17) &"</th>"
						query_main = query_main &"<th style=""width:10%"" align='center' class='headmenu'>"& Lebi_cart(21) &"</th><th style=""width:10%"" align='center' class='headmenu'>"& Lebi_cart(22) &"</th><th style=""width:10%"" align='center' class='headmenu'>"& Lebi_cart(23) &"</th></td></tr>"
						do while not RsPro.eof
						query_main = query_main &"<tr class='list'><td align='center' class='list'>"& RsPro("bianhao") &"</td>"
						query_main = query_main &"<td class='list'><table cellpadding=""0"" cellspacing=""0"" style=""margin:5px 0; padding:0""><tr><td width=""50""><div class=""pro-pic""><img src="""& Eshop_url & PicPath &"/"& RsPro("pic") &""" width=""45"" /></div></td><td valign=""top""><a target='_blank' href='"& Eshop_url &""
						If Rspro("product_type") = "unite" Then
		'						Select Case show_html
		'							   Case "0"
											Select Case ISAPI_Rewrite
												   Case "0" query_main = query_main & PagePath(8) &"?id="& RsPro("id")
												   Case "1" query_main = query_main & LangPath &"unite_show-"& RsPro("id")	&".html"
											End Select
		'							   Case "1" query_main = query_main & LangPath & Folder(9) & RsPro("id") &".1.html"
		'						End Select
								query_main = query_main &"'>"& RsPro("product_name") &"</a>"
								query_main = query_main &"<br/>("& Lebi_pro_unite(6) &"："
								Set Unite = conn.execute("select product_unite_info from [Lebi_product_unite] where id = "& RsPro("id") &"")
								child_arr = Split(Unite(0),"||||")
								Unite.close : Set Unite = Nothing
								for j=0 to ubound(child_arr)  ' 捆绑子商品循环
										sArr = Split(child_arr(j),"||")
										If UBound(sArr) > 3 Then
		'										Select Case show_html
		'											   Case "0"
															Select Case ISAPI_Rewrite
																   Case "0"
																		Select Case Config_Lebi_Eshop(16)
																			   Case "0" : child_url = "showproduct.asp?id="& sArr(0)
																			   Case "1" : child_url = "product/?id="& sArr(0)
																			   Case "2" : child_url = "product/default.asp?id="& sArr(0)
																		End Select
																   Case "1" child_url = "product-"& sArr(0) &".html"
															End Select
		'											   Case "1" : child_url= Folder(0) & sArr(0) &".1.html"
		'										End Select
												query_main = query_main &"<a target='_blank' href='"& Eshop_url & LangPath & child_url &"'>"& sArr(2) &"</a> × "& sArr(4)
												If j < ubound(child_arr) Then query_main = query_main &" + "
										End If
								Next
								query_main = query_main &")"
						Else
		'						Select Case show_html
		'							   Case "0"
											Select Case ISAPI_Rewrite
												   Case "0" query_main = query_main & PagePath(10) &"?id="& RsPro("id")
												   Case "1" query_main = query_main & LangPath &"product-"& RsPro("id")	&".html"
											End Select
		'							   Case "1" query_main = query_main & LangPath & Folder(0) & RsPro("id") &".1.html"
		'						End Select
								query_main = query_main &"'>"& RsPro("product_name") &"</a>"
								If RsPro("spname") <> "" Then 
										query_main = query_main &"<br/><em>"
										If InStr(RsPro("spname"),",") > 0 Then 
												arr_spname = Split(RsPro("spname"),",")
												arr_spvalue = Split(RsPro("spvalue"),",")
												For s = 0 To UBound(arr_spname)
														query_main = query_main & arr_spname(s) &"："& arr_spvalue(s)
														If s < UBound(arr_spname) Then query_main = query_main &"&nbsp;&nbsp;"
												Next 
										Else
												query_main = query_main & RsPro("spname") &"："& RsPro("spvalue")
										End If 
										query_main = query_main &"</em>"
								End If 
						End If
						query_main = query_main &"</td></tr></table></td>"
						query_main = query_main &"<td align='center' class='list'>"& FormatNumber2(RsPro("price")/moneyhl) &"</td>"
						query_main = query_main &"<td align='center' class='list'>"& RsPro("basket_count") &"</td>"
						query_main = query_main &"<td align='center' class='list'>"& FormatNumber2(RsPro("price")*RsPro("basket_count")/moneyhl) &"</td></tr>"
						rspro.movenext
						Loop
				End If
				RsPro.close : set RsPro=Nothing
				End If
				End If 
		End If
		query_main = query_main &"</table></div>"
End Function
Dim other_main
other_main = query_main
%>