<%
'**************************************
'* 最后更新 2009-8-18 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
user_id = safereplace(request.cookies(cookiesname)("user_id"))
ShowPath = "<a href='"& Eshop_url & LangPath &"'>"& Lebi_word(0) &"</a> → <a href='"& PagePath(0) &"'>"& Lebi_word(8) &"</a>"

Select Case Request("action")
       Case "dingdan" : strwebtitle = Lebi_user(8) &"-" : myuser_main = myuser_orderlist : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=dingdan>"& Lebi_user(8) &"</a>"
       Case "views" : strwebtitle = Lebi_user(8) &"-" : myuser_main = myuser_orderinfo : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=dingdan>"& Lebi_user(8) &"</a>"
	   Case "modi" : strwebtitle = Lebi_user(9) &"-" : myuser_main = myuser_modi : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=dingdan>"& Lebi_user(9) &"</a>"
	   Case "msg" : strwebtitle = Lebi_user(10) &"-" : myuser_main = myuser_msglist : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=msg>"& Lebi_user(10) &"</a>"
	   Case "writemsg" : strwebtitle = Lebi_user(10) &"-" : myuser_main = myuser_writemsg : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=msg>"& Lebi_user(10) &"</a> → "& Lebi_user(106) &""
	   Case "wmsg" : strwebtitle = Lebi_user(10) &"-" : myuser_main = myuser_msg_ok : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=wmsg>"& Lebi_user(10) &"</a>"
	   Case "del_msg" : myuser_main = myuser_msg_del
	   Case "dell" : dell()
	   Case "vip_update" : strwebtitle = Lebi_user(12) &"-" : myuser_main = myuser_vipuser : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=vip_update>"& Lebi_user(12) &"</a>"
	   Case "vip_update_yes" : strwebtitle = Lebi_user(12) &"-" : myuser_main = myuser_vipuser_ok : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=vip_update>"& Lebi_user(12) &"</a>"
	   Case "change_score" : strwebtitle = Lebi_user(11) &"-" : myuser_main = myuser_change_score : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=change_score>"& Lebi_user(11) &"</a>"
	   Case "change_score_yes" : strwebtitle = Lebi_user(11) &"-" : myuser_main = myuser_change_score_ok : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=change_score>"& Lebi_user(11) &"</a>"
	   Case "shenqing" : strwebtitle = Lebi_user(13) &"-" : myuser_main = myuser_sqpay : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=shenqing>"& Lebi_user(13) &"</a>"
	   Case "shenqing_yes" : strwebtitle = Lebi_user(13) &"-" : myuser_main = myuser_sqpay_ok : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=shenqing>"& Lebi_user(13) &"</a>"
	   Case "shoucang" : strwebtitle = Lebi_user(78) &"-" : myuser_main = myuser_collect : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=shoucang>"& Lebi_user(78) &"</a>"
	   Case "shoucang_add" : myuser_main = myuser_collect_add : strwebtitle = Lebi_user(78) &"-" : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=shoucang>"& Lebi_user(78) &"</a>"
	   Case "shoucang_del" : myuser_main = myuser_collect_del() : strwebtitle = Lebi_user(78) &"-" : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=shoucang>"& Lebi_user(78) &"</a>"
	   Case "chongzhi" : strwebtitle = Lebi_user(6) &"-" : myuser_main = myuser_chongzhi : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=chongzhi>"& Lebi_user(6) &"</a>"
	   Case "chongzhi_ok" : strwebtitle = Lebi_user(6) &"-" : myuser_main = myuser_chongzhi_ok : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=chongzhi>"& Lebi_user(6) &"</a>" 
	   Case "chongzhi_update" : strwebtitle = Lebi_user(6) &"-" : myuser_main = myuser_chongzhi_update : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=chongzhi>"& Lebi_user(6) &"</a>"
	   Case "mingxi" : strwebtitle = Lebi_user(7) &"-" : myuser_main = myuser_moneylog : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=mingxi>"& Lebi_user(7) &"</a>"
	   Case "mingxi_del" : mingxi_del() : strwebtitle = Lebi_user(7) &"-" : myuser_main = myuser_moneylog : ShowPath = ShowPath &" → <a href="& PagePath(0) &"?action=mingxi>"& Lebi_user(7) &"</a>"
	   Case "up_orderzt" : myuser_main = myuser_orderinfo_state_ok : strwebtitle = Lebi_cart(113) &"-"
	   Case "lostpass" : myuser_main = myuser_lostpass : strwebtitle = Lebi_user(160) &"-" : ShowPath = ShowPath &" → "& Lebi_user(160) &""
	   Case "lostpass_ok" : myuser_main = myuser_lostpass_ok : 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 &" → "& Lebi_cart(171) &""
	   Case "payment_inform_ok" : myuser_main = payment_inform_ok : strwebtitle = Lebi_cart(171) &"-" : ShowPath = ShowPath &" → "& 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_id") = ""
		response.cookies(cookiesname)("user_grade") = ""
		response.cookies(cookiesname)("cookiesid") = ""
		Response.cookies(cookiesname)("user_key") = ""
		'Response.Cookies(cookiesname).path = ""
		rem 清空JsCookie 2007-2-22 by 56770.kingdge
		Response.cookies(cookiesname&"a")("JsCookieUserId") = ""
		Response.cookies(cookiesname&"b")("JsCookieUserGrade") = ""
		'-----------------------------------------------------------------
		'系统整合
		'-----------------------------------------------------------------
		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 

Sub dell()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        page=checknum(request("page"),1)
        if user_id <>request("user_id")="" Then 
                 response.write"<SCRIPT language=JavaScript>alert('error!');javascript:history.go(-1)</SCRIPT>"
                 response.end
        else
                 conn.execute "delete from [Lebi_orders] where user_id='"& user_id &"' and id=" & checknum(request("id"),0)
        end if
        response.redirect PagePath(0) &"?action=dingdan"
		response.End 
End Sub

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

Function myuser_orderlist()
        If user_id ="" Then
                response.redirect 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"
		    .Table="[Lebi_orders]"
			.Condition="user_id='"& user_id &"'"
            .OrderBy="id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		NewsList_num = 1
		Filename = "default.asp"
        myuser_orderlist = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"&_
		                   "<tr><td width=""100%"" align=""right"" colspan=""6"" class='head'>"& ors.ShowPageHead(Filename) &"</td></tr>"&_
                           "   <tr>"&_
                           "      <td width='20%' class='headmenu'>"& Lebi_cart(86) &"</td>"&_
                           "      <td width='20%' height='25' class='headmenu'>"& Lebi_cart(87) &"</td>"&_
                           "      <td width='10%' class='headmenu'>"& Lebi_cart(140) &"</td>"&_
                           "      <td width='15%' class='headmenu'>"& Lebi_cart(48) &"</td>"&_
						   "      <td width='25%' class='headmenu'>"& Lebi_cart(113) &"</td>"&_
                           "      <td width='10%' 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>"&_
													 "   <td class='list'><a href='"& 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)-coupon_price) &"</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=red>√</font>&nbsp;" 
				End If
				If Instr(DataList(9,i),2)>0 Then 
						myuser_orderlist = myuser_orderlist & Lebi_cart(115) &"：<font color=red>√</font>&nbsp;" 
				End If  
				If Instr(DataList(9,i),3)>0 Then 
						myuser_orderlist = myuser_orderlist & Lebi_cart(116) &"：<font color=red>√</font>&nbsp;" 
				End If  
				If Instr(DataList(9,i),4)>0 then 
						myuser_orderlist = myuser_orderlist & Lebi_cart(117) &"：<font color=red>√</font>&nbsp;" 
				End If  
				If Instr(DataList(9,i),5)>0 Then 
						myuser_orderlist = myuser_orderlist & Lebi_cart(118) &"：<font color=red>√</font>&nbsp;" 
				End If 
				myuser_orderlist = myuser_orderlist &"</td>"&_
													 "   <td class='list'><a href='"& PagePath(0) &"?action=payment_inform&id="& DataList(1,i) &"'>"& Lebi_cart(171) &"</a></td></tr>"
		Next 
        myuser_orderlist = myuser_orderlist &"<tr><td class=""foot"" align=""right"" height=30 colspan='6'>"& ors.ShowPageFoot(Filename) &"</td></tr>"
		End If 
        myuser_orderlist = myuser_orderlist &"</td></tr></table>"
End Function 

