<%
'**************************************
'* 最后更新 2013-10-17 by 56770.Kingdge
'* Copyright www.56770.com
'**************************************
Dim myuser_main,sql,jifen,user_id,num1,num2,num4,num5,num6,subject,strmsg,idate,ifre,to_user
Dim ps1,ps,page,url
Dim vip,title,bank,yxq,usermoney,ifpay,shenqing
checkuser()
ShowPath = "<a href='"& Eshop_url & LangPath &"'>"& Lebi_word(0) &"</a> → <a href='"& Eshop_url & PagePath(0) &"'>"& Lebi_word(8) &"</a>"

Select Case Request("action")
       Case "dingdan" : myuser_main = myuser_orderlist : strwebtitle = Lebi_user(8) &"-" : ShowPath = ShowPath &" → "& Lebi_user(8)
       Case "views" : myuser_main = myuser_orderinfo : strwebtitle = Lebi_user(8) &"-" : ShowPath = ShowPath &" → "& Lebi_user(8)
	   Case "modi" : myuser_main = myuser_modi : strwebtitle = Lebi_user(9) &"-" : ShowPath = ShowPath &" → "& Lebi_user(9)
	   Case "msg" : myuser_main = myuser_msglist : strwebtitle = Lebi_user(10) &"-" : ShowPath = ShowPath &" → "& Lebi_user(10)
	   If request("action2") = "inbox" Then ShowPath = ShowPath &" → "& Lebi_user(104)
	   If request("action2") = "outbox" Then ShowPath = ShowPath &" → "& Lebi_user(105)
	   Case "writemsg" : myuser_main = myuser_writemsg : strwebtitle = Lebi_user(10) &"-" : ShowPath = ShowPath &" → <a href="& Eshop_url & PagePath(0) &"?action=msg>"& Lebi_user(10) &"</a> → "& Lebi_user(106)
	   Case "vip_update" : myuser_main = myuser_vipuser : strwebtitle = Lebi_user(12) &"-" : ShowPath = ShowPath &" → "& Lebi_user(12)
	   Case "change_score" : myuser_main = myuser_change_score : strwebtitle = Lebi_user(11) &"-" : ShowPath = ShowPath &" → "& Lebi_user(11)
	   Case "shenqing" : myuser_main = myuser_sqpay : strwebtitle = Lebi_user(13) &"-" : ShowPath = ShowPath &" → "& Lebi_user(13)
	   Case "shoucang" : myuser_main = myuser_collect : strwebtitle = Lebi_user(78) &"-" : ShowPath = ShowPath &" → "& Lebi_user(78)
	   Case "mingxi" : myuser_main = myuser_moneylog : strwebtitle = Lebi_user(7) &"-" : ShowPath = ShowPath &" → "& Lebi_user(7)
	   Case "lostpass" : myuser_main = myuser_lostpass : strwebtitle = Lebi_user(160) &"-" : ShowPath = ShowPath &" → "& Lebi_user(160)
	   Case "changepass" : myuser_main = myuser_changepass : strwebtitle = Lebi_user(192) &"-" : ShowPath = ShowPath &" → "& Lebi_user(192)
	   rem	<-{ 付款通知 2008-3-24 by 56770.WangLei
	   Case "payment_inform" : myuser_main = payment_inform : strwebtitle = Lebi_cart(171) &"-" : ShowPath = ShowPath &" → <a href="& Eshop_url & PagePath(0) &"?action=dingdan>"& Lebi_user(8) &"</a> → "& Lebi_cart(171)
	   Case "loginout" : LoginOut()
	   rem	}->
	   Case Else
		     strwebtitle = Lebi_word(8) &"-"
			 myuser_main = myuser_list
End Select
description = Replace(trim(Sys_description),chr(13),"")
keywords = Replace(trim(Sys_keywords),chr(13),"")

Sub LoginOut()
		Dim lasturl,orlurl,backurl
		response.cookies(cookiesname&"_user")("user_id") = ""
		response.cookies(cookiesname&"_user")("user_grade") = ""
		response.cookies(cookiesname&"_user")("cookiesid") = ""
		Response.cookies(cookiesname&"_user")("user_key") = ""
		'Response.Cookies(cookiesname&"_user").path = ""
		rem 清空JsCookie 2007-2-22 by 56770.kingdge
		Response.cookies(cookiesname&"_user"&"a")("JsCookieUserId") = ""
		Response.cookies(cookiesname&"_user"&"b")("JsCookieUserGrade") = ""
		session(cookiesname&"_user"&"user_id")=""
		session(cookiesname&"_user"&"user_grade")=""
		session(cookiesname&"_user"&"user_key") =""
		'-----------------------------------------------------------------
		'系统整合
		'-----------------------------------------------------------------
		Dim API_LEBI,API_SaveCookie,SysKey
		If API_Enable Then
				Set API_LEBI = New API_Conformity
				Md5OLD = 1
				SysKey = Md5(UserName & API_ConformKey)
				Md5OLD = 0
				API_SaveCookie = API_LEBI.SetCookie(SysKey,UserName,Password,0)
				Set API_LEBI = Nothing
				Response.Write API_SaveCookie
				If API_LogoutUrl <> "0" Then
						Response.Write "<script language=JavaScript>"
						Response.Write "setTimeout(""top.location='"& API_LogoutUrl &"'"",1000);"
						Response.Write "</script>"
				End If
		End If
		'-----------------------------------------------------------------
		lasturl=Request.ServerVariables("HTTP_REFERER")
		If session("oldUrl")="" Then
				orlurl="../"
		Else
				orlurl=session("oldUrl")
		End If
		If lasturl="" Then
				backurl=orlurl
		Else
				If InStr(LCase(lasturl),"reg/")>0 Then
						backurl=orlurl
				Else
						backurl=lasturl
				End If
		End If
		rem 如果返回地址为会员中心时，重定向到首页 2009-6-2 by 56770.kingdge
		If InStr(LCase(backurl),"user")>0 Then backurl = eshop_url & LangPath
		response.redirect backurl
End Sub

Function myuser_list()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        num1=conn.Execute("Select Count(ID) from [Lebi_orders] where user_id='"& Lebi_UserId &"' and orderzt='0'")(0)
		If IsNull(num1) Then num1 = 0
        num2=conn.Execute("Select Count(ID) from [Lebi_orders] where user_id='"& Lebi_UserId &"' and orderzt<>'0'")(0)
		If IsNull(num2) Then num2 = 0
        num4=conn.Execute("Select Count(ID) from [Lebi_action] where user_id='"& Lebi_UserId &"'")(0)
		If IsNull(num4) Then num4 = 0
        num5=conn.Execute("Select Count(ID) from [Lebi_message] where user_id='"& Lebi_UserId &"'")(0)
		If IsNull(num5) Then num5 = 0
        num6=conn.Execute("Select Count(ID) from [Lebi_message] where user_id='"& Lebi_UserId &"' and ifre=1")(0)
		If IsNull(num6) Then num6 = 0
        sql="select u.ifpay,u.logins,u.usermoney,u.jifen,u.regdate,u.lastlogintime,u.lastloginIP,g.grade_name"& LangTxt &" from [Lebi_user] as u,[Lebi_user_grade] as g where u.user_grade = g.grade_dj and u.user_id='"& Lebi_UserId &"'"
        set rs=server.createobject("ADODB.Recordset")
        rs.open sql, conn, 1, 1
        myuser_list = "<div class='myuserinfo'><h2>"& Lebi_UserId &"&nbsp;"& Lebi_user(14) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(92) &"：</th><td width='35%' class='list2'>"& rs(7) &""
'		If rs("user_grade") = "2" Then
'		        myuser_list = myuser_list &" ("& Lebi_user(79) &" <font color=""#ff0000"">"& rs("yxq") &"</font>)"
'		End If
	    myuser_list = myuser_list &"&nbsp;<img src='"&Eshop_url& getGradePurview(18)&"' title='"&Lebi_user(204)&"' align='absmiddle'>&nbsp;"
	    if rs("ifpay")=1 Then myuser_list = myuser_list &"<img src='"&Eshop_url&"images/icons/icon11.gif' title='"& Lebi_user(80) &"' align='absmiddle'>"
        myuser_list = myuser_list &"</td><th>"& Lebi_user(81) &"：</th><td width='35%' class='list2'>"& rs("logins") &"</td></tr>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(82) &"：</th><td width='35%' class='list2'>"& dw & Formatnumber2(rs("usermoney")/moneyhl) & dw2 &"</td><th>"& Lebi_user(83) &"：</th><td width='35%' class='list2'>"& formatnumber2(rs("jifen")/moneyhl) &"</td></tr>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(84) &"：</th><td width='35%' class='list2'>"& rs("regdate") &"</td><th>"& Lebi_user(85) &"：</th><td width='35%' class='list2'>"& rs("lastlogintime") &" (IP "& rs("lastloginIP") &")</td></tr></tbody></table>"
        myuser_list = myuser_list &"<h2>"& Lebi_user(93) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(86) &"：</th><td colspan='3' class='list2'>"& replace(replace(replace(Lebi_user(87),"[num]",num1+num2),"[num1]",num1),"[num2]",num2) &"</td></tr>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(88) &"：</th><td colspan='3' class='list2'>"& replace(replace(replace(Lebi_user(89),"[num5+num6]",num5+num6),"[num5]",num5),"[num6]",num6) &"</td></tr>"
        myuser_list = myuser_list &"<tr><th>"& Lebi_user(90) &"：</th><td colspan='3' class='list2'>"& Lebi_user(91) &"：<strong>"& num4 &"</strong></td></tr></table></div>"
        rs.close:Set rs=nothing
