<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="szwyadmin/ubbcode/UBBCode.asp" -->
<HTML><HEAD><TITLE>会员中心-<%=title%></TITLE>
<META content=<%=des%> name=description>
<META content=<%=key%> name=keywords>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/style.css" type=text/css rel=stylesheet>

<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<script language="JavaScript">
<!--
function JM_sh(ob){
if (ob.style.display=="none"){ob.style.display=""}else{ob.style.display="none"};
}

function fucPWDchk(str) 
{ 
var strSource ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
var ch; 
var i; 
var temp; 

for (i=0;i<=(str.length-1);i++) 
{ 

ch = str.charAt(i); 
temp = strSource.indexOf(ch); 
if (temp==-1) 
{ 
return 0; 
} 
} 
if (strSource.indexOf(ch)==-1) 
{ 
return 0; 
} 
else 
{ 
return 1; 
} 
} 
function jtrim(str) 
{ while (str.charAt(0)==" ") 
{str=str.substr(1);} 
while (str.charAt(str.length-1)==" ") 
{str=str.substr(0,str.length-1);} 
return(str); 
} 
//判断表单输入正误
function Checkreg()
{
	if (!fucPWDchk(document.ADDUser.pw1.value)){
		alert("提示：只能使用纯数字和大、小写字母作为密码");
		document.ADDUser.pw1.focus();
		return false;
		}

	if (document.ADDUser.pw1.value.length <6 || document.ADDUser.pw1.value.length >16) {
		alert("提示：请输入密码，最少6位，最长16位。");
		document.ADDUser.pw1.focus();
		return false;
	}
	
	if (document.ADDUser.pw1.value != document.ADDUser.pw2.value) {
		alert("提示：您两次输入的密码不一样，请检查后重新输入");
		document.ADDUser.pw2.focus();
		return false;
	}
	if (document.ADDUser.Usermail.value.length <8 || document.ADDUser.Usermail.value.length >=50) {
		alert("提示：请输入有效的电子邮箱");
		document.ADDUser.Usermail.focus();
		return false;
	}
	if (document.ADDUser.Usermail.value.length > 0 && !document.ADDUser.Usermail.value.match( /^.+@.+$/ ) ) {
	    alert("提示：请输入有效的电子信箱");
		document.ADDUser.Usermail.focus();
		return false;
	}



	if (document.ADDUser.HomePhone.value.length <6 || document.ADDUser.HomePhone.value.length >18) {
		alert("提示：请输入有效的电话号码");
		document.ADDUser.HomePhone.focus();
		return false;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<!--#include file="head.asp"-->
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="900" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="900" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td width="257" valign="top" bgcolor="#F3F1E9"><!--#include file="left.asp"--></td>
            <td width="22" valign="top" bgcolor="#E2E0D4"><img src="images/back-3.jpg" width="22" height="273"></td>
            <td height="800" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
              <table width="559" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td valign="top"><table width="95%" height="422" border="0" align="center" cellpadding="00" cellspacing="0">
                            <tr>
                              <td height="422" valign="top"><div align="center">
                                  <%
	if request("Del")<>"" then
	'如果是顾客取消则设置状态为81
	conn.execute("update OrderList set Status='11' where OrderNum='"&request("Del")&"'")
	end if
%>
                                  <br>
                                  <span style="font-size:18px">用户中心 欢迎您：<%=session("user_id")  %>！</span></div>
                                  <TABLE width="95%" 
            border=0 align="center" cellPadding=0 cellSpacing=0>
                                    <TBODY>
                                      <TR>
                                        <TD vAlign=top style="PADDING-RIGHT: 2px; PADDING-BOTTOM: 10px"><div align="center" class="coolscrollbar">
                                            <%
			set rs=server.CreateObject("adodb.recordset")
			rs.open "select  * from user1 where user_id='"&session("user_id")&"'",conn,1,1
			if not (rs.eof and rs.bof) then
			%>
                                          以下是您的个人资料，若需修改请填写新的资料后单击“确认修改” </div>
                                            <table width="95%" height="388" border="0" align="center" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td><form name="ADDUser" method="POST" action="reg_edit.asp" onSubmit="return Checkreg();">
                                                    <table width="95%" height="334" border="1" align="center" cellpadding="4" cellspacing="0" borderColorLight=#311600 borderColorDark=#e7e5e2>
                                                      <tr>
                                                        <td width="234" height="40"><span class="coolscrollbar">登录帐号(最多16位)：<BR>
                                                          可以使用数字、字母、中文作为用户名</span></td>
                                                        <td width="321" ><span class="coolscrollbar"><%=rs("user_id")%>&nbsp; (不能修改)</span></td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="coolscrollbar">密码(最少6位，最多16位)：<BR>
                                                          请不要使用*、%、&amp;等特殊符号以及HTML字符</span></td>
                                                        <td><span class="coolscrollbar">
                                                          <input name="pw1" type="password" id="pw1" value="<%=rs("user_password")%>">
                                                          (不修改请保留)</span></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="45"><span class="coolscrollbar">重复密码(最多16位)：<BR>
                                                          请再输一遍确认</span></td>
                                                        <td><input name="pw2" type="password" id="pw2" value="<%=rs("user_password")%>">
                                                        </td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="coolscrollbar">真实姓名：<BR>
                                                          收货人真实姓名，请准确填写</span></td>
                                                        <td><input name="Username" type="text" id="Username" value="<%=rs("user_name")%>"></td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="coolscrollbar">联系电话：<BR>
                                                          留下您的联系电话，以备不时之需</span></td>
                                                        <td><input name="HomePhone" type="text" id="HomePhone" value="<%=rs("user_dh")%>">
                                                        </td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="coolscrollbar">电子邮箱：<BR>
                                                          请输入有效的邮件地址</span></td>
                                                        <td><input name="Usermail" type="text" id="Usermail" value="<%=rs("user_email")%>">
                                                        </td>
                                                      </tr>
                                                    </table>
                                                  <div align="center"><br>
                                                    </div>
                                                  <table width="516" border="0" cellspacing="0" cellpadding="0">
                                                      <tr>
                                                        <td width="233"><div align="right">
                                                            <input type="hidden" name="adduser" value="true">
                                                            <input name="ok" type="submit" class="input5" id="ok" value="确认修改">
                                                        </div></td>
                                                        <td width="81">&nbsp;</td>
                                                        <td width="202"><input name="Submit" type="reset" class="input5" value="不做修改"></td>
                                                      </tr>
                                                    </table>
                                                </form></td>
                                              </tr>
                                            </table>
                                          <%end if%></TD>
                                      </TR>
                                    </TBODY>
                                  </TABLE>
                                <table width="100%" border="0" align="center" cellpadding="8" cellspacing="1">
                                    <tr>
                                      <td height="162" valign="top"><%
sqlinfo = "select A.OrderNum,A.OrderTime,A.RecName,A.OrderSum,A.RecName,A.Status,B.StatusDefine"&_
          " from OrderList A,OrderStatustype B "&_
		  " where A.UserId='"&session("user_id")&"' and A.Status = B.Status order by A.OrderTime desc"
set rsorder=Server.Createobject("ADODB.RecordSet")
rsorder.Open sqlinfo,conn,1,1
%>
                                          <table width="97%" border="1" align="center" cellpadding="4" cellspacing="0" borderColorLight=#311600 borderColorDark=#e7e5e2 >
                                            <tr>
                                              <td width="80"><span class="coolscrollbar">订单号</span></td>
                                              <td width=100><span class="coolscrollbar">下单时间</span></td>
                                              <td width="38"><span class="coolscrollbar">总金额</span></td>
                                              <td width="115" ><span class="coolscrollbar">收货人</span></td>
                                              <td width="100"><span class="coolscrollbar">订单状态</span></td>
                                            </tr>
                                            <%if rsorder.eof and rsorder.bof  then
 response.write "<tr><td colspan=7 height=50 align=center><b>您暂时没有有效的订单!</b></td></tr>"
 else 
 do while not rsorder.eof 
 %>
                                            <tr>
                                              <td><script language="JavaScript">
function js_openpage(url) {
var newwin
newwin=window.open(url,"内容","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=550");
return false;
}
                                </script>
                                                <a  href='my_order_detail.asp?OrderNum=<%=rsorder("OrderNum")%>' onClick='return js_openpage(this.href);'><%=rsorder("OrderNum")%></a> </td>
                                              <td ><span class="coolscrollbar"><%=rsorder("OrderTime")%></span></td>
                                              <td><span class="coolscrollbar"><%=formatnumber(rsorder("OrderSum"),2)%></span></td>
                                              <td ><span class="coolscrollbar"><%=rsorder("RecName")%></span></td>
                                              <td><span class="coolscrollbar">
                                                <%
if rsorder("Status")=0 then 
%>
                                                <%=rsorder("StatusDefine")%> <a href="user.asp?Del=<%=rsorder("OrderNum")%>"><b>[取消订单]</b></a>
                                                <%  
else
%>
                                                <%=rsorder("StatusDefine")%>
                                                <%  
end if

rsorder.movenext
loop
%>
                                                <%set rsorder=nothing
end if
%>
                                              </span></td>
                                            </tr>
                                        </table></td>
                                    </tr>
                                </table></td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<!--#include file="foot.asp"-->
</BODY></HTML>
 