Function myuser_orderinfo()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        Dim order_number,Total_money,coupon_price
        order_number=trim(request("id"))
        myuser_orderinfo = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
		myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' colspan='4' class='headmenu'>"& Lebi_user(161) &"</td></tr>"
        set rs = conn.execute("select * from [Lebi_orders] where id="&order_number&" and user_id='"& user_id &"'")
        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 &"<tr><td height='25' width='15%' class='listleft'>"& Lebi_cart(113) &"：</td><td  class='listright' 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='"& PagePath(0) &"?action=up_orderzt&order_number="& rs("order_number") &"&backurl="& server.urlencode(geturl()) &"'"" 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=red>√</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=red>√</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=red>√</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=red>√</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=red>√</font>" 
		        Else
                        myuser_orderinfo = myuser_orderinfo &"×"
		        End If 
                myuser_orderinfo = myuser_orderinfo &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' width='15%' class='listleft'>"& Lebi_cart(86) &"：</td><td class='listright'>"& rs("order_number") &"</td><td height='25' width='15%' class='listleft'>"& Lebi_cart(87) &"：</td><td class='listright'>"& rs("order_time") &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(48) &"：</td><td class='listright'>"& rs("paymenttype") &"</td><td class='listleft'>"& Lebi_cart(49) &"：</td><td class='listright'>"& rs("sendtype") &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"&  Lebi_cart(80) &"：</td><td class='listright' colspan='3'><span style=""color:#FF0000;font-size:18px;font-weight:bold;"">"& dw & FormatNumber2(Total_money/moneyhl) &"</span> = "& Lebi_cart(77) &"："& dw & FormatNumber2(rs("dis_sum")/moneyhl) &" + "& Lebi_cart(78) &"："& dw & FormatNumber2(rs("fei")/moneyhl) &""
				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) End If 
				If rs("packing_price")>0 Then myuser_orderinfo = myuser_orderinfo &" + "& Lebi_cart(164) &"："& dw & FormatNumber2(rs("packing_price")/moneyhl) 
				if coupon_price > 0 Then myuser_orderinfo = myuser_orderinfo &" <font color=""#ff0000"">- "& Lebi_cart(138) &"："& dw & FormatNumber2(coupon_price/moneyhl) &"</font>" 
				myuser_orderinfo = myuser_orderinfo &"</td></tr>"
				If Trim(rs("fuyan")) <> "" Then 
                        myuser_orderinfo = myuser_orderinfo &"<tr><td height='30' class='listleft'>"& Lebi_cart(110) &"：</td><td class='listright' colspan='3'>&nbsp;"& rs("fuyan") &"</td></tr>"
				End If 
				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))
				end If
				shipdb.close : Set shipdb = Nothing
				myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(189) &"：</td><td class='listright'>"& ship_name &"</td><td class='listleft'>"& Lebi_cart(190) &"：</td><td class='listright'>"& ship_no &"</td></tr>"
				myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(191) &"：</td><td class='listright'>"& ship_date &"</td><td class='listleft'>"& Lebi_cart(192) &"：</td><td class='listright'>"& ship_fei1 &"</td></tr>"
                myuser_orderinfo = myuser_orderinfo &"<tr>"&_
                        "     <td height='25' colspan='4' class='headmenu'>"&Lebi_cart(41)&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(42)&"：</td>"&_
                        "     <td class='listright'>"&rs("to_name")&"</td>"&_
                        "     <td class='listleft'>"&Lebi_cart(43)&"：</td>"&_
                        "     <td class='listright'>"&rs("to_tel")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(143)&"：</td>"&_
                        "     <td class='listright'>"&rs("to_tel2")&"</td>"&_
                        "     <td class='listleft'>"&Lebi_cart(45)&"：</td>"&_
                        "     <td class='listright'>"&rs("to_zip")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(46)&"：</td>"&_
                        "     <td colspan='3' class='listright'>"&rs("to_adds")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(47)&"：</td>"&_
                        "     <td colspan='3' class='listright'>"&rs("to_other")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' colspan='4' class='headmenu'>"&Lebi_cart(141)&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(142)&"：</td>"&_
                        "     <td class='listright'>"&rs("from_name")&"</td>"&_
                        "     <td class='listleft'>"&Lebi_cart(43)&"：</td>"&_
                        "     <td class='listright'>"&rs("from_tel")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(44)&"：</td>"&_
                        "     <td class='listright'>"&rs("from_email")&"</td>"&_
                        "     <td class='listleft'>"&Lebi_cart(45)&"：</td>"&_
                        "     <td class='listright'>"&rs("from_zip")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(144)&"：</td>"&_
                        "     <td colspan='3' class='listright'>"&rs("from_adds")&"</td>"&_
                        "   </tr>"&_
                        "   <tr>"&_
                        "     <td height='25' class='listleft'>"&Lebi_cart(47)&"：</td>"&_
                        "     <td colspan='3' class='listright'>"&rs("from_other")&"</td>"&_
                        "   </tr>"
                If rs("iffapiao")=1 Then 
                        myuser_orderinfo = myuser_orderinfo &"<tr><td colspan='4' height='25' class='headmenu'>"& Lebi_cart(52) &"</td></tr>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(54) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_company") &"</td></tr>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(55) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_adds") &"</td></tr>"
                        myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_cart(45) &"：</td><td colspan='3' class='listright'>"& rs("fapiao_zip") &"</td></tr>"
                End If 
                myuser_orderinfo = myuser_orderinfo &"<tr><td colspan='4' class='listright' height='35'><input type=""button"" name=""Sb"" value="""& Lebi_cart(103) &""" ONCLICK=""window.open('"& Eshop_url & LangPath &"basket/paymoney/?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>"
                myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='listleft'>"& Lebi_word(9) &"：</td>"
                myuser_orderinfo = myuser_orderinfo &"<td class='listright' colspan='3'>"
                rem 在线支付模块
				Dim payprice : payprice = formatnumber2(rs("dis_sum")+rs("fei")+rs("fapiao_money")+rs("packing_price")-coupon_price)
                If chinabank_state=1 Then
						If chinabank_paymentpic <> "" 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="& chinabank_url &"' target='_blank'><img src='"& Eshop_url & chinabank_paymentpic &"' alt='使用网银在线付款' 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="& chinabank_url &"');"" value='使用网银在线付款' class='button'>&nbsp;"
						End If 
		        End If 
                If alipay_state=1 Then    
						If alipay_paymentpic <> "" 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="& alipay_url &"' target='_blank'><img src='"& Eshop_url & alipay_paymentpic &"' alt='使用支付宝付款' 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="& alipay_url &"');"" value='使用支付宝付款' class='button'>&nbsp;"
						End If 
		        End If 
                If paypal_state=1 Then
						If paypal_paymentpic <> "" 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) &"&paybackurl="& paypal_url &"' target='_blank'><img src='"& Eshop_url & paypal_paymentpic &"' alt='使用Paypal付款' 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) &"&paybackurl="& paypal_url &"');"" value='使用Paypal付款' class='button'>&nbsp;"
						End If 
		        End If 
                If paypal_cn_state=1 Then
						If paypal_paymentpic <> "" 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="& paypal_cn_url &"' target='_blank'><img src='"& Eshop_url & paypal_cn_paymentpic &"' alt='使用贝宝支付付款' 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="& paypal_cn_url &"');"" value='使用贝宝支付付款' class='button'>&nbsp;"
						End If 
		        End If 
                If bill_state="1" Then 
						If bill_paymentpic <> "" 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="& bill_url &"' target='_blank'><img src='"& Eshop_url & bill_paymentpic &"' alt='使用快钱支付付款' 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="& bill_url &"');"" value='使用快钱支付付款' class='button'>&nbsp;"
						End If 
		        End If 	
                If tenpay_state="1" Then 
						If tenpay_paymentpic <> "" 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="& tenpay_url &"' target='_blank'><img src='"& Eshop_url & tenpay_paymentpic &"' alt='使用财付通-即时到帐付款' 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="& tenpay_url &"');"" value='使用财付通-即时到帐付款' class='button'>&nbsp;"
						End If 
		        End If 	
                If tenpay2_state="1" Then 
						If tenpay2_paymentpic <> "" 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="& tenpay2_url &"' target='_blank'><img src='"& Eshop_url & tenpay2_paymentpic &"' alt='使用财付通-担保支付付款' 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="& tenpay2_url &"');"" value='使用财付通-担保支付付款' class='button'>&nbsp;"
						End If 
		        End If 	
                myuser_orderinfo = myuser_orderinfo &"</td></tr></table>"
        End If 
		Dim sqlGift,RsGift
        sqlGift="select * from [Lebi_basket] where order_number="&rs("id")&" and 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'><tr><td width='55%' height='25' class='headmenu'>"& Lebi_gift(0) &"</td><td width='15%' class='headmenu'>"& Lebi_gift(1) &"</td><td width='15%' class='headmenu'>&nbsp;"& Lebi_gift(6) &"</td><td width='15%' class='headmenu'>&nbsp;"& Lebi_gift(7) &"</td></tr>"
                Do While Not RsGift.eof 
                myuser_orderinfo = myuser_orderinfo &"<tr><td height='25' class='list'>"& RsGift("product_name") &"</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 &"</table>"
        End If 
        RsGift.close : Set RsGift = Nothing 

        Dim SqlPro,RsPro,rss,sqls
        SqlPro="select * from [Lebi_Basket] where order_number="& rs("id") &" and IsGift=0 order by id desc"
        Set RsPro = conn.execute(SqlPro)
		If Not Rspro.eof Then 
                myuser_orderinfo = myuser_orderinfo &"<table width='100%' cellpadding='0' cellspacing='1' align='center' class='basketlist'><tr><td width='15%' height='25' class='headmenu'>"& Lebi_cart(33) &"</td><td width='35%' class='headmenu'>"& Lebi_cart(17) &"</td>"
				If EshopUseType = "1" Then
				        myuser_orderinfo = myuser_orderinfo &"<td width='10%' class='headmenu'>"& Lebi_cart(18) &"</td><td width='10%' class='headmenu'>"& Lebi_cart(19) &"</td>"
				End if 
				myuser_orderinfo = myuser_orderinfo &"<td width='10%' class='headmenu'>"& Lebi_cart(22) &"</td><td width='10%' class='headmenu'>"& Lebi_cart(21) &"</td><td width='10%' class='headmenu'>"& Lebi_cart(23) &"</td></tr>"'Lebi_cart(21) &"</td><td width='10%' align='center' class='headmenu'>"& 
                do while not RsPro.eof
						myuser_orderinfo = myuser_orderinfo &"<tr><td class='list' height='25'>"& RsPro("bianhao") &"</td>"
						myuser_orderinfo = myuser_orderinfo &"<td class='list'><a target='_blank' href='"& Eshop_url & LangPath &""
						Select Case Config_Lebi_Eshop(16)
							   Case "0" : myuser_orderinfo = myuser_orderinfo &"showproduct.asp?id="& RsPro("id")
							   Case "1" : myuser_orderinfo = myuser_orderinfo &"product/?id="& RsPro("id")
							   Case "2" : myuser_orderinfo = myuser_orderinfo &"product/default.asp?id="& RsPro("id")
						End Select 
						myuser_orderinfo = myuser_orderinfo &"'>"& RsPro("product_name") &"</a></td>"
						If EshopUseType = "1" Then
								myuser_orderinfo = myuser_orderinfo &"<td class='list'>"& RsPro("color") &"</td>"
								myuser_orderinfo = myuser_orderinfo &"<td class='list'>"& RsPro("chima") &"</td>"
						End If 
						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 &"</table>"
        End If 
        RsPro.close : set RsPro=Nothing
        rs.close:set rs=nothing
End Function 

Function myuser_modi()
        If user_id ="" Then
                response.redirect 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
        sql="select * from [Lebi_user] where user_id='"& user_id &"'"
        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"))
        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"))
        rs.close:set rs=nothing
        myuser_modi = "<table width='100%' border='0' class='MyUserInfo' cellpadding='0' cellspacing='1' align='center'>"
        myuser_modi = myuser_modi &"<tr><td height='25' colspan='2' class='headmenu'>"& Lebi_user(95) &"</td></tr>"
        if request("xgpass")="ok" then
                myuser_modi = myuser_modi &"<tr><td height='50' colspan='2' CLASS='list'>·"& Lebi_user(94) &"</td></tr>"
        Else          
                myuser_modi = myuser_modi &"<form name='modiinfo' action='"&Eshop_url&"user/post/_myuser.asp?action=xgpass' method='post'>"
                myuser_modi = myuser_modi &"<tr><td width='15%' height='25' class='listleft'>"& Lebi_user(33) &"：</td><td width='85%' class='listright'>&nbsp;<input name='ps' size='20' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(35) &"：</td><td class='listright'>&nbsp;<input name='ps1' size='20' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td colspan='2' height='25' class='list'><input type='submit' name='Submit' value=' "& Lebi_user(103) &" ' class='button'></td></tr></form>"
	    End If 
		myuser_modi = myuser_modi &"</table>"
		myuser_modi = myuser_modi &"<table width='100%' border='0' class='MyUserInfo' cellpadding='0' cellspacing='1' align='center'>"
		myuser_modi = myuser_modi &"<tr><td height='25' colspan='2' class='headmenu'>"& Lebi_user(9) &"</td></tr>"
        if request("xgzl")="ok" Then 
                myuser_modi = myuser_modi &"<tr><td colspan='2' class='list' height='50'>·"& Lebi_user(96) &" </td></tr>"
        Else          
                myuser_modi = myuser_modi &"<form name='modiinfo' action='"&Eshop_url&"user/post/_myuser.asp?action=xgzl' method='post'>"
                myuser_modi = myuser_modi &"<tr><td height='25' width='15%' class='listleft'>"& Lebi_user(30) &"：</td><td class='listright'> <font color='#FF0000'>"& user_id &"</font>&nbsp;"& Lebi_user(97) &"</td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(37) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_name' size='20' value='"& user_name &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(43) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_tel' size='20' value='"& user_tel &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(45) &"：</td><td class='listright'>&nbsp;<input type='text' name='fax' size='20' value='"& fax &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(42) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_mail' size='20' value='"& user_mail &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>QQ：</td><td class='listright'>&nbsp;<input type='text' name='oicq' size='20' value='"& oicq &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(46) &"：</td><td class='listright'>&nbsp;<input type='text' name='city' size='20' value='"& city &"' class='form'>&nbsp;"& Lebi_user(98) &"</td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(50) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_postalcode' size='20' value='"& user_postalcode &"' maxlength='6' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(48) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_adds' size='56' value='"& user_adds &"' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(99) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_question' size='20' value='"& user_question &"' maxlength='20' class='form'>&nbsp;"& Lebi_user(100) &"</td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(101) &"：</td><td class='listright'>&nbsp;<input type='text' name='user_answer' size='20' class='form' maxlength='20'>&nbsp;"& Lebi_user(102) &"</td></tr>"
                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><td height='25' class='listleft'>"& Lebi_user(52) &"：</td><td class='listright'>&nbsp;<input name=fapiao_company value='"& fapiao_company &"' size='30' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(53) &"：</td><td class='listright'>&nbsp;<input name=fapiao_adds value='"& fapiao_adds &"' size='30' class='form'></td></tr>"
                myuser_modi = myuser_modi &"<tr><td height='25' class='listleft'>"& Lebi_user(50) &"：</td><td class='listright'>&nbsp;<input name=fapiao_zip value='"& fapiao_zip &"' size='10' class='form'></td></tr>"
        end if
        if request("xgzl")<>"ok" then
                myuser_modi = myuser_modi &"<tr><td colspan='2' height='25' class='list'><input type='submit' name='Submit' value=' "& Lebi_user(103) &" ' class='button'></td></tr>"
        end if
        myuser_modi = myuser_modi &"</form></table>"
End Function 

Function myuser_msglist()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        myuser_msglist = "<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center' class='MyUserInfo'>"
        myuser_msglist = myuser_msglist&"<tr><td class='list'>"
        myuser_msglist = myuser_msglist&"<table border='0' cellpadding='2' cellspacing='0'>"
        myuser_msglist = myuser_msglist&"<tr><td height='30'><div class='msgbox'><a href='"& PagePath(0) &"?action=msg&action2=inbox'><img src='"&Eshop_url&"images/m_inbox.gif' border='0' align='absmiddle'>"& Lebi_user(104) &"</a></div></td>"
        myuser_msglist = myuser_msglist&"<td><div class='msgbox'><a href='"& 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></td>"
        myuser_msglist = myuser_msglist&"<td><div class='msgbox'><a href='"& PagePath(0) &"?action=writemsg'><img src='"&Eshop_url&"images/m_write.gif' height='22' border='0' align='absmiddle'>"& Lebi_user(106) &"</a></div></td></tr>"
        myuser_msglist = myuser_msglist&"</table></td></tr></table>"
        myuser_msglist = myuser_msglist&"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' CLASS='MyUserInfo'>"
	    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='"& user_id &"'"
            Elseif request("action2")="outbox" Then 
                .Condition="user_id='"& user_id &"'"
	        Else          
	            .Condition="to_user='"& user_id &"'"
            End If 
            .OrderBy="id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		filename="default.asp"
        myuser_msglist = myuser_msglist&"<tr><td width=""100%"" align=""right"" colspan=""4"" class='head'>"& ors.ShowPageHead(Filename) &"</td></tr>"
        myuser_msglist = myuser_msglist&"<form method='post' action='"& PagePath(0) &"'>"
        myuser_msglist = myuser_msglist&"<tr><td width='10%' height='25' CLASS='headmenu'>"& Lebi_user(110) &"</td>"
        myuser_msglist = myuser_msglist&"<td width='60%' CLASS='headmenu'>"& Lebi_user(107) &"</td>"
        myuser_msglist = myuser_msglist&"<td width='20%' CLASS='headmenu'>"& Lebi_user(108) &"</td>"
        myuser_msglist = myuser_msglist&"<td width='10%' CLASS='headmenu'>"& Lebi_user(109) &"</td></tr>"
	    If DataCount < 1 Then 
                myuser_msglist = myuser_msglist&"<tr><td height='50' colspan='4' 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' alt='"& Lebi_user(112) &"'>"
                Else          
                        re="<img src='"&Eshop_url&"images/m_olds.gif' alt='"& Lebi_user(111) &"'>"
                End If 
                myuser_msglist = myuser_msglist&"<tr class='list'><td height='25' class='list'>"& re &"</td>"
                myuser_msglist = myuser_msglist&"<td class='list'><a href='"& 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>"
                myuser_msglist = myuser_msglist&"<td class='list'><input type=checkbox name=msgid value="& DataList(0,i) &"></td></tr>"
                Next 
        End If 
        myuser_msglist = myuser_msglist&"<tr><td colspan='4' height='25' align='right' class='list'><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&"</form></table>"
End Function 

Function myuser_writemsg()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        myuser_writemsg = "<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center' class='MyUserInfo'>"
        myuser_writemsg = myuser_writemsg&"<tr><td class='list'>"
        myuser_writemsg = myuser_writemsg&"<table border='0' cellpadding='2' cellspacing='0'>"
        myuser_writemsg = myuser_writemsg&"<tr><td height='25'><div class='msgbox'><a href='"& PagePath(0) &"?action=msg&action2=inbox'><img src='"&Eshop_url&"images/m_inbox.gif' border='0' align='absmiddle'>"& Lebi_user(104) &"</a></div></td>"
        myuser_writemsg = myuser_writemsg&"<td><div class='msgbox'><a href='"& 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></td>"
        myuser_writemsg = myuser_writemsg&"<td><div class='msgbox'><a href='"& PagePath(0) &"?action=writemsg'><img src='"&Eshop_url&"images/m_write.gif' border='0' align='absmiddle'>"& Lebi_user(106) &"</a></div></td>"
        myuser_writemsg = myuser_writemsg&"<td height='25'><div class='msgbox'><a href='"& PagePath(0) &"?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></td>"
        myuser_writemsg = myuser_writemsg&"<td height='25'><div class='msgbox'><a href='"& 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></td></tr></table>"
        myuser_writemsg = myuser_writemsg&"</td></tr></table>"
        myuser_writemsg = myuser_writemsg&"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        myuser_writemsg = myuser_writemsg&"<form name='form1' method='post' action='"& PagePath(0) &"'>" 
        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 <> user_id 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 = myuser_writemsg&"<tr><td height='25' colspan='2' class='headmenu'>"
	    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&"</td></tr>"
        myuser_writemsg = myuser_writemsg&"<tr><td width='15%' height='25' class='listleft'>"& Lebi_user(107) &"：</td><td width='85%' class='listright'>&nbsp;<input type='text' name='subject' value='"& subject_l & subject &"' SIZE='30' class='form'></td></tr>"
        myuser_writemsg = myuser_writemsg&"<tr><tr><td height='25' class='listleft'>"& Lebi_user(119) &"：</td><td  class='listright'>&nbsp;<textarea name='strmsg' cols='46' rows='10'>"
        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<> user_id Then 
                myuser_writemsg = myuser_writemsg&"<tr><td class='list' 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='"& user_id &"'></td></tr>"
        Else          
                myuser_writemsg = myuser_writemsg&"<tr><td class='list' colspan='2' height='25'><input type='button' name='Submit2' value=' "& Lebi_user(121) &" ' onClick='javascript:window.history.go(-1)' class='button'></td></tr>"
        End If 
        myuser_writemsg = myuser_writemsg&"</form></table>"
End Function 

Function myuser_chongzhi()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        session("chongzhi")="ok"
        myuser_chongzhi = "<script language='javascript'>maxLen = 255; function checkMaxInput(form) {if (form.cz_fuyan.value.length > maxLen) form.cz_fuyan.value = form.cz_fuyan.value.substring(0, maxLen);else form.remLen.value = maxLen - form.cz_fuyan.value.length;}</script>"
        myuser_chongzhi = myuser_chongzhi&"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        myuser_chongzhi = myuser_chongzhi&"<form name='form' method='post' action='"& PagePath(0) &"?action=chongzhi_ok'>"                                        
        myuser_chongzhi = myuser_chongzhi&"<tr><td height='25' colspan='2' class='headmenu'> "& user_id &" ，"& Lebi_user(122) &"</td></tr>" 
        myuser_chongzhi = myuser_chongzhi&"<tr><td height='25' width='15%' class='listleft'>"& Lebi_user(123) &"：</td><td class='listright'>&nbsp;"& dw &" <input type='text' name=cz_price size='5' class=form onkeyup=""value=value.replace(/[^\d\.]/g,'');"" value='"& request("price") &"'></td></tr>"  
        myuser_chongzhi = myuser_chongzhi&"<tr><td height='50' class='listleft'>"& Lebi_user(124) &"：</td><td class='listright'>&nbsp;<font size='1' face='arial, helvetica, sans-serif'><textarea name='cz_fuyan' wrap=physical cols='40' rows='6' id='textarea3' onKeyDown='checkMaxInput(this.form)' onKeyUp='checkMaxInput(this.form)' class='form-textarea'></textarea>&nbsp;<INPUT class=form readonly type=text name=remLen size=3 maxlength=3 value='255'></font></td></tr>" 
        myuser_chongzhi = myuser_chongzhi&"<tr><td height='30' colspan='2' class='list'><input type='hidden' name='shenqingtype' value='"& request("shenqingtype") &"'><input type='submit' name='submit' value=' "& Lebi_user(103) &" ' class='button'></td></tr>"  
        'myuser_chongzhi = myuser_chongzhi&"<tr><td height='180' align='center' class='bg_l'><img src='"&Eshop_url&"images/paymentsby_01_1.gif'></td></tr>" 
        myuser_chongzhi = myuser_chongzhi&"</form></table>"
End Function 

Function myuser_chongzhi_ok()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
	    Dim cz_price,cz_fuyan,linkurl,shenqingtype,chongzhiinfo,v_amount,v_moneytype,style,v_url,curdate,v_oid,text,v_md5info,tl,mes
        cz_price=checknum(request("cz_price"),0)
	    cz_fuyan=safereplace(request("cz_fuyan"))
	    linkurl="http://"& Request.ServerVariables("SERVER_NAME") & PagePath(0) &"?action=chongzhi_update"
	    shenqingtype=safereplace(request("shenqingtype"))
	    myuser_chongzhi_ok = ""
	    If cz_price=0 Then 
		        myuser_chongzhi_ok = CallBack(Lebi_user(6),"·"& Lebi_user(125),0,3)
	    Else
	            v_amount=cz_price
	            v_moneytype = chinabank_leixing
	            style=request("paystyle")
	            '根据系统时间产生订单，格式：YYYYMMDD-v_mid-HMMSS
	            curdate=now()
                v_oid=year(curdate)&month(curdate)&day(curdate)&"-"&chinabank_name&"-"&hour(curdate)&minute(curdate)&second(curdate)
	            text = v_amount&v_moneytype&v_oid&chinabank_name&linkurl&chinabank_key
	            v_md5info=Ucase(trim(md5(text)))	
		        If session("chongzhi")="ok" And cz_price<>"" Then
		                If shenqingtype="" Then 
			                    chongzhiinfo=Lebi_user(6)
			            Else
			                    chongzhiinfo=Lebi_user(13)
			            End If 
		                conn.execute("insert into [Lebi_buy](name,price,fuyan,order_num,addtime,ip)values('"& user_id &"',"&cz_price&",'"&cz_fuyan&"','"&v_oid&"',"&sqlnowstring&",'"& request.servervariables("remote_addr") &"')")
			            rem 预存款消费明细 2006-1-2 56770.kingdge
			            conn.execute("insert into [Lebi_money_log](m_user_id,m_content,m_order_num,m_sj,m_type,m_price,m_zt)values('"& user_id &"','"&cz_fuyan&"','"&v_oid&"',"&sqlnowstring&",'"&chongzhiinfo&"',"&v_amount&",0)")
			            session("chongzhi")=""
                End If 
                myuser_chongzhi_ok = myuser_chongzhi_ok &"<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
                myuser_chongzhi_ok = myuser_chongzhi_ok &"<tr><td height='25' class='headmenu'>"& user_id &" ，"& Lebi_user(122) &"</td></tr>" 
                myuser_chongzhi_ok = myuser_chongzhi_ok &"<form method='post' action='https://pay3.chinabank.com.cn/PayGate' name='E_FORM' target=new>"
                myuser_chongzhi_ok = myuser_chongzhi_ok &"<tr><td height='100' class='list' colspan='2'>"
                If chinabank_state = "1" Then 
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type=submit name=v_action value='"& Lebi_user(126) &"' class='button'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_md5info' size='100'  value='"& v_md5info &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_mid' value='"& chinabank_name &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_oid' value='"& v_oid &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_amount' value='"& v_amount &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_moneytype'  value='"& v_moneytype &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='v_url' value='"& linkurl &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='style' value='"& style &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='remark1' value='"& user_id &"'>"
                        myuser_chongzhi_ok = myuser_chongzhi_ok &"<input type='hidden' name='remark2' value='"& shenqingtype &"'>"
			            myuser_chongzhi_ok = myuser_chongzhi_ok &"<br>("& dw & formatnumber2(v_amount) &")"
				Else
						myuser_chongzhi_ok = myuser_chongzhi_ok & Lebi_user(140)
	            End If 
                myuser_chongzhi_ok = myuser_chongzhi_ok &"</td></tr></form></table>"
        End If 
End Function 

Function myuser_chongzhi_update()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        v_oid=safereplace(request.querystring("v_oid"))
        v_pmode=safereplace(request.querystring("v_pmode"))
        v_pstatus=safereplace(request.querystring("v_pstatus"))
        v_pstring=safereplace(request.querystring("v_pstring"))
        v_md5info=safereplace(request.querystring("v_md5info"))
        v_amount=checknum(request.querystring("v_amount"),0)
        v_moneytype=safereplace(request.querystring("v_moneytype"))
        v_md5money=safereplace(request.querystring("v_md5money"))
        v_md5=safereplace(request.querystring("v_md5"))
        user_id=safereplace(request.querystring("user_id"))
        remark1=safereplace(request.querystring("remark1"))
        remark2=safereplace(request.querystring("remark2"))
        cz_user_id=remark1
        'md5校验
        text = v_oid&v_pstatus&v_amount&v_moneytype&chinabank_key
        md5text = trim(md5(text))
        myuser_chongzhi_update = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        '按md5检验情况输出结果 Ucase转换为大写
        If Ucase(md5text)<>Ucase(v_md5) Then 
                myuser_chongzhi_update = myuser_chongzhi_update &"<tr><td height='50' align='center' class='list'>Error</td></tr>"
        Else 
		        rem 增加防刷新 2006-7-25 by 56770.kingdge
		        set Rs = conn.execute("select * from [Lebi_money_log] where m_order_num='"& v_oid &"' and m_zt=0")
		        If not rs.eof Then 
                        conn.execute("UPDATE [Lebi_user] SET usermoney=usermoney+"&v_amount&" where user_id='"& cz_user_id &"'")
                        conn.execute("UPDATE [Lebi_money_log] SET m_zt=1 where m_order_num='"&v_oid&"'")
			            conn.execute("UPDATE [Lebi_buy] SET orderzt=1 where order_num='"&v_oid&"'")
		        End If 
                rem 若有错误发生
                If Err.Number <> 0 Then
		                myuser_chongzhi_update = myuser_chongzhi_update &"<tr><td height='100' align='center' class='list'><br>"
                        myuser_chongzhi_update = myuser_chongzhi_update &"error" & Err.Number & "<br>"
                        myuser_chongzhi_update = myuser_chongzhi_update &"error" & Err.Source & "<br>"
                        myuser_chongzhi_update = myuser_chongzhi_update &"error" & Err.Description & "<br>"
			            myuser_chongzhi_update = myuser_chongzhi_update &"</td></tr>"
                Else
                        myuser_chongzhi_update = myuser_chongzhi_update &"<tr><td height='50' class='list'><font color='#FF0000'>提示：</font><br><br>&nbsp; &nbsp; &nbsp;此次交易编号 "& v_oid &"<br><br>&nbsp; &nbsp; &nbsp;"
		                if v_pstatus=1 Then
                                myuser_chongzhi_update = myuser_chongzhi_update & "支付已提交，但已对您的非实时银行卡已经进行扣款"
		                elseif v_pstatus=20 then
                                myuser_chongzhi_update = myuser_chongzhi_update & "在线支付充值成功"
		                elseif v_pstatus=30 then
                                myuser_chongzhi_update = myuser_chongzhi_update & "在线支付失败!"
		                end If
                        myuser_chongzhi_update = myuser_chongzhi_update &"</td></tr><tr><td height='25' class='list'>&nbsp; &nbsp; &nbsp;"& Lebi_user(123) &"："& FormatNumber(v_amount,2) &"</td></tr>" 
                End If
        End If 
        myuser_chongzhi_update = myuser_chongzhi_update &"</table>"
End Function 

Function myuser_moneylog()
        If user_id ="" Then
                response.redirect 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='"& user_id &"'"
            .OrderBy="m_id desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		Filename = "default.asp"
        myuser_moneylog = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        myuser_moneylog = myuser_moneylog&"<tr><td width=""100%"" align=""right"" colspan=""5"" class='head'>"& ors.ShowPageHead(Filename) &"</td></tr>"
        myuser_moneylog = myuser_moneylog&"<tr><td height='25' class='headmenu' width='25%'>"& Lebi_user(127) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='headmenu' width='15%'>"& Lebi_user(123) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='headmenu'>"& Lebi_user(129) &"</td>"
        myuser_moneylog = myuser_moneylog&"<td class='headmenu' width='20%'> "& Lebi_user(128) &" </td>"
        myuser_moneylog = myuser_moneylog&"<td class='headmenu' width='8%'>"& Lebi_user(110) &"</td></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><td height='25' class='list' style='font-size:12px;'>"& 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=red>"& log_state &"</font></strong></td></tr>"
        If Trim(DataList(5,i))<>"" Then   
                myuser_moneylog = myuser_moneylog&"<tr><td colspan='5' class='list'>"& DataList(5,i) &"</td></tr>"
        End If 
        Next 
		End If 
        myuser_moneylog = myuser_moneylog&"<tr><td colspan=5 height=30 align=right class='list' style='padding:5px;'>"& ors.ShowPageFoot(Filename) &"</td></tr></table>"
End Function 

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

Function myuser_vipuser()
		Dim needjifen,jifenyxq
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        set rs=conn.execute("select jifen,user_grade,yxq from [Lebi_user] where user_id='"& user_id &"'")
        myuser_vipuser = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        myuser_vipuser = myuser_vipuser &"<form name='form' method='post' action='"& PagePath(0) &"?action=vip_update_yes'>"  
        myuser_vipuser = myuser_vipuser &"<tr><td height='25' class='headmenu'> "& Lebi_user(12) &"</td></tr>" 
        myuser_vipuser = myuser_vipuser &"<tr><td height='25' class='list'> "& user_id &" ，"& 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 height='30' class='list'>"& Lebi_user(135) &"<font color=red>"& rs("jifen") &"</font> ，"& replace(Lebi_user(136),"{needjifen}",getGradePurview(11)) &"</td></tr>"  
						myuser_vipuser = myuser_vipuser &"<tr><td height='30' class='list'><input type=submit name=submit value=' "& Lebi_user(103) &" ' class='button'></td></tr>"
				Else
						myuser_vipuser = myuser_vipuser &"<tr><td height='30' class='list'>"&Lebi_user(139)&"</td></tr>" 
				End If 
		Else 
				myuser_vipuser = myuser_vipuser &"<tr><td height='30' class='list'>"&Lebi_user(140)&"</td></tr>" 
		End If 
		rem	}->
        rs.close:set rs=Nothing 
	    myuser_vipuser = myuser_vipuser                                                     
        myuser_vipuser = myuser_vipuser &"</form></table>"
End Function 

Function myuser_change_score()
        If user_id ="" Then
                response.redirect 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='"& user_id &"'")
        If Not rs.eof Then 
                jifen=rs("jifen")
                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 = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
        myuser_change_score = myuser_change_score &"<tr><td height='25' colspan='2' class='headmenu'>"& Lebi_user(11) &"</td></tr>" 
        if CStr(getGradePurview(4)) = "1" then 
                myuser_change_score = myuser_change_score &"<form name='form' method='post' action='"& PagePath(0) &"?action=change_score_yes'>"         
                myuser_change_score = myuser_change_score &"<tr><td height='25' colspan='2' class='list'> <u>"& user_id &"</u> ，"& Replace(Replace(Replace(Lebi_user(141),"{jifen}",jifen),"{dw}",dw),"{jiefen_zh}",CDbl(getGradePurview(5))) &"</td></tr>"  
                myuser_change_score = myuser_change_score &"<tr><td width='15%' height='25' class='listleft'>"& Lebi_user(142) &"：</td><td class='listright'><input type='text' name=c_jifen size='5' class=form> "& Lebi_user(143) &"</td></tr>"  
                myuser_change_score = myuser_change_score &"<tr><td height='30' colspan='2' class='list'><input type=submit name=submit value=' "& Lebi_user(103) &" ' class='button'></td></tr></form>"
		Else
		        myuser_change_score = myuser_change_score &"<tr><td height='50' colspan='2' class='list'>"& Lebi_user(140) &"</td></tr>"
		End If 
        myuser_change_score = myuser_change_score &"</table>"
End Function 

Function myuser_vipuser_ok()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
		Dim tl,mes
        set Rs = server.CreateObject("adodb.recordset")
		rs.open "select jifen,user_grade,update_grade_time from [Lebi_user] where user_id='"& user_id &"'",conn,1,3
        if rs("jifen")<CLng(getGradePurview(11)) Then
		        myuser_vipuser_ok = CallBack(Lebi_user(12),"·"& Lebi_user(144),0,3)
        ElseIf cache_auto_upgrade(rs("user_grade"))="1" Then  
				If CInt(getGradePurview(12)) = 1 Then rs("jifen") = rs("jifen") - CDbl(getGradePurview(11))
				rs("user_grade") = CInt(rs("user_grade")) + 1
				rs("update_grade_time") = Date()
		        Response.cookies(cookiesname)("user_grade") = CInt(rs("user_grade")) + 1
				rs.update 
		        myuser_vipuser_ok = CallBack(Lebi_user(12),"·"& Lebi_user(145),0,3)
		Else
				myuser_vipuser_ok = CallBack(Lebi_user(12),"·"& Lebi_user(144),0,3)
        End If
        rs.close:set rs=nothing
End Function 

Function myuser_change_score_ok()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        Dim mes
        if CStr(getGradePurview(4)) = "1" then
        sql="select jifen from [Lebi_user] where user_id='"& user_id &"'"
        set rs= conn.execute(sql)
        if isempty(request("c_jifen")) or isnumeric(request("c_jifen"))=false Then
                mes="·"&Lebi_user(146)
        elseif int(request("c_jifen"))>rs("jifen") Then
                mes="·"&Lebi_user(144)
        elseif int(request("c_jifen"))<100 Then
                mes="·"&Lebi_user(147)
        Else 
                conn.execute "update [Lebi_user] set jifen=jifen-"&request("c_jifen")&" where user_id='"& user_id &"'"
                conn.execute "update [Lebi_user] set usermoney=usermoney+"&safereplace(request("c_jifen"))*CDbl(getGradePurview(5))&" where user_id='"& user_id &"'"
                mes="·"&Lebi_user(148)&" "& dw & safereplace(request("c_jifen"))*CDbl(getGradePurview(5))
        end If
		myuser_change_score_ok = CallBack(Lebi_user(11),mes,0,3)
        rs.close:Set rs=Nothing 
        end if 
End Function 

Function myuser_sqpay_ok() ' 2008-3-7 by 56770.WangLei
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        Dim mes
        set Rs = conn.execute("select jifen,sumpay from [Lebi_user] where user_id='"& user_id &"'")
        If (clng(rs(0))<clng(getGradePurview(7)) And clng(rs(1))<clng(getGradePurview(8))) Then
                mes="·"&Lebi_user(149)
        Else 
	            conn.execute("update [Lebi_user] set ifpay=1 where user_id='"&   user_id &"'")
                mes="·"&Lebi_user(200)
        end If
		myuser_sqpay_ok = CallBack(Lebi_user(13),mes,0,3)
        rs.close:set rs=Nothing
End Function 

Function myuser_collect_add()
		rem	<-{ 判断会员组收藏权限 2008-3-4 by 56770.WangLei
		If getGradePurview(1) <> 1 Then 
				response.redirect PagePath(1) &"?action=notgrade"
		        response.End 
		End If 
		rem	}->
        Dim pid,id,product_name,mes,backurl,product_type,rsCount
        id = clng(request("id"))
        pid = clng(request("id"))
		product_type = safereplace(Trim(request("product_type")))
        product_name = safereplace(Trim(request("product_name")))
		If show_html = "0" Then 
				backurl = trim(request("backurl"))
		Else
				backurl = "javascript:history.go(-1)" 'Request.ServerVariables("HTTP_REFERER")
		End If 
		If backurl = "" Then backurl = "javascript:history.go(-1)"
        '//收藏，判断是否存在
        set rs=server.CreateObject("adodb.recordset")
        sql="select id,user_id,actiondate,product_name,product_type from [Lebi_action] where user_id='"& user_id &"' and id="&id
        rs.open sql, conn, 1, 3
        if not rs.eof and not rs.bof Then
                mes="·"&Lebi_user(152)
        Else 
                '//判断收藏数
				rsCount = conn.execute("select count(id) from [Lebi_action] where user_id='"& user_id &"'")(0)
                if rsCount >= CInt(getGradePurview(21)) Then
						
                        mes="·"& replace(Lebi_user(153),"{fav_qty}",getGradePurview(21))
                Else 
                        '//添加收藏
                        rs.addnew
                        rs("id")=id
                        rs("user_id")=user_id
                        rs("actiondate")=now()
                        rs("product_name")=Left(product_name,50)
						If product_type <> "[product_type]" Then  'WangLei 2008-1-14
							rs("product_type") = product_type 
						End If 
                        rs.update
						mes="·"&Lebi_user(154)
                end If
                rs.close:set rs=nothing
        end If
		myuser_collect_add = CallBack(Lebi_user(78),mes,backurl,3)
End Function  

Function myuser_collect_del()
		Dim del_id
        del_id= Replace(safereplace(Trim(request("id"))),"，",",")
		If Right(del_id,1) = "," Then del_id = Left(del_id,Len(del_id)-1)
        conn.execute("delete from [Lebi_action] where user_id='"& user_id &"' and actionid in("&del_id&")")
		backurl = "?action=shoucang&page="& request("page")
		myuser_collect_del = CallBack(Lebi_user(78),"·"&Lebi_word(68),backurl,3)
End Function

Function myuser_collect() 
		Dim formaction
		Select Case Config_Lebi_Eshop(16)
			   Case "2" formaction = Eshop_url & LangPath &"basket/default.asp"
			   Case Else
					formaction = Eshop_url & LangPath &"basket/"
		End Select 
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        rem 删除超过允许收藏时间的商品
        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)*60&"")
        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='"& user_id &"'"
            .OrderBy="a.actiondate desc"
	    End With
	    DataCount=ors.RecCount()
	    DataList=ors.ResultSet()
		Filename = "default.asp"
        myuser_collect = "<table width='100%' border='0' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"&_
		                 "   <tr><td height='30' colspan='2' class='list'><font color=red><b>！</b></font> "&Replace(Lebi_user(155),"{savehour}","<font color=red><b>"&Config_Lebi_Eshop(10)&"</b></font>")&"</td></tr>"&_
                         "  <form method=post action='"& formaction &"' target=new>"&_
                         "   <tr>"&_
                         "      <td width='80%' height='25' class='headmenu'>"&Lebi_pro(0)&"</td>"&_
                         "      <td width='20%' class='headmenu'>"&Lebi_user(156)&"</td>"&_
		         "   </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" : p_url = Eshop_url & LangPath & "unite/show/?id="&DataList(0,i)
								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 Config_Lebi_Eshop(16)
										   Case "0" : p_url = Eshop_url & LangPath & "showproduct.asp?id="&DataList(0,i)
										   Case "1" : p_url = Eshop_url & LangPath & "product/?id="&DataList(0,i)
										   Case "2" : p_url = Eshop_url & LangPath & "product/default.asp?id="&DataList(0,i)
									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 
								pic_url = Split(rs(0),"@@")(0)
								If pic_url = "" Then pic_url = Split(rs(0),"@@")(1)
						End If 
						rs.close : Set rs = Nothing 
				End If 
			    myuser_collect = myuser_collect &"<tr class='list'><td height='25' 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 colspan=2 height=30 align=right class='list' style='padding:5px;'>"& ors.ShowPageFoot(Filename) &"</td></tr>"
        myuser_collect = myuser_collect &"   <tr>"&_
		                                 "      <td align=""right"" colspan=""2"" class=""list"" height='30'><span style=""FLOAT: left;""><input type='hidden' name='action' value='addcart'><input type='hidden' name='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> <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>"&_
                                         " </form>"&_
		                                 "</table>"
        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=""?action=shoucang_del&id=""+param+""&page=""+page+"""";}else return;}}</script>"
