<%if Session("huiyuan")="" then
Response.redirect "cart-login.asp" 
Response.end
end if
%><!--#include file="inc_top.asp" -->
<!--#include file="conn/inc_banner.asp" -->
<table width="760" bgcolor="#ffffff" border="0" align="center" cellpadding="0" cellspacing="0" class="table-zuoyou">
  <tr>
    <td width="170" valign="top" bgcolor="#f3f3f3" class="table-you">
      <table width="170" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="32" align="center" valign="bottom" class="table-shang"><img src="image/huiyuan.gif" width="166" height="30"></td>
        </tr>
        <tr> 
          <td height="25" align="center" valign="middle"><img src="image/tp08.gif" width="13" height="13"> 
            <a href="huiyuan-1.asp">我的订单</a></td>
        </tr>
        <tr> 
          <td align="center"><img src="image/xx.gif"></td>
        </tr>
        <tr> 
          <td height="25" align="center" valign="middle"><img src="image/tp08.gif" width="13" height="13"> 
            <a href="huiyuan-2.asp">我的收藏</a></td>
        </tr>
        <tr> 
          <td align="center"><img src="image/xx.gif"></td>
        </tr>
        <tr> 
          <td height="25" align="center" valign="middle"><img src="image/tp08.gif" width="13" height="13"> 
            <a href="huiyuan-3.asp">个人资料</a></td>
        </tr>
        <tr> 
          <td align="center"><img src="image/xx.gif"></td>
        </tr>
        <tr> 
          <td height="25" align="center" valign="middle"><img src="image/tp08.gif" width="13" height="13"> 
            <a href="huiyuan-4.asp">修改密码</a></td>
        </tr>
        <tr> 
          <td align="center"><img src="image/xx.gif"></td>
        </tr>
      </table> 
    </td>
    <td width="590" height="350" align="center" valign="top"><p>&nbsp;</p>
      <% if request("x")="yes" then
	  conn.execute("Update huiyuan set name='"&trim(replace(request("name"),"'",""))&"',dz='"&trim(replace(request("dz"),"'",""))&"',yb='"&trim(replace(request("yb"),"'",""))&"',tel='"&trim(replace(request("tel"),"'",""))&"',mail='"&trim(replace(request("mail"),"'",""))&"' where  huiyuan='"&Session("huiyuan")&"'")
	  Response.Write("<script>alert(""会员个人资料修改成功"");location.href=""huiyuan-3.asp"";</script>")
	  end if
	  set rs = conn.execute("select * from huiyuan where huiyuan='"&Session("huiyuan")&"'") %>
            <script language="javascript">
	<!--//
	function checksignup() {

		if ( document.formSignUp.name.value == '' ) {
			window.alert('请输入您的名称!!');
			document.formSignUp.name.focus();
			return false;
		}
		if ( document.formSignUp.dz.value == '' ) {
			window.alert('请输入联系地址!!');
			document.formSignUp.dz.focus();
			return false;
		}
		if ( document.formSignUp.dz.value.length<5) {
			window.alert('请输入详细的联系地址!!');
			document.formSignUp.dz.focus();
			return false;
		}
		if ( document.formSignUp.yb.value == '' ) {
			window.alert('请输入联系人邮政编码!!');
			document.formSignUp.yb.focus();
			return false;
		}
            if(isNaN(document.formSignUp.yb.value)||( document.formSignUp.yb.value.length!=6)) {
			window.alert('邮政编码必须为6位数字！');
			document.formSignUp.yb.focus();
			return false;
		}
		if ( document.formSignUp.tel.value == '' ) {
			window.alert('请输入联系人电话!!');
			document.formSignUp.tel.focus();
			return false;
		}
		if(isNaN(document.formSignUp.tel.value)||(document.formSignUp.tel.value.length<7)) {
		window.alert("请输入您的有效电话号码,只能是7位以上的数字!!");
		document.formSignUp.tel.focus();
		return false;
	}
           if ( document.formSignUp.mail.value.length> 0 &&!document.formSignUp.mail.value.indexOf("@")==-1|document.formSignUp.mail.value.indexOf(".")==-1 ) {
			window.alert('请输入您正确的Email地址!!');
			document.formSignUp.mail.focus();
			return false;
		}
		return true;
	}
	//-->
	</script><FORM
      action=?x=yes method=post name=formSignUp id="formSignUp"><table width="450" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <tr bgcolor="#f7f7f7"> 
          <td height="22" colspan="2">&nbsp;&gt;&gt;&nbsp;<font color=red><%=session("huiyuan")%></font>的个人资料，您的积分是:<font color="#ff0000"><%=rs("jifen")%></font></td>
        </tr>
        <TR valign="middle" bgcolor="#FFFFFF"> 
          <TD width="95" height=22 align="right" class=main1>真实姓名：</TD>
          <TD width="355" height=22 class=main1> 
            <INPUT                  name=name class="wenbenkuang" id="name"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("name")%>" size=13 maxLength=49> 
            <font color="#ff3333">*</font></TD>
        </TR>
        <tr valign="middle" bgcolor="#FFFFFF"> 
          <TD height=22 align="right" class=main1>联系地址：</TD>
          <TD height=22 class=main1> 
            <INPUT                  name=dz class="wenbenkuang" id="dz"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("dz")%>" size=45 maxLength=200> 
            <font color="#ff3333">*</font> </TD>
        </tr>
        <tr valign="middle" bgcolor="#FFFFFF"> 
          <TD height=22 align="right" class=main1>邮政编码：</TD>
          <TD height=22 class=main1> 
            <INPUT                  name=yb class="wenbenkuang" id="yb" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("yb")%>" size=13 maxLength=16> 
            <font color="#ff3333">*</font> </TD>
        </tr>
        <tr valign="middle" bgcolor="#FFFFFF"> 
          <TD height=22 align="right" class=main1>联系电话：</TD>
          <TD height=22 class=main1> 
            <INPUT                  name=tel class="wenbenkuang" id="tel" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("tel")%>" size=23 maxLength=40> 
            <font color="#ff3333">*</font> </TD>
        </tr>
        <tr valign="middle" bgcolor="#FFFFFF"> 
          <TD height=22 align="right" class=main1>电子信箱：</TD>
          <TD height=22 class=main1> 
            <INPUT                  name=mail class="wenbenkuang" id="mail"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("mail")%>" size=35 maxLength=49> 
          </TD>
        </tr>
        <tr valign="middle" bgcolor="#FFFFFF"> 
          <TD height=22 align="right" class=main1>&nbsp;</TD>
          <TD height=22 class=main1> 
            <input name="Submit2" type="submit" onClick="javascript:return checksignup()" class="go-wenbenkuang" value="修 改" onFocus="this.blur()">
            <input name="Submit" type="reset" class="go-wenbenkuang" value="重 置" onFocus="this.blur()"></TD>
        </tr>
      </table></form></td>
  </tr>
</table>
<% rs.close
set rs=nothing%>
<!--#include file="inc_end.asp" -->