<!--#Include file="include/top.asp"-->
<HTMl>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>修改个人资料</TITLE>
<LINK rel="stylesheet" href="include/css.css"  type="text/css">
<SCRIPT language="VBScript">
Sub Submit1_OnClick
  atInEMail=InStr(form1.EMail.value,"@")
  pointInEMail=InStr(form1.EMail.value,".")
  If trim(form1.userName.value)=Empty Then
    MsgBox "请填写用户名！"
    Document.form1.userName.Focus()
    Exit Sub
  ElseIf InStr(Trim(form1.userName.value),"'")<>0 Then
    MsgBox "请正确填写用户名！"
    Document.form1.userName.Focus()
    Exit Sub
  ElseIf form1.passWord.value=Empty Then
    MsgBox "请填写密码！"
    Document.form1.passWord.Focus()
    Exit Sub
  ElseIf InStr(form1.passWord.value,"'")<>0 Then
    MsgBox "请正确填写密码！"
    Document.form1.passWord.Focus()
    Exit Sub
  ElseIf Len(form1.passWord.value)<6 Then
    MsgBox "密码至少6位！"
    Document.form1.passWord.Focus()
    Exit Sub
  ElseIf form1.conPassWord.value=Empty Then
    MsgBox "请填写确认密码！"
    Document.form1.conPassWord.Focus()
    Exit Sub
  ElseIf form1.passWord.value<>form1.conPassWord.value Then
    MsgBox "两次填写密码不一致！"
	form1.passWord.value=Empty
	form1.conPassWord.value=Empty
    Document.form1.passWord.Focus()
    Exit Sub
  ElseIf trim(form1.EMail.value)=Empty Then
    MsgBox "请填写E-Mail！"
    Document.form1.EMail.Focus()
    Exit Sub
  ElseIf atInEMail<2 Or pointInEMail<4 Or atInEMail>pointInEMail Then
    MsgBox "请填写正确的E-Mail！"
    Document.form1.EMail.Focus()
    Exit Sub
  End If
  form1.Submit
End Sub
</SCRIPT>
</HEAD>
<BODY>
<%
getConn()
sql="SELECT * FROM UserInfo where UserName='"&session("userName")&"'" 
rs.Open sql,conn,1,1
%>
<TABLE width="600" border="1" align="center" bordercolor="#000000">
  <FORM name="form1" method="post" action="editUserPost.asp">
    <TR> 
      <TD height="25" colspan="3" align="center" class="tr">修改个人资料</TD>
    </TR>
    <TR> 
      <TD width="150" height="25" align="right" class="td">用户名:</TD>
      <TD width="468" class="td"><input name="userName" type="text" value="<%=rs("UserName")%>"></TD>
      <TD width="87" align="center" class="td">必填</TD>
    </TR>
    <TR> 
      <TD height="25" align="right" class="td">密　码:</TD>
      <TD class="td"><input name="passWord" type="password">*密码在6-20位之间*</TD>
      <TD align="center" class="td">必填</TD>
    </TR>
    <TR> 
      <TD height="25" align="right" class="td">确认密码:</TD>
      <TD class="td"><input name="conPassWord" type="password"></TD>
      <TD align="center" class="td">必填</TD>
    </TR>
    <TR> 
      <TD height="25" align="right" class="td">性　别:</TD>
      <TD class="td">
	    <INPUT name="userSex" type="radio" value="男" <%if rs("Sex")="男" then Response.Write("checked")%>>男 
        <INPUT name="userSex" type="radio" value="女" <%if rs("Sex")="女" then Response.Write("checked")%>>女
	  </TD>
      <TD align="center" class="td">必填</TD>
    </TR>
    <TR> 
      <TD height="25" align="right" class="td">E-Mail:</TD>
      <TD class="td"><input name="EMail" type="text" value="<%=rs("Email")%>" size="50"></TD>
      <TD align="center" class="td">必填</TD>
    </TR>
    <TR> 
      <TD width="150" height="25" align="right" class="td">真实姓名:</TD>
      <TD width="468" class="td"><input name="trueName" type="text" value="<%=rs("TrueName")%>"></TD>
      <TD width="87" align="center" class="td"></TD>
    </TR>
    <TR> 
      <TD height="25" colspan="3" align="center" class="tr"> 
	    <INPUT type="button" name="Submit1" value="提 交"> 
        <INPUT type="reset" name="Submit2" value="重 置">
      </TD>
    </TR>
  </FORM>
</TABLE>
<%set rs=Nothing
Set conn=Nothing%>
</BODY>
</HTMl>
<!--#Include file="include/bottom.htm"-->