End Function 

Function myuser_msg_ok()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        subject=safereplace(trim(request("subject")))
        strmsg=Replace(request("strmsg"),"'","&#180;")
        user_id=safereplace(request("user_id"))
        idate=now()
        ifre=1
        to_user="Admin"
        If subject="" or strmsg="" Then
		        myuser_msg_ok = CallBack(Lebi_user(10),"·"&Lebi_user(158),0,3)
        Else 
                conn.execute "insert into [Lebi_message] (subject,msg, user_id, idate, to_user)values('"&subject&"', '"&strmsg&"', '"&user_id&"', '"&idate&"', '"&to_user&"')"
                myuser_msg_ok = CallBack(Lebi_user(10),"·"&Lebi_user(130),PagePath(0) &"?action=msg&action2=outbox",3)
        End if
End Function 

Function myuser_msg_del()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
        Dim msgid
		msgid = checknum(request("msgid"),0)
        If msgid="0" Then
		        myuser_msg_del = CallBack(Lebi_user(10),"·"&Lebi_user(159),0,3)
        Else 
                conn.execute "delete from [Lebi_message] where id in ("&msgid&") and (user_id='"& user_id &"' or to_user='"& user_id &"')"
                response.redirect PagePath(0) &"?action=msg&action2="&request("action2")
                response.End
        End if
