<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.sql.*"%> 
<%@ page import="java.util.*"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>
<%@ include file="../inc/conn.jsp"%>
<%@ include file="../inc/ftbbstohtml.jsp"%>
<%!ResultSet rs;%>
<%
String sql;
String bbsname = (String)session.getAttribute("name");
if(bbsname==""||bbsname==null)
{	
  out.print("<script language='javascript'>");
  out.print("alert('你还没有登录论坛，请先登录!');");
  out.print("history.go(-1);");
  out.print("</script>");
  out.close();
}

if(bbsname!=null){
sql="select * from clubuser where clubuser_name='"+bbsname+"'";
rs=stmt.executeQuery(sql);
rs.next();
}
else{
  out.print("<script language='javascript'>");
  out.print("alert('对不起，你不能设置别人的签名档!');");
  out.print("history.go(-1);");
  out.print("</script>");
  out.close();
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
<title>修改用户资料</title>

</head>
<script language="javascript">
<!--
	function check(form)
	{
    if (form.bbsuser.value=="")
    	{
    		alert("请填写用户名！");
    		form.bbsuser.focus();
    		return false;
  	    }
  if (form.bbsuser.value.length<3||form.bbsuser.value.length>8)
   {
     alert("昵称长度只能是3-8位。");
     form.bbsuser.focus();
     form.cbbsuser.select();
     return false;
   } 
    if (form.password.value=="")
    	{
    		alert("请填写密码！");
    		form.password.focus();
    		return false;
  	}
  if (form.password.value.length<3||form.password.value.length>8)
   {
     alert("密码长度只能是3-8位。");
     form.password.focus();
     form.password.select();
     return false;
   } 
    if (form.pwdsub.value=="")
    	{
    		alert("请填写确认密码！");
    		form.pwdsub.focus();
    		return false;
  	}
    if (form.pwdsub.value!=form.password.value)
    	{
    		alert("密码和密码确认不一致！");
    		form.pwdsub.focus();
    		return false;
  	}
    if (form.question.value=="")
    	{
    		alert("请填写忘记密码时的问题！");
    		form.question.focus();
    		return false;
  	}
    if (form.answer.value=="")
    	{
    		alert("请填写问题的答案！");
    		form.answer.focus();
    		return false;
  	}
return true;
	}
//-->
</script>
<body topmargin="0">
<form name="form1" method="post" action="moduserinfoact.jsp" onsubmit="return check(this)">
  <table width="99%" border="0" align="center" bgcolor="#A4B6D7" cellspacing="1" cellpadding="2">
    <tr background="../images/bbs_bg1.gif"> 
      <td height="25" colspan="2"> 
        <div align="center">修改用户信息</div>
      </td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">昵　称：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input name="bbsuser" type="text" id="bbsuser" value="<%=rs.getString("clubuser_nickname")%>" size="15" maxlength="10">
        　<font color="#CC0000">*<font color="#000000">论坛中显示的网名</font></font></td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">密　码：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="password" name="password" size="15" maxlength="8" value="">
        　<font color="#CC0000">*（最多8位）</font></td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">密码确认：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="password" name="pwdsub" size="25" maxlength="8" value="">
        　<font color="#CC0000">*</font></td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">忘记密码时的问题：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="text" name="question" size="25" value="<%=rs.getString("clubuser_question")%>">
        　<font color="#CC0000">*</font></td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">问题的答案：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="text" name="answer" size="25" value="<%=rs.getString("clubuser_answer")%>">
        　<font color="#CC0000">*</font></td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">您的性别：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="radio" name="sex" value="男" <%if (rs.getString("clubuser_sex").equals("男")){%>checked<%}%>>
        男 　 
        <input type="radio" name="sex" value="女" <%if (rs.getString("clubuser_sex").equals("女")){%>checked<%}%>>
        女</td>
    </tr>
    <tr> 
      <td width="23%" height="23" bgcolor="#F8F8F8"> 
        <div align="right">你的E-mail信箱：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <input type="text" name="email" size="25" value="<%=rs.getString("clubuser_email")%>">
        　</td>
    </tr>
    <tr> 
      <td width="23%" height="11" bgcolor="#F8F8F8"> 
        <div align="right">签名档：(150字以内)</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8"> &nbsp; 
        <textarea name="signname" cols="65" rows="6"><%=rs.getString("signname")%></textarea>
        　</td>
    </tr>
    <tr> 
      <td width="23%" height="11" bgcolor="#F8F8F8" valign="top"> 
        <div align="right">头　像：</div>
      </td>
      <td width="77%" bgcolor="#F8F8F8">
        <input type="radio" name="img" value="cache1.gif" <%if(rs.getString("userimg").equals("cache1.gif")){%>checked<%}%>>
        <img src="userheadimg/cache1.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache2.gif" <%if (rs.getString("userimg").equals("cache2.gif")){%>checked<%}%>>
        <img src="userheadimg/cache2.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache3.gif" <%if (rs.getString("userimg").equals("cache3.gif")){%>checked<%}%>>
        <img src="userheadimg/cache3.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache4.gif" <%if (rs.getString("userimg").equals("cache4.gif")){%>checked<%}%>>
        <img src="userheadimg/cache4.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache5.gif" <%if (rs.getString("userimg").equals("cache5.gif")){%>checked<%}%>>
        <img src="userheadimg/cache5.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache6.gif" <%if (rs.getString("userimg").equals("cache6.gif")){%>checked<%}%>>
        <img src="userheadimg/cache6.gif" width="42" height="42"> <br>
        <input type="radio" name="img" value="cache7.gif" <%if (rs.getString("userimg").equals("cache7.gif")){%>checked<%}%>>
        <img src="userheadimg/cache7.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache8.gif" <%if (rs.getString("userimg").equals("cache8.gif")){%>checked<%}%>>
        <img src="userheadimg/cache8.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache9.gif" <%if (rs.getString("userimg").equals("cache9.gif")){%>checked<%}%>>
        <img src="userheadimg/cache9.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache10.gif" <%if (rs.getString("userimg").equals("cache10.gif")){%>checked<%}%>>
        <img src="userheadimg/cache10.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache11.gif" <%if (rs.getString("userimg").equals("cache11.gif")){%>checked<%}%>>
        <img src="userheadimg/cache11.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache12.gif" <%if (rs.getString("userimg").equals("cache12.gif")){%>checked<%}%>>
        <img src="userheadimg/cache12.gif" width="42" height="42"><br>
        <input type="radio" name="img" value="cache13.gif" <%if (rs.getString("userimg").equals("cache13.gif")){%>checked<%}%>>
        <img src="userheadimg/cache13.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache14.gif" <%if (rs.getString("userimg").equals("cache14.gif")){%>checked<%}%>>
        <img src="userheadimg/cache14.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache15.gif" <%if (rs.getString("userimg").equals("cache15.gif")){%>checked<%}%>>
        <img src="userheadimg/cache15.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache16.gif" <%if (rs.getString("userimg").equals("cache16.gif")){%>checked<%}%>>
        <img src="userheadimg/cache16.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache17.gif" <%if (rs.getString("userimg").equals("cache17.gif")){%>checked<%}%>>
        <img src="userheadimg/cache17.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache18.gif" <%if (rs.getString("userimg").equals("cache18.gif")){%>checked<%}%>>
        <img src="userheadimg/cache18.gif" width="42" height="42"> <br>
        <input type="radio" name="img" value="cache19.gif" <%if (rs.getString("userimg").equals("cache19.gif")){%>checked<%}%>>
        <img src="userheadimg/cache19.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache20.gif" <%if (rs.getString("userimg").equals("cache20.gif")){%>checked<%}%>>
        <img src="userheadimg/cache20.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache21.gif" <%if (rs.getString("userimg").equals("cache21.gif")){%>checked<%}%>>
        <img src="userheadimg/cache21.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache22.gif" <%if (rs.getString("userimg").equals("cache22.gif")){%>checked<%}%>>
        <img src="userheadimg/cache22.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache23.gif" <%if (rs.getString("userimg").equals("cache23.gif")){%>checked<%}%>>
        <img src="userheadimg/cache23.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache24.gif" <%if (rs.getString("userimg").equals("cache24.gif")){%>checked<%}%>>
        <img src="userheadimg/cache24.gif" width="42" height="42"> <br>
        <input type="radio" name="img" value="cache25.gif" <%if (rs.getString("userimg").equals("cache25.gif")){%>checked<%}%>>
        <img src="userheadimg/cache25.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache26.gif" <%if (rs.getString("userimg").equals("cache26.gif")){%>checked<%}%>>
        <img src="userheadimg/cache26.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache27.gif" <%if (rs.getString("userimg").equals("cache27.gif")){%>checked<%}%>>
        <img src="userheadimg/cache27.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache28.gif" <%if (rs.getString("userimg").equals("cache28.gif")){%>checked<%}%>>
        <img src="userheadimg/cache28.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache29.gif" <%if (rs.getString("userimg").equals("cache29.gif")){%>checked<%}%>>
        <img src="userheadimg/cache29.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache30.gif" <%if (rs.getString("userimg").equals("cache30.gif")){%>checked<%}%>>
        <img src="userheadimg/cache30.gif" width="42" height="42"><br>
        <input type="radio" name="img" value="cache31.gif" <%if (rs.getString("userimg").equals("cache31.gif")){%>checked<%}%>>
        <img src="userheadimg/cache31.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache32.gif" <%if (rs.getString("userimg").equals("cache32.gif")){%>checked<%}%>>
        <img src="userheadimg/cache32.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache33.gif" <%if (rs.getString("userimg").equals("cache33.gif")){%>checked<%}%>>
        <img src="userheadimg/cache33.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache34.gif" <%if (rs.getString("userimg").equals("cache34.gif")){%>checked<%}%>>
        <img src="userheadimg/cache34.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache35.gif" <%if (rs.getString("userimg").equals("cache35.gif")){%>checked<%}%>>
        <img src="userheadimg/cache35.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache36.gif" <%if (rs.getString("userimg").equals("cache36.gif")){%>checked<%}%>>
        <img src="userheadimg/cache36.gif" width="42" height="42"> <br>
        <input type="radio" name="img" value="cache37.gif" <%if (rs.getString("userimg").equals("cache37.gif")){%>checked<%}%>>
        <img src="userheadimg/cache37.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache38.gif" <%if (rs.getString("userimg").equals("cache38.gif")){%>checked<%}%>>
        <img src="userheadimg/cache38.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache39.gif" <%if (rs.getString("userimg").equals("cache39.gif")){%>checked<%}%>>
        <img src="userheadimg/cache39.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache40.gif" <%if (rs.getString("userimg").equals("cache40.gif")){%>checked<%}%>>
        <img src="userheadimg/cache40.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache41.gif" <%if (rs.getString("userimg").equals("cache41.gif")){%>checked<%}%>>
        <img src="userheadimg/cache41.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache42.gif" <%if (rs.getString("userimg").equals("cache42.gif")){%>checked<%}%>>
        <img src="userheadimg/cache42.gif" width="42" height="42"><br>
        <input type="radio" name="img" value="cache43.gif" <%if (rs.getString("userimg").equals("cache43.gif")){%>checked<%}%>>
        <img src="userheadimg/cache43.gif" width="42" height="42"> 
        <input type="radio" name="img" value="cache44.gif" <%if(rs.getString("userimg").equals("cache44.gif")){%>checked<%}%>>
        <img src="userheadimg/cache44.gif" width="42" height="42">
		<a href="userimg.jsp">自定义头像</a></td>
    </tr>
    <tr> 
      <td height="35" colspan="2" bgcolor="#F8F8F8"> 
        <div align="center">
          <INPUT TYPE="hidden" name="url" value="">
          <input type="submit" name="Submit" value="修改">
        </div>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