End Function

Function myuser_orderlist()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        page=Request("page")
        If (not isnumeric(page) or isempty(page)) then page=1
	    Dim ors,DataCount,DataList,NewsList_num,Filename,i,coupon_price
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=15
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=-1
		    .Pkey="id"
    	    .Field="id,order_number,dis_sum,fei,paymenttype,order_time,packing_price,fapiao_money,coupon_price,orderzt,paidmoney,is_pay_advance"
		    .Table="[Lebi_orders]"
			.Condition="user_id='"& Lebi_UserId &"'"
            .OrderBy="id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		NewsList_num = 1
		Filename = "default.asp"
        myuser_orderlist = "<div class='myuserinfo'>"&_
		                   "<div class='headpage'>"& ors.ShowPageHead(Filename) &"</div><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"&_
                           "   <tr>"&_
                           "      <td style='width:20%' class='headmenu'>"& Lebi_cart(86) &"</td>"&_
                           "      <td style='width:20%' class='headmenu'>"& Lebi_cart(87) &"</td>"&_
                           "      <td style='width:10%' class='headmenu'>"& Lebi_cart(140) &"</td>"&_
                           "      <td style='width:15%' class='headmenu'>"& Lebi_cart(48) &"</td>"&_
						   "      <td style='width:20%' class='headmenu'>"& Lebi_cart(113) &"</td>"&_
                           "      <td style='width:15%' class='headmenu'>"& Lebi_cart(111) &"</td>"&_
                           "   </tr>"
	    If DataCount >= 1 Then
		For i = 0 To Ubound(DataList,2)
				If IsNull(DataList(8,i)) Or IsEmpty(DataList(8,i)) Then coupon_price = 0
				myuser_orderlist = myuser_orderlist &"<tr class='list'>"&_
													 "   <td class='list'><a href='"& Eshop_url & PagePath(0) &"?action=views&id="& DataList(0,i) &"' title='"& Lebi_cart(112) &"'>"& DataList(1,i) &"</a></td>"&_
													 "   <td height='25' class='list'>"& DataList(5,i) &"</td>"&_
													 "   <td class='list'>"& dw & formatnumber2((DataList(2,i)+DataList(3,i)+DataList(6,i)+DataList(7,i)-checknum(DataList(8,i),0))/moneyhl) & dw2 &"</td>"&_
													 "   <td class='list'>"& DataList(4,i) &"</td>"&_
													 "<td  class='list'>"
				If Instr(DataList(9,i),1)>0 Then
						myuser_orderlist = myuser_orderlist & Lebi_cart(114) &"：<font color=""#ff0000"">√</font>&nbsp;"
				End If
				If Instr(DataList(9,i),2)>0 Then
						myuser_orderlist = myuser_orderlist & Lebi_cart(115) &"：<font color=""#ff0000"">√</font>&nbsp;"
				End If
				If Instr(DataList(9,i),3)>0 Then
						myuser_orderlist = myuser_orderlist & Lebi_cart(116) &"：<font color=""#ff0000"">√</font>&nbsp;"
				End If
				If Instr(DataList(9,i),4)>0 then
						myuser_orderlist = myuser_orderlist & Lebi_cart(117) &"：<font color=""#ff0000"">√</font>&nbsp;"
				End If
				If Instr(DataList(9,i),5)>0 Then
						myuser_orderlist = myuser_orderlist & Lebi_cart(118) &"：<font color=""#ff0000"">√</font>&nbsp;"
				End If
				if Instr(DataList(9,i),2)=0 And DataList(10,i) > 0 Then myuser_orderlist = myuser_orderlist & "<font color=""#ff0000"">"& Lebi_cart(115) &"："& dw & FormatNumber2(DataList(10,i)/moneyhl) & dw2 &"</font>"
				myuser_orderlist = myuser_orderlist &"&nbsp;</td><td class='list'>"
				If Instr(DataList(9,i),2)=0 Then myuser_orderlist = myuser_orderlist &"<a href='"& Eshop_url & PagePath(0) &"?action=payment_inform&id="& DataList(1,i) &"'>"& Lebi_cart(171) &"</a>&nbsp;&nbsp;"
				If DataList(9,i) = "" Or DataList(9,i)="0" Or Instr(DataList(9,i),5)>0 Then
						myuser_orderlist = myuser_orderlist &"<a href='javascript:void(56770)' onclick=""{if(confirm('"& Lebi_cart(148) &"')){location.href='"& Eshop_url & PagePath(25) &"?action=del_order&id="& DataList(0,i) &"';}return false;}"">"& Lebi_user(115) &"</a>"
				End If
				myuser_orderlist = myuser_orderlist &"&nbsp;</td></tr>"
		Next
		End If
		myuser_orderlist = myuser_orderlist &"</tbody></table>"
        myuser_orderlist = myuser_orderlist &"<div class='footpage'>"& ors.ShowPageFoot(Filename) &"</div>"
        myuser_orderlist = myuser_orderlist &"</div>"
End Function