End Function 

Function myuser_orderinfo_state_ok()
        If user_id ="" Then
                response.redirect PagePath(1) &"?action=needlogin"
		        response.End 
        End If 
		Dim order_number
        order_number = Safereplace(request("order_number"))
        Set rs = server.CreateObject("adodb.recordset")
		rs.open "select orderzt from [Lebi_orders] where order_number='"& order_number &"' and user_id='"& user_id &"'",conn,1,3
	    If Not rs.eof Then 
				If InStr(rs(0),"1") > 0 Then 
						rs(0) = "1,2"
				elseIf InStr(rs(0),"3") > 0 Then 
						rs(0) = "1,2,3"
				ElseIf InStr(rs(0),"4") > 0 Then 
						rs(0) = "1,2,3,4"
				Else
						rs(0) = "2"
				End If 
				conn.execute("update [Lebi_ShipMes] set s_state = 1 where s_order_number='"& order_number &"'")
        End If 
	    rs.close:Set rs=Nothing 
	    myuser_orderinfo_state_ok = CallBack(Lebi_cart(113),"·"&Lebi_cart(117)&"!",request("backurl"),3)
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 = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
	            myuser_lostpass = myuser_lostpass &"<form name='found_pass' method='post' action='"& PagePath(0) &"?action=lostpass'>"
	            myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' colspan='2' height='25'>"& Lebi_user(160) &"</td></tr>"
	            myuser_lostpass = myuser_lostpass &"<tr><td width='15%' class='listleft' height='25'>"&Lebi_user(21)&"：</td><td width='85%' class='listright'><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><td class='listleft' height='25'>"&Lebi_user(19)&"：</td><td class='listright'><input type='text' name='user_name' size='20' class='form'></td></tr>"
				myuser_lostpass = myuser_lostpass &"<tr><td class='listleft' height='25'>"&Lebi_user(188)&"：</td><td class='listright'><input name='moditype' type='radio' value='0' checked>"& Lebi_user(187) &"&nbsp;<input name='moditype' type='radio' value='1'>"& Lebi_user(186) &"</td></tr>"
				myuser_lostpass = myuser_lostpass &"<tr><td colspan='2' height='25' class='list'><input type='submit' name='bt' value=' "& Lebi_word(48) &" ' class='button'></td></tr>"
	            myuser_lostpass = myuser_lostpass &"</form></table>"
        Else    
                if verifycode <> cstr(Session("verifycode")) Then
                        myuser_lostpass = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
						myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' height='25'>"& Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗</td></tr>"
						myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list'>·"& Lebi_user(66) &"</td></tr>"
						myuser_lostpass = myuser_lostpass &"<tr><td height='30' class='list'>·<a href='javascript:history.go(-1)'><font color=red><span id=""backtime"">0</span></font> "&Lebi_user(75)&"</a></td></tr>"
						myuser_lostpass = myuser_lostpass &"<script language=""JavaScript"">Url=""javascript:history.go(-1)"";if (!Url){Url=document.referrer}function countDown(secs){document.getElementById(""backtime"").innerHTML=secs;if(--secs>0) {setTimeout(""countDown(""+secs+"")"",1000);}else {window.location.href=Url;}}countDown(3);</script>"
						myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list' align='right'><a href='javascript:history.go(-1)'><img border=0 src="&Eshop_url&"images/re.gif align=absmiddle> "& Lebi_word(4) &"</a></td></tr>"
						myuser_lostpass = myuser_lostpass &"</table>"
                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 = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
						        myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' height='25'>"& Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗</td></tr>"
						        myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list'>·"& Lebi_user(173) &"</td></tr>"
						        myuser_lostpass = myuser_lostpass &"<tr><td height='30' class='list'>·<a href='javascript:history.go(-1)'><font color=red><span id=""backtime"">0</span></font> "&Lebi_user(75)&"</a></td></tr>"
						        myuser_lostpass = myuser_lostpass &"<script language=""JavaScript"">Url=""javascript:history.go(-1)"";if (!Url){Url=document.referrer}function countDown(secs){document.getElementById(""backtime"").innerHTML=secs;if(--secs>0) {setTimeout(""countDown(""+secs+"")"",1000);}else {window.location.href=Url;}}countDown(3);</script>"
						        myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list' align='right'><a href='javascript:history.go(-1)'><img border=0 src="&Eshop_url&"images/re.gif align=absmiddle> "& Lebi_word(4) &"</a></td></tr>"
						        myuser_lostpass = myuser_lostpass &"</table>"
		                Else    
						        If request("moditype") = 0 Then 
										If trim(rs("user_answer"))="" Or trim(rs("user_question"))="" Then 
												myuser_lostpass = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' height='25'>"& Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗</td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list'>·"& Lebi_user(174) &"</td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td height='30' class='list'>·<a href='javascript:history.go(-1)'><font color=red><span id=""backtime"">0</span></font> "&Lebi_user(75)&"</a></td></tr>"
												myuser_lostpass = myuser_lostpass &"<script language=""JavaScript"">Url=""javascript:history.go(-1)"";if (!Url){Url=document.referrer}function countDown(secs){document.getElementById(""backtime"").innerHTML=secs;if(--secs>0) {setTimeout(""countDown(""+secs+"")"",1000);}else {window.location.href=Url;}}countDown(3);</script>"
												myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list' align='right'><a href='javascript:history.go(-1)'><img border=0 src="&Eshop_url&"images/re.gif align=absmiddle> "& Lebi_word(4) &"</a></td></tr>"
												myuser_lostpass = myuser_lostpass &"</table>"
										Else          
												myuser_lostpass = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
												myuser_lostpass = myuser_lostpass &"<form name='found_pass' method='post' action='"&Eshop_url&"user/post/_myuser.asp?action=getpass'>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' colspan='2' height='25'>"& Lebi_user(160) &"</td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td width='15%' class='listleft' height='25'>"&Lebi_user(19)&"：</td><td width='85%'  class='listright'><input type='text' name='user_name' value='"& user_name &"' size='10' class='form' readonly></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='listleft' height='25'>"&Lebi_user(99)&"：</td><td class='listright'><span style='color:#FF0000;'>"& rs("user_question") &"</span></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='listleft' height='25'>"&Lebi_user(101)&"：</td><td class='listright'><input name='answer' type='text' size='10' class='form'></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='listleft' height='25'>"&Lebi_user(33)&"：</td><td class='listright'><input name='newpass' type='text' size='10' maxlength='16' class='form'></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='listleft' height='25'>"&Lebi_user(35)&"：</td><td class='listright'><input name='Re_newpass' type='text' size='10' maxlength='16' class='form'></td></tr>"
												myuser_lostpass = myuser_lostpass &"<tr><td class='list' colspan='2' height='30'><input type='submit' name='bt' value=' "&Lebi_word(48)&" ' class='button'> <input type='reset' name='reset' value=' "&Lebi_word(49)&" ' class='button'></td></tr>"
												myuser_lostpass = myuser_lostpass &"</form></table>"
										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
												ChangePassUrl = "http://"& Request.ServerVariables("SERVER_NAME") & PagePath(0) &"?action=changepass&u="& server.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 = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
						                myuser_lostpass = myuser_lostpass &"<tr><td class='headmenu' height='25'>"& Lebi_user(160) &"</td></tr>"
						                myuser_lostpass = myuser_lostpass &"<tr><td height='25' class='list'>·"& sendmsg &"</td></tr>"
						                myuser_lostpass = myuser_lostpass &"</table>"
								End If 
		                End If 
						rs.close : Set rs = Nothing 
		        End If	
        End If 
