<!--#include file=index_top.asp-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<LINK href="images/Bujoo_Style.css" type=text/css rel=stylesheet>
<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.Username.value.length < 2 || document.ADDUser.Username.value.length >4) {
		alert("提示：请检查您填写的真实姓名");
		document.ADDUser.Username.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.Address.value.length <3 || document.ADDUser.Address.value.length >=50) {
		alert("提示：请输入有效的联系地址");
		document.ADDUser.Address.focus();
		return false;
	}
	if (document.ADDUser.ZipCode.value.length !=6) {
		alert("提示：请输入正确的邮政编码");
		document.ADDUser.ZipCode.focus();
		return false;
	}
	if (document.ADDUser.HomePhone.value.length <6 || document.ADDUser.HomePhone.value.length >18) {
		alert("提示：请输入有效的电话号码");
		document.ADDUser.HomePhone.focus();
		return false;
	}
}
</script>
</head>

<body>
<TABLE width="826" 
        border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#ffffff>
  <TBODY>
    <TR>
      <TD width=28><IMG height=1 src="images/trans.gif" width=1></TD>
      <TD colSpan=5><IMG height=8 src="images/SubmenuTop.gif" 
          width=147></TD>
      <TD width=17><IMG height=1 src="images/trans.gif" width=1></TD>
      <TD width=1 background=images/ShadowRight.gif rowSpan=5><IMG 
            height=1 src="images/trans.gif" width=1></TD>
    </TR>
    <TR>
      <TD>&nbsp;</TD>
      <TD colSpan=4><IMG height=37 
            src="images/SubmenuTitle12.gif" width=147></TD>
      <TD vAlign=top width=632><TABLE width="612" 
            border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#e6eea6>
          <TBODY>
            <TR>
              <TD width=9><IMG height=25 src="images/LoginTitleLeft.gif" 
                  width=5></TD>
              <TD vAlign=middle width=20><IMG height=15 
                  src="images/LoginTitleIcon.gif" width=15 vspace=1></TD>
              <TD ><table width="157" height="19" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="157" valign="bottom"><span class="txt_OrangeBold">用户资料</span></td>
                  </tr>
              </table></TD>
              <TD width=4><IMG height=25 src="images/LoginTitleRight.gif" 
                  width=4></TD>
            </TR>
          </TBODY>
      </TABLE></TD>
      <TD>&nbsp;</TD>
    </TR>
    <TR>
      <TD>&nbsp;</TD>
      <TD width=1 bgColor=#cccccc><IMG height=1 src="images/trans.gif" 
            width=1></TD>
      <TD width=138 align=middle vAlign=top><br>
        <TABLE width=118 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR>
            <TD colSpan=2></TD>
          </TR>
          <TR>
            <TD  width=31 height=16><div align="right"><IMG 
                  src="images/SubmenuIcon.gif" width=9 height=3 vspace=5></div></TD>
            <TD width="87"><div align="center"><a href="user1.asp">用户资料</a></div></TD>
          </TR>
          <TR>
            <TD colSpan=2><IMG height=6 src="images/SubmenuLineBg.gif" 
                  width=118></TD>
          </TR>
        </TBODY>
      </TABLE>
        <TABLE width=118 border=0 align="center" cellPadding=0 cellSpacing=0>
          <TBODY>
            <TR>
              <TD colSpan=2></TD>
            </TR>
            <TR>
              <TD  width=31 height=16><div align="right"><IMG 
                  src="images/SubmenuIcon.gif" width=9 height=3 vspace=5></div></TD>
              <TD width="87"><div align="center"><a href="my_order.asp">订单查询</a></div></TD>
            </TR>
            <TR>
              <TD colSpan=2><IMG height=6 src="images/SubmenuLineBg.gif" 
                  width=118></TD>
            </TR>
          </TBODY>
        </TABLE>
        <!--	Sub Left Menu --------------------------------------------------->
      </TD>
      <TD width=1 bgColor=#cccccc><IMG height=1 src="images/trans.gif" 
            width=1></TD>
      <TD vAlign=top width=7><IMG height=117 
            src="images/SubmenuRight.gif" width=7></TD>
      <TD style="PADDING-TOP: 12px" vAlign=top align=middle><TABLE width="98%" 
            border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#ffffff>
        <TBODY>
          <TR>
            <TD vAlign=top style="PADDING-RIGHT: 2px; PADDING-BOTTOM: 10px"><div align="center">
              <%
			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
			%>
                <STRONG>以下是您的个人资料，若需修改请填写新的资料后单击“确认修改”</STRONG>
              </div>
            <table width="566" 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="574" height="334" border="0" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
                        <tr bgcolor="#FFFFFF">
                          <td width="234" height="40"><B>登录帐号(最多16位)：</B><BR>
                      可以使用数字、字母、中文作为用户名</td>
                          <td width="321" ><%=rs("user_id")%>&nbsp; (不能修改)</td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>密码(最少6位，最多16位)：<BR>
                          </B>请不要使用*、%、&amp;等特殊符号以及HTML字符</td>
                          <td><input name="pw1" type="password" id="pw1" value="<%=rs("user_password")%>">
                            (不修改请保留)</td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td height="45"><B>重复密码(最多16位)：<BR>
                          </B>请再输一遍确认</td>
                          <td><input name="pw2" type="password" id="pw2" value="<%=rs("user_password")%>">
                          </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>真实姓名：<BR>
                          </B>收货人真实姓名，请准确填写</td>
                          <td><input name="Username" type="text" id="Username" value="<%=rs("user_name")%>"></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>联系地址：<BR>
                          </B>收货人通信地址，请准确填写</td>
                          <td><input name="Address" type="text" id="Address" value="<%=rs("user_dz")%>" size="45">
						  </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>邮政编码：<BR>
                          </B>收货人邮政编码</td>
                          <td><input name="ZipCode" type="text" id="ZipCode" value="<%=rs("user_yb")%>">
                          </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>联系电话：<BR>
                          </B>留下您的联系电话，以备不时之需</td>
                          <td><input name="HomePhone" type="text" id="HomePhone" value="<%=rs("user_dh")%>">
                          </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td><B>电子邮箱：<BR>
                          </B>请输入有效的邮件地址</td>
                          <td><input name="Usermail" type="text" id="Usermail" value="<%=rs("user_email")%>">
                          </td>
                        </tr>
                      </table>
                      <br>
                      <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></TD>
      <TD>&nbsp;</TD>
    </TR>
    <TR>
      <TD></TD>
      <TD colSpan=4><IMG height=2 src="images/SubmenuBottom.gif" 
            width=140></TD>
      <TD></TD>
      <TD></TD>
    </TR>
    <TR>
      <TD height=28>&nbsp;</TD>
      <TD colSpan=4>&nbsp;</TD>
      <TD>&nbsp;</TD>
      <TD>&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
</body>
</html>
<!--#include file=index_bottom.asp--> 