Function myuser_orderinfo()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        Dim order_number,Total_money,coupon_price
        id = checknum(request("id"),0)
        myuser_orderinfo = "<div class='myuserinfo'>"
        set rs = conn.execute("select * from [Lebi_orders] where id="& id &" and user_id='"& Lebi_UserId &"'")
        If rs.eof Then
                myuser_orderinfo = myuser_orderinfo & Lebi_word(6)
        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
		        order_number = rs("order_number")
				myuser_orderinfo = myuser_orderinfo &"<h2>"& Lebi_user(161) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
                myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(86) &"：</th><td width='35%' 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 width='35%' class='list2'>"& rs("order_time") &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<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 = '"& rs("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
						myuser_orderinfo = myuser_orderinfo &"<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 
							myuser_orderinfo = myuser_orderinfo &"<tr><th></th><td class='list2' colspan=""3"">"
							If InStr("|ems|,|shentong|,|shunfeng|,|youzhengguonei|","|"& rsdeliver(0) &"|") > 0 Then 
								myuser_orderinfo = myuser_orderinfo &"<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 
							myuser_orderinfo = myuser_orderinfo & Kuadi100API(rsdeliver(0),shipdb(1),request("valicode")) &"</td></tr>"
						End If 
						rsdeliver.close : Set rsdeliver = Nothing
						End If 
						myuser_orderinfo = myuser_orderinfo &"<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
                myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(113) &"：</th><td class='list2' colspan='3'>"
                If Instr(rs("orderzt"),3)>0 And Instr(rs("orderzt"),4)<=0 Then
                        myuser_orderinfo = myuser_orderinfo &"<input type='button' name='bt' onclick=""location.href='"& Eshop_url & PagePath(25) &"?action=up_orderzt&order_number="& rs("order_number") &"&backurl="& Urlencode(GetFileUrl()) &"'"" value='"& Lebi_cart(117) &"' class='button'>"
		        End If
                myuser_orderinfo = myuser_orderinfo & Lebi_cart(114) &"："
		        If Instr(rs("orderzt"),1)>0 Then
		                myuser_orderinfo = myuser_orderinfo &"<font color=""#ff0000"">√</font>"
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If
                myuser_orderinfo = myuser_orderinfo &"&nbsp;&nbsp;"& Lebi_cart(115) &"："
                If Instr(rs("orderzt"),2)>0 Then
                        myuser_orderinfo = myuser_orderinfo &"<font color=""#ff0000"">√</font>"
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If
                myuser_orderinfo = myuser_orderinfo &"&nbsp;&nbsp;"& Lebi_cart(116) &"："
		        If Instr(rs("orderzt"),3)>0 Then
                        myuser_orderinfo = myuser_orderinfo &"<font color=""#ff0000"">√</font>"
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If
                myuser_orderinfo = myuser_orderinfo &"&nbsp;&nbsp;"& Lebi_cart(117) &"："
                If Instr(rs("orderzt"),4)>0 then
                        myuser_orderinfo = myuser_orderinfo &"<font color=""#ff0000"">√</font>"
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If
                myuser_orderinfo = myuser_orderinfo &"&nbsp;&nbsp;"& Lebi_cart(118) &"："
                If Instr(rs("orderzt"),5)>0 Then
                        myuser_orderinfo = myuser_orderinfo &"<font color=""#ff0000"">√</font>"
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If
                myuser_orderinfo = myuser_orderinfo &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<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 myuser_orderinfo = myuser_orderinfo &" + "& Lebi_cart(79) &"："& dw & FormatNumber2(rs("fapiao_money")/moneyhl) & dw2 End If
				If rs("packing_price")>0 Then myuser_orderinfo = myuser_orderinfo &" + "& Lebi_cart(164) &"："& dw & FormatNumber2(rs("packing_price")/moneyhl) & dw2
				if coupon_price > 0 Then myuser_orderinfo = myuser_orderinfo &" <font color=""#ff0000"">- "& Lebi_cart(138) &"："& dw & FormatNumber2(coupon_price/moneyhl) &"</font>"
				if rs("paidmoney") > 0 And CDbl(rs("paidmoney")) < CDbl(Total_money) Then myuser_orderinfo = myuser_orderinfo &" <font color=""#ff0000"">（"& Lebi_cart(115) &"："& dw & FormatNumber2(rs("paidmoney")/moneyhl) & dw2 &"）</font>"
				myuser_orderinfo = myuser_orderinfo &"</td></tr>"
				If Trim(rs("fuyan")) <> "" Then
                        myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(158) &"：</th><td class='list2' colspan='3'>&nbsp;"& rs("fuyan") &"</td></tr>"
				End If
				If Instr(rs("orderzt"),2)=0 Then
						myuser_orderinfo = myuser_orderinfo &"<tr><td colspan='4' class='list2'><input type=""button"" name=""Sb"" 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>"
				End If
                myuser_orderinfo = myuser_orderinfo &"</tbody></table>"
				If Instr(rs("orderzt"),2)=0 Then
				myuser_orderinfo = myuser_orderinfo &"<h2>"& Lebi_word(9) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' style='TABLE-LAYOUT: fixed; WORD-BREAK: break-all; border-collapse: collapse'><tbody><tr><td class='list2'>"
                rem 在线支付模块
				Dim payprice : payprice = formatnumber2((rs("dis_sum")+rs("fei")+rs("fapiao_money")+rs("packing_price")-coupon_price-rs("paidmoney"))/moneyhl)
                If Pay_chinabank(0)=1 And InStr(Pay_chinabank(11),LangName)>0 Then
						If Pay_chinabank(7) <> "" Then
								myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_chinabank(10) &"' target='_blank'><img src='"& Eshop_url & Pay_chinabank(7) &"' alt='"& Pay_chinabank(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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
								myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_alipay(12) &"' target='_blank'><img src='"& Eshop_url & Pay_alipay(9) &"' alt='"& Pay_alipay(12) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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
								myuser_orderinfo = myuser_orderinfo &"<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) &"&paypal_currency_code="& paypal_currency_code &"&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
								myuser_orderinfo = myuser_orderinfo &"<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
								myuser_orderinfo = myuser_orderinfo &"<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 &"|' 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
								myuser_orderinfo = myuser_orderinfo &"<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="& Pay_paypal_cn(7) &"&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
								myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_bill(9) &"' target='_blank'><img src='"& Eshop_url & Pay_bill(6) &"' alt='"& Pay_bill(9) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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='"& Pay_bill(9) &"' 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
								myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_tenpay(10) &"' target='_blank'><img src='"& Eshop_url & Pay_tenpay(7) &"' alt='"& Pay_tenpay(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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
							    myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_tenpay2(10) &"' target='_blank'><img src='"& Eshop_url & Pay_tenpay2(7) &"' alt='"& Pay_tenpay2(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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
							    myuser_orderinfo = myuser_orderinfo &"<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 &"|' title='"& Pay_ips(10) &"' target='_blank'><img src='"& Eshop_url & Pay_ips(7) &"' alt='"& Pay_ips(10) &"' border='0' align='absmiddle'></a>&nbsp;"
						Else
								myuser_orderinfo = myuser_orderinfo &"<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
								myuser_orderinfo = myuser_orderinfo &"<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
								myuser_orderinfo = myuser_orderinfo &"<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
                myuser_orderinfo = myuser_orderinfo &"</td></tr></tbody></table>"
				End If 
				If sys_soft = 0 Then 
                myuser_orderinfo = myuser_orderinfo &"<h2>"&Lebi_cart(41)&"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"&_
                        "   <tr>"&_
                        "     <th>"&Lebi_cart(42)&"：</th>"&_
                        "     <td width='35%' class='list2'>"&rs("to_name")&"</td>"&_
                        "     <th>"&Lebi_cart(43)&"：</th>"&_
                        "     <td width='35%' 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='listright'>"&rs("to_adds")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <th>"&Lebi_cart(47)&"：</th>"&_
                        "     <td colspan='3' class='listright'>"&rs("to_other")&"</td>"&_
                        "   </tr></tbody></table>"
                myuser_orderinfo = myuser_orderinfo &"<h2>"&Lebi_cart(141)&"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"&_
                        "   <tr>"&_
                        "     <th>"&Lebi_cart(142)&"：</th>"&_
                        "     <td width='35%' class='list2'>"&rs("from_name")&"</td>"&_
                        "     <th>"&Lebi_cart(43)&"：</th>"&_
                        "     <td width='35%' 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='listright'>"&rs("from_other")&"</td>"&_
                        "   </tr></tbody></table>"
				Else
				from_tel = rs("from_tel")
				If InStr(from_tel,",") = 0 Then from_tel = from_tel &",,"
				myuser_orderinfo = myuser_orderinfo &"<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
					myuser_orderinfo = myuser_orderinfo & Country(0)
				End If
				country.close : Set country = Nothing
				myuser_orderinfo = myuser_orderinfo &"</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
						myuser_orderinfo = myuser_orderinfo &"<h2>"& Lebi_cart(52) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(54) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_company") &"</td></tr>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(55) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_adds") &"</td></tr>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><th>"& Lebi_cart(45) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_zip") &"</td></tr></tbody></table>"
                End If
                myuser_orderinfo = myuser_orderinfo &"<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
						myuser_orderinfo = myuser_orderinfo &"<table width='100%' cellpadding='0' cellspacing='1' align='center' class='basketlist'><tbody><tr><td style='width:55%' class='headmenu'>"& Lebi_gift(0) &"</td><td style='width:15%' class='headmenu'>"& Lebi_gift(1) &"</td><td style='width:15%' class='headmenu'>"& Lebi_gift(6) &"</td><td style='width:15%' class='headmenu'>"& Lebi_gift(7) &"</td></tr>"
						Do While Not RsGift.eof
						myuser_orderinfo = myuser_orderinfo &"<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 class='list'>"& RsGift("price") &"</td><td class='list'>"& RsGift("basket_count") &"</td><td class='list'>"& RsGift("price")*RsGift("basket_count") &"</td></tr>"
						RsGift.movenext
						Loop
						myuser_orderinfo = myuser_orderinfo &"</tbody></table>"
				End If
				RsGift.close : Set RsGift = Nothing
				Dim SqlPro,RsPro,rss,sqls,Unite,child_arr,child_url,Arr
				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"
				Set RsPro = conn.execute(SqlPro)
				If Not Rspro.eof Then
						myuser_orderinfo = myuser_orderinfo &"<table cellpadding='0' cellspacing='1' align='center'><tbody><tr><th style='width:15%' class='headmenu'>"& Lebi_cart(33) &"</th><th style='width:55%' class='headmenu'>"& Lebi_cart(17) &"</th>"
						myuser_orderinfo = myuser_orderinfo &"<th style='width:10%' class='headmenu'>"& Lebi_cart(22) &"</th><th style='width:10%' class='headmenu'>"& Lebi_cart(21) &"</th><th style='width:10%' class='headmenu'>"& Lebi_cart(23) &"</th></tr>"'Lebi_cart(21) &"</td><td width='10%' align='center' class='headmenu'>"&
						do while not RsPro.eof
								myuser_orderinfo = myuser_orderinfo &"<tr class='list'><td class='list'>"& RsPro("bianhao") &"</td>"
								myuser_orderinfo = myuser_orderinfo &"<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" myuser_orderinfo = myuser_orderinfo & PagePath(8) &"?id="& RsPro("id")
														   Case "1" myuser_orderinfo = myuser_orderinfo & LangPath &"unite_show-"& RsPro("id")	&".html"
													End Select
		'									   Case "1" myuser_orderinfo = myuser_orderinfo & LangPath & Folder(9) & RsPro("id") &".1.html"
		'								End Select
										myuser_orderinfo = myuser_orderinfo &"'>"& RsPro("product_name") &"</a>"
										myuser_orderinfo = myuser_orderinfo &"<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"
		'														   Set rs = conn.execute("select p_filename from [Lebi_product] where id = "& sArr(0) &"")
		'														   If Not rs.eof Then
		'																child_url= Folder(0) & rs(0) &".1.html"
		'														   End If
		'												End Select
														myuser_orderinfo = myuser_orderinfo &"<a target='_blank' href='"& Eshop_url & LangPath & child_url &"'>"& sArr(2) &"</a> × "& sArr(4)
														If j < ubound(child_arr) Then myuser_orderinfo = myuser_orderinfo &" + "
												End If
										Next
										myuser_orderinfo = myuser_orderinfo &")"
								Else
		'								Select Case show_html
		'									   Case "0"
													Select Case ISAPI_Rewrite
														   Case "0" myuser_orderinfo = myuser_orderinfo & PagePath(10) &"?id="& RsPro("id")
														   Case "1" myuser_orderinfo = myuser_orderinfo & LangPath &"product-"& RsPro("id")	&".html"
													End Select
		'									   Case "1" myuser_orderinfo = myuser_orderinfo & LangPath & Folder(0) & RsPro("id") &".1.html"
		'								End Select
										myuser_orderinfo = myuser_orderinfo &"'>"& RsPro("product_name") &"</a>"
										If RsPro("spname") <> "" Then 
												myuser_orderinfo = myuser_orderinfo &"<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)
																myuser_orderinfo = myuser_orderinfo & arr_spname(s) &"："& arr_spvalue(s)
																If s < UBound(arr_spname) Then myuser_orderinfo = myuser_orderinfo &"&nbsp;&nbsp;"
														Next 
												Else
														myuser_orderinfo = myuser_orderinfo & RsPro("spname") &"："& RsPro("spvalue")
												End If 
												myuser_orderinfo = myuser_orderinfo &"</em>"
										End If 
								End If
								myuser_orderinfo = myuser_orderinfo &"</td></tr></table></td>"
								myuser_orderinfo = myuser_orderinfo &"<td class='list'>"& RsPro("basket_count") &"</td>"
								myuser_orderinfo = myuser_orderinfo &"<td class='list'>"& FormatNumber2(RsPro("price")/moneyhl) &"</td>"
								myuser_orderinfo = myuser_orderinfo &"<td class='list'>"& FormatNumber2(RsPro("price")*RsPro("basket_count")/moneyhl) &"</td></tr>"
						RsPro.movenext
						Loop
						myuser_orderinfo = myuser_orderinfo &"</tbody></table>"
				End If
				RsPro.close : set RsPro=Nothing
				myuser_orderinfo = myuser_orderinfo &"</div></div>"
        End If
		rs.close:set rs=nothing
End Function

Function myuser_modi()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        Dim fax,ps1,ps,user_postalcode,user_tel,user_name,user_mail,oicq,city,user_adds,user_password,fapiao_company,fapiao_zip,fapiao_adds,user_question,user_mobile,birthday,user_adds2,state,country
        sql="select * from [Lebi_user] where user_id='"& Lebi_UserId &"'"
        set Rs = conn.execute(Sql)
        user_id=Trim(rs("user_id"))
        user_name=Trim(rs("user_name"))
        user_password=Trim(rs("user_password"))
        user_postalcode=Trim(rs("user_postalcode"))
        user_tel=Trim(rs("user_tel"))
        user_mail=Trim(rs("user_mail"))
        user_adds=Trim(rs("user_adds"))
		user_adds2=Trim(rs("user_adds2"))
        user_mobile=Trim(rs("user_mobile"))
        birthday=Trim(rs("birthday"))
        oicq=Trim(rs("oicq"))
        fax=Trim(rs("fax"))
        city=Trim(rs("city"))
        fapiao_company=Trim(rs("fapiao_company"))
        fapiao_adds=Trim(rs("fapiao_adds"))
        fapiao_zip=Trim(rs("fapiao_zip"))
        user_question = Trim(rs("user_question"))
        state=Trim(rs("state"))
        country=checknum(rs("country"),0)
        rs.close:set rs=Nothing
        myuser_modi = "<div class='myuserinfo'>"
        if request("xgzl")="ok" Then
				myuser_modi = myuser_modi & CallBack(Lebi_user(9),"·"&Lebi_user(96),Eshop_url & LangPath &"user/?action=modi",3)
        Elseif request("xgpass")="ok" then
				myuser_modi = myuser_modi & CallBack(Lebi_user(95),"·"&Lebi_user(94),Eshop_url & LangPath &"user/?action=modi",3)
        Else
				myuser_modi = myuser_modi &"<h2>"& Lebi_user(95) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
                myuser_modi = myuser_modi &"<form name='modiinfo' action='"& Eshop_url & LangPath &"user/post.asp?action=xgpass' method='post'>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(33) &"：</td><td class='list2'><input name='ps' size='30' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(35) &"：</th><td class='list2'><input name='ps1' size='30' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><td colspan='2' class='list2'><input type='submit' name='Submit' value=' "& Lebi_user(103) &" ' class='button'></td></tr></form></tbody></table>"
				myuser_modi = myuser_modi &"<h2>"& Lebi_user(9) &"</h2><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
                myuser_modi = myuser_modi &"<form name='modiinfo' action='"& Eshop_url & LangPath &"user/post.asp?action=xgzl' method='post'>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(30) &"：</th><td class='list2'> <font color='#FF0000'>"& Lebi_UserId &"</font>&nbsp;"& Lebi_user(97) &"</td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(37) &"：</th><td class='list2'><input type='text' name='user_name' size='30' value='"& user_name &"' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(209) &"：</th><td class='list2'><input type='text' name='birthday' size='30' value='"& birthday &"' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(207) &"：</th><td class='list2'><input type='text' name='user_mobile' size='30' value='"& user_mobile &"' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(43) &"：</th><td class='list2'>"
				Select Case sys_soft
				Case "0" myuser_modi = myuser_modi &"<input type='text' name='user_tel' size='30' value='"& user_tel &"' class='form' />"
				Case "1" 
				If user_tel = "" Or isnull(user_tel) Then user_tel = user_tel &",,,"
				If InStr(user_tel,",") = 0 Then user_tel = user_tel &",,"
				myuser_modi = myuser_modi &"(<input type=""text"" name=""user_tel"" value="""& Trim(split(user_tel,",")(0)) &""" size=""3"" class=""form"">).<input type=""text"" name=""user_tel"" value="""& Trim(split(user_tel,",")(1)) &""" size=""3"" class=""form"">.<input type=""text"" name=""user_tel"" value="""& Trim(split(user_tel,",")(2)) &""" size=""5"" class=""form"">"
				End Select 
				myuser_modi = myuser_modi &"</td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(42) &"：</th><td class='list2'><input type='text' name='user_mail' size='30' value='"& user_mail &"' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(50) &"：</th><td class='list2'><input type='text' name='user_postalcode' size='30' value='"& user_postalcode &"' maxlength='6' class='form' /></td></tr>"
				Select Case sys_soft
                Case "0" myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(48) &"：</th><td class='list2'><input type='text' name='user_adds' size='56' value='"& user_adds &"' class='form' /></td></tr>"
				Case "1"
                myuser_modi = myuser_modi &"<tr><th rowspan=""2"" valign=""top"">"& Lebi_user(48) &"：</th><td class='list2'><input type='text' name='user_adds' size='56' value='"& user_adds &"' class='form' /></td></tr>"
                myuser_modi = myuser_modi &"<tr><td class='list2'><input type='text' name='user_adds2' size='56' value='"& user_adds2 &"' class='form' /></td></tr>"
				End Select 
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(211) &"：</th><td class='list2'><input type='text' name='city' size='30' value='"& city &"' class='form' /></td></tr>"
				If sys_soft = 1 Then 
						myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(212) &"：</th><td class='list2'><input type='text' name='state' size='30' value='"& state &"' maxlength='20' class='form' /></td></tr>"
						myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(213) &"：</th><td class='list2'><select name=""country"">"
						Set rscountry = conn.execute("Select id,area_name from [lebi_deliver_area] order by area_order desc")
						If Not rscountry.eof Then
							Do While Not rscountry.eof
							myuser_modi = myuser_modi &"<option value="""& rscountry(0) &""" "& judge2(rscountry(0),country) &">"& rscountry(1) &"</option>"
							rscountry.movenext
							Loop
						End If
						rscountry.close : Set rscountry = Nothing
						myuser_modi = myuser_modi &"</select></td></tr>"
				End If 
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(99) &"：</th><td class='list2'><input type='text' name='user_question' size='30' value='"& user_question &"' maxlength='20' class='form' />&nbsp;<em>"& Lebi_user(100) &"</em></td></tr>"
                myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(101) &"：</th><td class='list2'><input type='text' name='user_answer' size='30' class='form' maxlength='20' />&nbsp;<em>"& Lebi_user(102) &"</em></td></tr>"
				myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(45) &"：</th><td class='list2'><input type='text' name='fax' size='30' value='"& fax &"' class='form' /></td></tr>"
				myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(214) &"：</th><td class='list2'><input type='text' name='oicq' size='30' value='"& oicq &"' class='form' /></td></tr>"
				If Config_Lebi_Eshop(2) = 1 Then  
						myuser_modi = myuser_modi &"<tr><td align='left' width='100%' colspan=2 height='25' class='headmenu'>&nbsp;"& Lebi_user(51) &"</td></tr>"
						myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(52) &"：</th><td class='list2'><input name=fapiao_company value='"& fapiao_company &"' size='30' class='form' /></td></tr>"
						myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(53) &"：</th><td class='list2'><input name=fapiao_adds value='"& fapiao_adds &"' size='30' class='form' /></td></tr>"
						myuser_modi = myuser_modi &"<tr><th>"& Lebi_user(50) &"：</th><td class='list2'><input name=fapiao_zip value='"& fapiao_zip &"' size='10' class='form' /></td></tr>"
				End If 
                myuser_modi = myuser_modi &"<tr><td colspan='2' class='list2'><input type='submit' name='Submit' value=' "& Lebi_user(103) &" ' class='button' /></td></tr></form></tbody></table>"
        end if
        myuser_modi = myuser_modi &"</div>"
End Function

Function myuser_msglist()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        myuser_msglist = "<div class='myuserinfo'><div class='msgmenu'><div class='"
		If request("action2") = "inbox" Or request("action2") = "" Then myuser_msglist = myuser_msglist&"onmsgbox" Else myuser_msglist = myuser_msglist&"msgbox" End If
		myuser_msglist = myuser_msglist&"'><a href='"& Eshop_url & PagePath(0) &"?action=msg&action2=inbox'><img src='"&Eshop_url&"images/m_inbox.gif' border='0' align='absmiddle' />"& Lebi_user(104) &"</a></div>"
        myuser_msglist = myuser_msglist&"<div class='"
		If request("action2") = "outbox" Then myuser_msglist = myuser_msglist&"onmsgbox" Else myuser_msglist = myuser_msglist&"msgbox" End If
		myuser_msglist = myuser_msglist&"'><a href='"& Eshop_url & PagePath(0) &"?action=msg&action2=outbox'><img src='"&Eshop_url&"images/M_outbox.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(105) &"</a></div>"
        myuser_msglist = myuser_msglist&"<div class='msgbox'><a href='"& Eshop_url & PagePath(0) &"?action=writemsg'><img src='"&Eshop_url&"images/m_write.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(106) &"</a></div>"
        myuser_msglist = myuser_msglist&"<div class='both'></div></div>"
	    Dim re,ors,DataCount,DataList,Filename,i
		page = checknum(request("page"),1)
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=20
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=0
		    .Pkey="id"
    	    .Field="id,ifview,subject,idate"
		    .Table="[Lebi_message]"
            If request("action2")="inbox" Then
                .Condition="to_user='"& Lebi_UserId &"'"
            Elseif request("action2")="outbox" Then
                .Condition="user_id='"& Lebi_UserId &"'"
	        Else
	            .Condition="to_user='"& Lebi_UserId &"'"
            End If
            .OrderBy="id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		filename="default.asp"
        myuser_msglist = myuser_msglist&"<div class='headpage'>"& ors.ShowPageHead(Filename) &"</div>"
        myuser_msglist = myuser_msglist&"<form method='post' action='"& Eshop_url & PagePath(25) &"'>"
        myuser_msglist = myuser_msglist&"<table border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        myuser_msglist = myuser_msglist&"<tr><th CLASS='headmenu'>"& Lebi_user(110) &"</th>"
		myuser_msglist = myuser_msglist&"<th style='width:60%' CLASS='headmenu'>"& Lebi_user(107) &"</th>"
        myuser_msglist = myuser_msglist&"<th style='width:20%' CLASS='headmenu'>"& Lebi_user(108) &"</th>"
        myuser_msglist = myuser_msglist&"</tr>"
	    If DataCount < 1 Then
                myuser_msglist = myuser_msglist&"<tr><td colspan='3' align='center' class='list'>"& Lebi_user(114) &"</td></tr>"
        Else
		        For i = 0 To Ubound(DataList,2)
                If DataList(1,i)=0 Then
                        re="<img src='"&Eshop_url&"images/m_news.gif' title='"& Lebi_user(112) &"' />"
                Else
                        re="<img src='"&Eshop_url&"images/m_olds.gif' title='"& Lebi_user(111) &"' />"
                End If
                myuser_msglist = myuser_msglist&"<tr class='list'><td class='list'><input type=checkbox name=msgid value="& DataList(0,i) &" /> "& re &"</td>"
                myuser_msglist = myuser_msglist&"<td class='list'><a href='"& Eshop_url & PagePath(0) &"?action=writemsg&action1=read&msgid="& DataList(0,i) &"'>"& DataList(2,i) &"</a></td>"
                myuser_msglist = myuser_msglist&"<td class='list'>"& DataList(3,i) &"</td></tr>"
                Next
        End If
        myuser_msglist = myuser_msglist&"<tr><td colspan='3' class='list2'><input type=""button"" class=""button"" value="""&Lebi_user(205)&""" onclick=""selectall();"" /> <input type='submit' class='button' value='"& Lebi_user(115) &"' name='submit' /><input type='hidden' name='action' value='del_msg' /><input type='hidden' name='action2' value='"& request("action2") &"' /></td></tr>"
        myuser_msglist = myuser_msglist&"</tbody></table></form>"
		myuser_msglist = myuser_msglist&"<div class='footpage'>"& ors.ShowPageFoot(Filename) &"</div></div>"
End Function

Function myuser_writemsg()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        Dim id,subject,user,action1,reuser,strmsg,idate,subject_l
        id = checknum(request("msgid"),0)
        if id<>0 then
                sql="select msg,subject,idate,to_user,user_id,ifre,ifview from [Lebi_message] where id="& id
                set Rs = conn.execute(sql)
                subject = rs("subject")
                reuser = Lebi_user(117) & rs("to_user")
                user = rs("user_id")
                strmsg = rs("msg")
                idate = rs("idate")
                rs.close:set rs=Nothing
                If user <> Lebi_UserId Then
                        conn.execute("update [Lebi_message] set ifview='1' where id="& id &"")
                End if
        End If
	    if request("action1")="re" then
	            subject_l = "Re "
	    Else
	            subject_l = ""
	    End If
        myuser_writemsg = "<div class='myuserinfo'><!--<h2>"
	    if request("msgid")<>"" Then
	            myuser_writemsg = myuser_writemsg& idate &"，"& user & Lebi_user(118)
		Else
		        myuser_writemsg = myuser_writemsg& Lebi_user(106)
        end If
		myuser_writemsg = myuser_writemsg&"</h2>--><div class='msgmenu'><div class='msgbox'><a href='"& Eshop_url & PagePath(0) &"?action=msg&action2=inbox'><img src='"&Eshop_url&"images/m_inbox.gif' border='0' align='absmiddle'>"& Lebi_user(104) &"</a></div><div class='msgbox'><a href='"& Eshop_url & PagePath(0) &"?action=msg&action2=outbox'><img src='"&Eshop_url&"images/M_outbox.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(105) &"</a></div>"
		if id<>0 then
				myuser_writemsg = myuser_writemsg&"<div class='msgbox'><a href='"& Eshop_url & PagePath(25) &"?action=del_msg&msgid="& request("msgid") &"'><img src='"&Eshop_url&"images/m_delete.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(115) &"</a> </div>"
				if user <> Lebi_UserId Then
						myuser_writemsg = myuser_writemsg&"<div class='"
						If request("action1") = "re" Or request("action1") = "read" Then myuser_writemsg = myuser_writemsg&"onmsgbox" Else myuser_writemsg = myuser_writemsg&"msgbox" End If
						myuser_writemsg = myuser_writemsg&"'><a href='"& Eshop_url & PagePath(0) &"?action=writemsg&action1=re&msgid="& request("msgid") &"'><img src='"&Eshop_url&"images/m_reply.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(116) &"</a></div>"
				End If
		Else
				myuser_writemsg = myuser_writemsg&"<div class='onmsgbox'><a href='"& Eshop_url & PagePath(0) &"?action=writemsg'><img src='"&Eshop_url&"images/m_write.gif' border='0' align='absmiddle'>"& Lebi_user(106) &"</a></div>"
		End If
		myuser_writemsg = myuser_writemsg&"<div class='both'></div></div>"
        myuser_writemsg = myuser_writemsg&"<form name='form1' method='post' action='"& Eshop_url & PagePath(25) &"'>"
        myuser_writemsg = myuser_writemsg&"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        myuser_writemsg = myuser_writemsg&"<tr><th>"& Lebi_user(107) &"：</th><td class='list2'>&nbsp;<input type='text' name='subject' value='"& subject_l & subject &"' SIZE='60' class='form' /></td></tr>"
        myuser_writemsg = myuser_writemsg&"<tr><th>"& Lebi_user(119) &"：</th><td class='list2'>&nbsp;<textarea name='strmsg' cols='60' rows='10' class='form-textarea'>"
        if request("action1")="re" then
                myuser_writemsg = myuser_writemsg&"Re>:"
        end if
        if request("msgid")<>"" and request("action1")="read" Then
                myuser_writemsg = myuser_writemsg& strmsg
        end If
        myuser_writemsg = myuser_writemsg&"</textarea></td></tr>"
        if user = Lebi_UserId Then
                myuser_writemsg = myuser_writemsg&"<tr><td class='list2' colspan='2' height='25'><input type='button' name='Submit2' value=' "& Lebi_user(121) &" ' onClick='javascript:window.history.go(-1)' class='button' /></td></tr>"
        Else
                myuser_writemsg = myuser_writemsg&"<tr><td class='list2' colspan='2' height='25'><input type='submit' name='Submit2' value=' "& Lebi_user(120) &" ' class='button' />&nbsp;&nbsp;<input type='button' name='Submit2' value=' "& Lebi_user(121) &" ' onClick='javascript:window.history.go(-1)' class='button' /><input type='hidden' name='action' value='wmsg' /><input type='hidden' name='user_id' value='"& Lebi_UserId &"' /></td></tr>"
        End If
        myuser_writemsg = myuser_writemsg&"</tbody></table></form></div>"
End Function

Function myuser_moneylog()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        page=checknum(request("page"),1)
	    Dim ors,DataCount,DataList,NewsList_num,Filename,i,log_state
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=20
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=-1
		    .Pkey="m_id"
    	    .Field="m_zt,m_order_num,m_price,m_type,m_sj,m_content"
		    .Table="[Lebi_money_log]"
			.Condition="m_user_id='"& Lebi_UserId &"'"
            .OrderBy="m_id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		Filename = "default.asp"
        myuser_moneylog = "<div class='myuserinfo'>"
        myuser_moneylog = myuser_moneylog&"<div class='headpage'>"& ors.ShowPageHead(Filename) &"</div>"
        myuser_moneylog = myuser_moneylog&"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th style='width:25%' class='headmenu'>"& Lebi_user(127) &"</th><th style='width:15%' class='headmenu'>"& Lebi_user(123) &"</th><th style='width:30%' class='headmenu'>"& Lebi_user(129) &"</td><th style='width:20%' class='headmenu'> "& Lebi_user(128) &" </th><th style='width:10%' class='headmenu'>"& Lebi_user(110) &"</th></tr>"
	    If DataCount >= 1 Then
		For i = 0 To Ubound(DataList,2)
	    If DataList(0,i)=1 Then
                log_state = "√"
	    Else
                log_state ="×"
	    End If
        myuser_moneylog = myuser_moneylog&"<tr class='list'><td class='list'>"& DataList(1,i) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='list'>"& formatnumber2(DataList(2,i)) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='list' style='font-size:11px;'>"& DataList(3,i) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='list' style='font-size:11px;'>"& DataList(4,i) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='list'><strong><font color=""#ff0000"">"& log_state &"</font></strong></td></tr>"
        If Trim(DataList(5,i))<>"" Then
                myuser_moneylog = myuser_moneylog&"<tr class='list'><td colspan='5' class='list'>"& DataList(5,i) &"</td></tr>"
        End If
        Next
		End If
        myuser_moneylog = myuser_moneylog&"</tbody></table><div class='footpage'>"& ors.ShowPageFoot(Filename) &"</div></div>"
End Function

Function myuser_sqpay() ' 2008-3-7 by 56770.WangLei
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        myuser_sqpay = "<form name='form' method='post' action='"& Eshop_url & PagePath(25) &"?action=shenqing_yes'>"
        myuser_sqpay = myuser_sqpay &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
		set Rs = conn.execute("select ifpay from [Lebi_user] where user_id='"& Lebi_UserId &"'")
		If rs(0) = 1 Then
                myuser_sqpay = myuser_sqpay &"<tr><td height='25' class='list2'> "& Lebi_user(150) &"</td></tr>"
		Else
                myuser_sqpay = myuser_sqpay &"<tr><td height='50' class='list2'>"& replace(replace(Lebi_user(131),"{needjifen}",getGradePurview(7)),"{needmoney}",dw & formatnumber2(getGradePurview(8)/moneyhl)) & dw2 &"</td></tr>"
                myuser_sqpay = myuser_sqpay &"<tr><td height='80' class='list2'>"& Lebi_user(132) &"</td></tr>"
                myuser_sqpay = myuser_sqpay &"<tr><td height='50' class='list2'><input type=submit name=submit value='"& Lebi_user(133) &"' class='button' /></td></tr>"
	    End If
        myuser_sqpay = myuser_sqpay &"</tbody></table></div></form>"
End Function

Function myuser_vipuser()
		Dim needjifen,jifenyxq
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        set rs=conn.execute("select jifen,user_grade,yxq from [Lebi_user] where user_id='"& Lebi_UserId &"'")
        myuser_vipuser = "<form name='form' method='post' action='"& Eshop_url & PagePath(25) &"?action=vip_update_yes'>"
        myuser_vipuser = myuser_vipuser &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        myuser_vipuser = myuser_vipuser &"<tr><td class='list2'> "& Lebi_UserId &" ，"& Lebi_user(134) &"</td></tr>"
		rem	<-{ 2008-5-14 by 56770.WangLei
		If CInt(getGradePurview(10))=1 Then
				If CInt(rs("user_grade")) < CLng(cache_ugrade_dj(UserGroupNumber)) Then
						myuser_vipuser = myuser_vipuser &"<tr><td class='list2'>"& Lebi_user(135) &"<font color=""#ff0000"">"& rs("jifen") &"</font> ，"& replace(Lebi_user(136),"{needjifen}",getGradePurview(11)) &"</td></tr>"
						myuser_vipuser = myuser_vipuser &"<tr><td class='list2'><input type=submit name=submit value=' "& Lebi_user(103) &" ' class='button'></td></tr>"
				Else
						myuser_vipuser = myuser_vipuser &"<tr><td class='list2'>"&Lebi_user(139)&"</td></tr>"
				End If
		Else
				myuser_vipuser = myuser_vipuser &"<tr><td class='list2'>"&Lebi_user(140)&"</td></tr>"
		End If
		rem	}->
        rs.close:set rs=Nothing
	    myuser_vipuser = myuser_vipuser
        myuser_vipuser = myuser_vipuser &"</tbody></table></div></form>"
End Function

Function myuser_change_score()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        set Rs = conn.execute("select jifen,yxq,user_id,usermoney,ifpay,shenqing from [Lebi_user] where user_id='"& Lebi_UserId &"'")
        If Not rs.eof Then
                jifen=formatnumber2(rs("jifen")/moneyhl)
                yxq=rs("yxq")
                user_id=rs("user_id")
                usermoney=rs("usermoney")
                ifpay=rs("ifpay")
                shenqing=rs("shenqing")
        End If
        rs.close:set rs=Nothing
        myuser_change_score = "<form name='form' method='post' action='"& Eshop_url & PagePath(25) &"?action=change_score_yes'>"
        myuser_change_score = myuser_change_score &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody>"
        if CStr(getGradePurview(4)) = "1" then
                myuser_change_score = myuser_change_score &"<tr><td class='list2'> <u>"& Lebi_UserId &"</u> ，"& Replace(Replace(Replace(Replace(Lebi_user(141),"{jifen}",jifen),"{dw}",dw),"{dw2}",dw2),"{jiefen_zh}",CDbl(getGradePurview(5))) &"</td></tr>"
                myuser_change_score = myuser_change_score &"<tr><td class='list2'>"& Lebi_user(142) &"：<input type='text' name='c_jifen' size='5' class='form' /> <em>"& Lebi_user(143) &"</em></td></tr>"
                myuser_change_score = myuser_change_score &"<tr><td class='list2'><input type=submit name=submit value=' "& Lebi_user(103) &" ' class='button' /></td></tr>"
		Else
		        myuser_change_score = myuser_change_score &"<tr><td class='list2'>"& Lebi_user(140) &"</td></tr>"
		End If
        myuser_change_score = myuser_change_score &"</tbody></table></div></form>"
End Function

Function myuser_collect()
        If Lebi_UserId ="" Then
                response.redirect Eshop_url & PagePath(1) &"?action=needlogin"
		        response.End
        End If
        rem 删除超过允许收藏时间的商品
		If Config_Lebi_Eshop(10) > 0 Then 
        If IsSqlDataBase =0 Then conn.execute("delete from [Lebi_action] where datediff('h',actiondate,"&sqlnowstring&")>"&Config_Lebi_Eshop(10)&"")
	    If IsSqlDataBase =1 Then conn.execute("delete from [Lebi_action] where datediff(s,actiondate,"&sqlnowstring&")>"&Config_Lebi_Eshop(10)*3600&"")
		End If 
        page = CheckNum(request("page"),1)
	    Dim ors,DataCount,DataList,NewsList_num,Filename,i,log_state
	    Set ors=new Cls_vbsPage
	    Set ors.Conn=conn
	    With ors
		    .PageSize=20
		    .PageName="Page"
			If IsSqlDataBase = 0 Then
		            .DbType="AC"
			Else
			        .DbType="MSSQL"
			End If
		    .RecType=-1
		    .Pkey="a.actionid"
    	    .Field="a.id,a.product_type,a.product_name,a.actiondate,a.actionid"
		    .Table="[Lebi_action] as a"
			.Condition="a.user_id='"& Lebi_UserId &"'"
            .OrderBy="a.actiondate desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		Filename = "default.asp"
        myuser_collect = "<form method=post action='"& Eshop_url & PagePath(24) &"'><div class='myuserinfo'>"
		If Config_Lebi_Eshop(10) > 0 Then 
			myuser_collect = myuser_collect &"<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'><tr><td colspan='2' class='list2'><font color=""#ff0000""><b>！</b></font> "&Replace(Lebi_user(155),"{savehour}","<font color=""#ff0000""><b>"&Config_Lebi_Eshop(10)&"</b></font>")&"</td></tr></table>"
		End If 
        myuser_collect = myuser_collect &"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th class='headmenu' style='width:80%'>"&Lebi_pro(0)&"</th><th class='headmenu' style='width:20%'>"&Lebi_user(156)&"</th></tr>"
	    If DataCount >= 1 Then
		For i = 0 To Ubound(DataList,2)
				Dim p_url,pName
				If DataList(1,i)= "unite" Then
'						Select Case show_html
'								Case "0"
									Select Case ISAPI_Rewrite
										   Case "0" p_url = Eshop_url & PagePath(8) &"?id="& DataList(0,i)
										   Case "1" p_url = Eshop_url & LangPath &"unite_show-"& DataList(0,i) &".html"
									End Select
'								Case "1" p_url = Eshop_url & LangPath & Folder(9) &""&DataList(0,i)&".1.html"
'						End Select
						Set rs = conn.execute("select cpic from [Lebi_Product_unite] where id = "& DataList(0,i) &"")
						If Not rs.eof Then
								pic_url = Split(rs(0),"@@")(0)
								If pic_url = "" Then pic_url = Split(rs(0),"@@")(1)
						End If
						rs.close : Set rs = Nothing
				Else
'						Select Case show_html
'							   Case "0"
									Select Case ISAPI_Rewrite
										   Case "0" p_url = Eshop_url & PagePath(10) &"?id="& DataList(0,i)
										   Case "1" p_url = Eshop_url & LangPath &"product-"& DataList(0,i) &".html"
									End Select
'							   Case "1" p_url = Eshop_url & LangPath & Folder(0) & DataList(0,i) &".1.html"
'						End Select
						Set rs = conn.execute("select cpic from [Lebi_Product] where id = "& DataList(0,i) &"")
						If Not rs.eof Then
								If InStr(rs(0),"@@") > 0 Then
										pic_url = Split(rs(0),"@@")(0)
										If pic_url = "" Then pic_url = Split(rs(0),"@@")(1)
								End If
						End If
						rs.close : Set rs = Nothing
				End If
			    myuser_collect = myuser_collect &"<tr class='list'><td class='list'><input name=""a_id"" value="""& DataList(4,i) &""" type=""checkbox"" /><a href="""&p_url&""" target=""_blank"" onMouseover=""javascript:ddrivetip('<img src="& Eshop_url & "Include/Lebi_Readpic.asp?src="& pic_url &" width="& pic_dw &">', '#ffffff', '"& pic_dw &"')"" onMouseout=""hideddrivetip()"" />"&DataList(2,i)&"</a>"
				If DataList(1,i)= "unite" Then
						myuser_collect = myuser_collect &"<br />"&getUniteChild(DataList(0,i),0," <FONT COLOR=""#FF0000"">＋</FONT> ")&""
				End If
				myuser_collect = myuser_collect &"</td><td class='list'>"&DataList(3,i)&"</td></tr>"
        Next
		End If
        myuser_collect = myuser_collect &"   <tr>"&_
		                                 "      <td align=""right"" colspan=""2"" class=""list2""><span style=""FLOAT: left;""><input type='hidden' name='action' value='addcart' /><input type='hidden' name='page' id='page' value='"& page &"' /><input type=""button"" class=""button"" value="""&Lebi_user(205)&""" onclick=""selectall();"" /> <input type=""button"" class=""button"" value="""&Lebi_user(115)&""" onclick=""todel();""></span>&nbsp;&nbsp;&nbsp;&nbsp;<input type='button' name='Submit2' value='"&Lebi_word(4)&"' onClick='javascript:window.history.go(-1)' class='button' /> <input type=""submit"" name=""submit"" class=""button"" value="""&Lebi_user(157)&""" /></td>"&_
		                                 "   </tr></tbody></table>"
        myuser_collect = myuser_collect &"<div class='footpage'>"& ors.ShowPageFoot(Filename) &"</div></div></form>"
        myuser_collect = myuser_collect &"<script language=""javascript"" type=""text/javascript"">function todel(){var i = 0;var chkArr = document.getElementsByTagName(""input"");var page = document.getElementById(""page"").value;var param = """";for (i=0;i<chkArr.length;i++) if (chkArr[i].checked) param+=chkArr[i].value +"",""; if (param.length == 0){return;}else{if(window.confirm("""& Lebi_cart(148) &""")){location="""& Eshop_url & PagePath(25) &"?action=shoucang_del&id=""+param+""&page=""+page+"""";}else return;}}</script>"
End Function

Function myuser_lostpass()
        Dim user_name,verifycode
        user_name = safereplace(trim(request("user_name")))
		verifycode = trim(request("verifycode"))
	    If user_name="" Then
                myuser_lostpass = "<form name='found_pass' method='post' action='"& Eshop_url & PagePath(0) &"?action=lostpass'>"
	            myuser_lostpass = myuser_lostpass &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th>"&Lebi_user(21)&"：</th><td class='list2'><input name='verifycode' type='text' style='width:50px;' maxlength='4' class='form' />&nbsp;<img src='"& Eshop_url & Codepath &"' /></td></tr>"
	            myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(19)&"：</th><td class='list2'><input type='text' name='user_name' size='30' class='form' /></td></tr>"
				myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(188)&"：</th><td class='list2'><input name='moditype' type='radio' value='0' checked />"& Lebi_user(187) &""
				If jmail_type <> "0" Then myuser_lostpass = myuser_lostpass &"&nbsp;<input name='moditype' type='radio' value='1' />"& Lebi_user(186)
				myuser_lostpass = myuser_lostpass &"</td></tr>"
				myuser_lostpass = myuser_lostpass &"<tr><td colspan='2' class='list2'><input type='submit' name='bt' value=' "& Lebi_word(48) &" ' class='button'></td></tr>"
	            myuser_lostpass = myuser_lostpass &"</tbody></table></div></form>"
        Else
                if verifycode <> cstr(Session("verifycode")) Then
						myuser_lostpass = CallBack(Lebi_word(3),"·"&Lebi_user(66),"javascript:history.back();",2)
                Else
		                set Rs = conn.execute("select user_name,user_answer,user_question,user_mail from [Lebi_user] where user_id = '"& user_name &"'")
		                If rs.eof Then
								myuser_lostpass = CallBack(Lebi_word(3),"·"&Lebi_user(173),"javascript:history.back();",2)
		                Else
						        If request("moditype") = 0 Then
										If trim(rs("user_answer"))="" Or trim(rs("user_question"))="" Then
												myuser_lostpass = CallBack(Lebi_word(3),"·"&Lebi_user(174),"javascript:history.back();",2)
										Else
												myuser_lostpass = "<form name='found_pass' method='post' action='"&Eshop_url&"user/post.asp?action=getpass'>"
												myuser_lostpass = myuser_lostpass &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th>"&Lebi_user(19)&"：</th><td class='list2'><input type='text' name='user_name' value='"& user_name &"' size='30' class='form' readonly /></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(99)&"：</th><td class='list2'><span style='color:#FF0000;'>"& rs("user_question") &"</span></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(101)&"：</th><td class='list2'><input name='answer' type='text' size='30' class='form' /></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(194)&"：</th><td class='list2'><input name='newpass' type='text' size='30' maxlength='16' class='form' /></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><th>"&Lebi_user(195)&"：</th><td class='list2'><input name='Re_newpass' type='text' size='30' maxlength='16' class='form' /></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='list2' colspan='2'><input type='submit' name='bt' value=' "&Lebi_word(48)&" ' class='button' /> <input type='reset' name='reset' value=' "&Lebi_word(49)&" ' class='button' /></td></tr></tbody></table></div></form>"
										End If
								Else
								        rem 将E-mail取回密码事件写入数据库 2008-1-9 by 56770.kingdge
										Dim Sm,Randnum
										Randomize
										Randnum = Int(999999 * Rnd)
										Set Sm = server.CreateObject("adodb.recordset")
										Sm.open "select * from [Lebi_lostpass] where l_user_id = '"& user_name &"'",conn,1,3
										If Sm.eof Then
										        Sm.addnew
										        Sm("l_user_id") = user_name
												Sm("l_md5str") = Left(md5(Randnum),16)
												Sm("l_date") = Date()
												Sm.update
										Else
										        Sm("l_md5str") = Left(md5(Randnum),16)
												Sm("l_date") = Date()
												Sm.update
										End If
										Sm.close : Set Sm = Nothing
								        rem 将修改密码地址发送至用户E-mail 2008-1-9 by 56770.kingdge
								        If jmail_regon=1 And jmail_type<>0 Then
								                Dim useremail,topic,mailbody,sendmsg,ChangePassUrl
												If request.ServerVariables("SERVER_PORT") <> 80 Then
														ChangePassUrl = "http://"&Request.ServerVariables("SERVER_NAME")&":"&request.ServerVariables("SERVER_PORT")
												Else
														ChangePassUrl = "http://"&Request.ServerVariables("SERVER_NAME")
												End If
												ChangePassUrl = ChangePassUrl & Eshop_url & PagePath(0) &"?action=changepass&u="& Urlencode(user_name) &"&r="&Left(md5(Randnum),16)&""
								                useremail=rs("user_mail")
								                topic=Replace(Lebi_user(189),"[sitename]",sitename)
								                mailbody = ""&Replace(Lebi_user(180),"[user_id]",user_name)&"，<br><br> "&Lebi_user(190)&"：<br><br>------------------------------------------------------<br><a href="""&ChangePassUrl&""" target=""_blank"">"&ChangePassUrl&"</a><br>------------------------------------------------------<br><br> "&Lebi_user(182)&"：<br> E-mail："&sys_mail&"<br>"&Lebi_user(183)&"："&Replace(sys_oicq,"|","&nbsp;&nbsp;")&"<br> "&Lebi_user(184)&"："&sys_tel&"<br> "&Lebi_user(185)&"：<a href='"&site_url&"' target='_blank'>"&site_url&"</a>"
								                Dim Email_56770
								                Set Email_56770 = New Dv_SendMail
								                Email_56770.SendObject = jmail_type
								                Email_56770.ServerLoginName = jmail_sendmail
								                Email_56770.ServerLoginPass = jmail_sendpass
								                Email_56770.SendSMTP = jmail_smtp
								                Email_56770.SendFromEmail = jmail_frommail
								                Email_56770.SendFromName = jmail_sendname
								                If Email_56770.ErrCode = 0 Then
								        	            Email_56770.SendMail useremail,topic,mailbody
								        	            If jmail_sendmail<>"" And jmail_sendpass<>"" And jmail_smtp<>"" Then
								        		                sendmsg = Lebi_user(191)
								        	            Else
								        	                    sendmsg = Lebi_user(178)
								        	            End If
								                Else
								        	            sendmsg= Lebi_user(178)
								                End If
								                Set Email_56770 = Nothing
								        End If
										myuser_lostpass = CallBack(Lebi_user(160),"·"& sendmsg,Eshop_url & LangPath,2)
								End If
		                End If
						rs.close : Set rs = Nothing
		        End If
        End If
End Function

Function myuser_changepass()
        Dim u,r,rs,rsuser
        u = safereplace(Trim(request("u")))
		r = safereplace(Trim(request("r")))
		Set rs = conn.execute("select * from [Lebi_lostpass] where l_user_id = '"& u &"' and l_md5str = '"& r &"'")
		If rs.eof Then
                myuser_changepass = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(192) &"〗","·"& Lebi_user(193),0,3)
		Else
		        If request("do") = "" Then
						myuser_changepass = "<form name='changepass' method='post' action='"& Eshop_url & LangPath &"user/post.asp?action=lostpass'>"
				        myuser_changepass = myuser_changepass &"<div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th>"&Lebi_user(194)&"：</th><td class='list2'><input name='newpass' type='text' size='30' maxlength='16' class='form' /></td></tr>"
				        myuser_changepass = myuser_changepass &"<tr><th>"&Lebi_user(195)&"：</th><td class='list2'><input name='Re_newpass' type='text' size='30' maxlength='16' class='form' /></td></tr>"
				        myuser_changepass = myuser_changepass &"<tr><td class='list' colspan='2'><input type='submit' name='bt' value=' "&Lebi_word(48)&" ' class='button' /> <input type='reset' name='reset' value=' "&Lebi_word(49)&" ' class='button' /><input type='hidden' name='u' value='"& u &"' /><input type='hidden' name='r' value='"& r &"' /></td></tr></tbody></table></div></form>"
				Else
						Set rsuser = conn.execute("select user_mobile,user_name from [Lebi_User] where user_id = '"& u &"'")
						If Not rsuser.eof Then
								If CheckMobile(rsuser(0)) Then
										Dim LoadSMSInfo,SMSMsg
										LoadSMSInfo = LoadStyle(Eshop_url&"include/lebi_data/SMS"& LangTxt &".data")
										If judge2(SMS_SendMode,4) > 0 Then
												SMSMsg = splits(Split(LoadSMSInfo,"@@@")(3))
												ReplaceStyle "user_id",u,SMSMsg
												ReplaceStyle "user_name",rsuser(1),SMSMsg
												ReplaceStyle "time",Now(),SMSMsg
												ReplaceStyle "password",request("newpass"),SMSMsg
												Call RedirectSendSMS(rsuser(0),SMSMsg,"lostpass","",sms_sendtype)
										End If
								End If
						End If
						rsuser.close : Set rsuser = Nothing
				        rem 删除E-mail取回密码事件
				        conn.execute("delete from [Lebi_lostpass] where l_user_id = '"& u &"'")
						myuser_changepass = CallBack(Lebi_user(192),"·"& Lebi_user(175) &" "& request("newpass"),Eshop_url & LangPath &"user/login.asp",3)
				End If
		End If
		rs.close : Set rs = Nothing
End Function

Function payment_inform()
		Dim orders_id,payment_type,payment_money,payment_time,payment_info,payment_state,DataCount
		orders_id = safereplace(trim(request("id")))
		Set rs = conn.execute("select payment_type,payment_money,payment_time,payment_info,payment_state from [Lebi_payment_inform] where orders_id = '"& orders_id &"'")
		If Not rs.eof Then
				payment_type = rs(0)
				payment_money = rs(1)
				payment_time = rs(2)
				payment_info = rs(3)
				payment_state = rs(4)
				DataCount = 1
		Else
				DataCount = 0
				payment_time = Date()
		End If
		rs.close : Set rs = Nothing
		payment_inform = "<script src=""../"& Adminpath &"/inc/js/MyCalendar.js""></script> " &_
		"<form method=POST action="""& Eshop_url & PagePath(25) &"?action=payment_inform_ok&id="& orders_id &"""><div class='myuserinfo'><table width='100%' border='0' cellpadding='0' cellspacing='1' align='center'><tbody><tr><th>"&Lebi_cart(50)&"：</th><td class='list2'><input name=payment_type value="""& payment_type &""" size=30 class=""form"" /></td></tr>" &_
		"<tr><th>"&Lebi_cart(172)&"：</th><td class='list2'><input name=payment_money value="""& payment_money &""" size=30 class=""form"" /></td></tr>" &_
		"<tr><th>"&Lebi_cart(173)&"：</th><td class='list2'><input type=""text"" name=""payment_time"" value="""& payment_time &""" size=""30"" class=""form"" onclick=""setday(this)"" readonly /></td></tr>" &_
		"<tr><th>"&Lebi_cart(174)&"：</th><td class='list2'><textarea rows=5 name=payment_info cols='50' class='form-textarea'>"& payment_info &"</textarea></td></tr>"
		If DataCount = 1 Then
				payment_inform = payment_inform &"<tr><th>"&Lebi_cart(183)&"：</th><td class='list2'>"
				If payment_state = 1 Then
				payment_inform = payment_inform & Lebi_cart(184)
				ElseIf payment_state = 2 Then
				payment_inform = payment_inform & Lebi_cart(186)
				Else
				payment_inform = payment_inform & Lebi_cart(185)
				End If
				payment_inform = payment_inform &"</td></tr>"
				If payment_state <> 1 Then
				payment_inform = payment_inform &"<tr><td colspan=2 class='list2'><input type=submit value="" "& Lebi_word(48) &" "" name=B1 class=""button"" />&nbsp;<input type=reset value="" "& Lebi_word(49) &" "" name=B2 class=""button"" /></td></tr>"
				End If
		Else
				payment_inform = payment_inform &"<tr><td colspan=2 class='list2'><input type='submit' value="" "& Lebi_word(48) &" "" name=B1 class=""button"" />&nbsp;&nbsp;<input type='button' onclick=""location.href='javascript:history.back()'"" value="" "& Lebi_user(121) &" "" name=B2 class=""button"" /></td></tr>"
		End If
		payment_inform = payment_inform &"</tbody></table></div></form>"
End Function
%>