End Function 

Function myuser_lostpass_ok()
        Dim user_name,answer,newpass,Re_newpass
        user_name = safereplace(trim(request("user_name")))
        answer = safereplace(trim(request("answer")))
        newpass = safereplace(trim(request("newpass")))
        Re_newpass = safereplace(trim(request("Re_newpass")))
		If Len(newpass) < 6 Or Len(newpass) > 16 Then 
				myuser_lostpass_ok = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗","·"& Lebi_user(162),0,3)
		End If 
        If newpass <> Re_newpass Then 
				myuser_lostpass_ok = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗","·"& Lebi_user(58),0,3)
	    End If       
	    set Rs = conn.execute("select user_answer from [Lebi_user] where user_id = '"& user_name &"'")
	    If not rs.eof Then 
                If cstr(trim(rs("user_answer"))) = cstr(md5(answer)) Then
			            conn.execute("Update [Lebi_user] set user_password='"& md5(trim(newpass)) &"' where user_id='"& user_name &"'")
						myuser_lostpass_ok = CallBack(Lebi_user(160),"·"& Lebi_user(175) &" "& newpass,Eshop_url & LangPath &"user/login/",3)
                Else         
						response.write trim(rs("user_answer")) &"|"& cstr(md5(answer))
						myuser_lostpass_ok = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗","·"& Lebi_user(176),0,3)
                End If 
		Else          
				myuser_lostpass_ok = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_user(160) &"〗","·"& Lebi_user(173),0,3)
		End If 
End Function 

Function myuser_changepass()
        Dim u,r,rs
        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 = "<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'>"
						myuser_changepass = myuser_changepass &"<tr><td class='headmenu' colspan='2' height='25'>"& Lebi_user(192) &"</td></tr>"
				        myuser_changepass = myuser_changepass &"<form name='changepass' method='post' action='"& Eshop_url & LangPath &"user/post/_myuser.asp?action=lostpass'>"
				        myuser_changepass = myuser_changepass &"<tr><td class='listleft' height='25'>"&Lebi_user(194)&"：</td><td class='listright'><input name='newpass' type='text' size='10' maxlength='16' class='form'></td></tr>"
				        myuser_changepass = myuser_changepass &"<tr><td class='listleft' height='25'>"&Lebi_user(195)&"：</td><td class='listright'><input name='Re_newpass' type='text' size='10' maxlength='16' class='form'></td></tr>"
				        myuser_changepass = myuser_changepass &"<tr><td width='100%' class='list' colspan='2' height='30'><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>"
				        myuser_changepass = myuser_changepass &"</form>"
						myuser_changepass = myuser_changepass &"</table>"
				Else
				        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/",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/MyCalendar.js""></script> " &_
		"<table width='100%' cellpadding='0' cellspacing='1' align='center' class='MyUserInfo'><form method=POST action="""& PagePath(0) &"?action=payment_inform_ok&id="& orders_id &"""><tr><td height='25' colspan=2 class='headmenu'> "&Lebi_cart(171)&"</td></tr>" &_
		"<tr><td class='listleft' height='25'>"&Lebi_cart(50)&"：</td><td class='listright'><input name=payment_type value="""& payment_type &""" size=20 class=""form""></td></tr>" &_
		"<tr><td class='listleft' height='25'>"&Lebi_cart(172)&"：</td><td class='listright'><input name=payment_money value="""& payment_money &""" size=20 class=""form""></td></tr>" &_
		"<tr><td class='listleft' height='25'>"&Lebi_cart(173)&"：</td><td class='listright'><input type=""text"" name=""payment_time"" value="""& payment_time &""" size=""15"" class=""form"" onclick=""setday(this)"" /></td></tr>" &_
		"<tr><td class='listleft' height='25'>"&Lebi_cart(174)&"：</td><td class='listright'><textarea rows=5 name=payment_info cols=50  class='text'>"& payment_info &"</textarea></td></tr>"
		If DataCount = 1 Then 
				payment_inform = payment_inform &"<tr><td class='listleft' height='25'>"&Lebi_cart(183)&"：</td><td class='listright'>"
				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='list' height='30' align='center'><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='list' height='30' align='center'><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 
		payment_inform = payment_inform &"</form></table>" 
End Function

Function payment_inform_ok()
        Dim orders_id,payment_type,payment_money,payment_time,payment_info,p_error,err_msg
		p_error=false
		orders_id = safereplace(trim(request("id")))
        payment_type = safereplace(trim(request("payment_type")))
        payment_money = safereplace(trim(request("payment_money")))
        payment_time = safereplace(trim(request("payment_time")))
        payment_info = safereplace(trim(request("payment_info")))
		If orders_id = "" Then
				p_error = True
				err_msg = err_msg & "·"& Lebi_cart(177)
'		Else
'			Set rs = conn.execute("select user_id from [Lebi_orders] where order_number='"&orders_id&"'")
'			If Not rs.eof Then 
'				user_id = rs("user_id")
'			Else
'				p_error = True
'				err_msg = err_msg & "<tr><td height='25'>·"& Lebi_cart(177) &"</td></tr>"
'			End If 
'			rs.close : Set rs = Nothing 
		End If 
		If payment_type = "" Then
				p_error = True
				err_msg = err_msg & "·"& Lebi_cart(175) &"<br/>"
		End If 
		If payment_money = "" Or Not IsNumeric(payment_money) Then 
				p_error = True
				err_msg = err_msg & "·"& Lebi_cart(176) &"<br/>"
		End If 
		If Not p_error Then 
				set rs=server.CreateObject("adodb.recordset")
				rs.open "select * from [Lebi_payment_inform] where orders_id = '"& orders_id &"'", conn,1,3
				If not rs.eof Then 
	'				p_error = True
	'				err_msg = err_msg & "<tr><td height='25'>·"& Lebi_cart(178) &"</td></tr>"h
					rs("payment_type") = payment_type
					rs("payment_money") = payment_money
					rs("payment_time") = payment_time
					rs("payment_info") = payment_info
					rs.update
				Else          
					rs.addnew
					rs("orders_id") = orders_id
					rs("user_id") = Cookies_Lebi_UserName
					rs("payment_type") = payment_type
					rs("payment_money") = payment_money
					rs("payment_time") = payment_time
					rs("payment_info") = payment_info
					rs.update
				End If 
				rs.close:Set rs = Nothing 
		End If           
		If p_error Then 
				payment_inform_ok = CallBack(Lebi_word(3) &"&nbsp;&nbsp;〖"& Lebi_cart(171) &"〗",err_msg,0,3)
		Else
				payment_inform_ok = CallBack(Lebi_cart(171),"·"&Lebi_user(130),"?action=dingdan",3)
		End If 
End Function 
%>