<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wxpn.tutorial.servlet.User"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-cn">
<title>注册</title>
<script language=Javascript src="/LoginProject/js/validateRegister.js"></script>
</head>

<body>
<div align=center>
<form name="frmSignUp" method="POST" action="CheckRegisterServlet"
	onsubmit="javaScript: return validate();">
<table border="0" width="100%" cellspacing="1" bgColor="#cccccc"
	valign=center>
	<tr>
		<td colspan="2" align=center height="32"><font size="4"
			color="#0000FF"><b>用户注册</b></font></td>
	</tr>
	<%Object errorMsg = request.getAttribute("result");
			User user = (User) request.getAttribute("user");
			if (errorMsg != null) {

				%>
	<tr>
		<td colspan="2" align=center height="32"><font size="4" color="red"><b>注册失败：<%=errorMsg.toString()%></b></font></td>
	</tr>
	<%}

			%>
	<tr>
		<td width="30%" align=right><font size="2">用户名：</font></td>
		<td width="50%"><input type="text" name="txtUserName" size="20"
			maxlength="20" value="<%=(user==null)?"":user.getUserName()%>"> <font
			size="2" color="#FF0000">*</font></td>
	</tr>
	<tr>
		<td width="30%" align=right><font size="2">密码：</font></td>
		<td width="50%"><input type="password" name="txtPassword" size="20"
			maxlength="20" value="<%=(user==null)?"":user.getUserPwd()%>"> <font
			size="2" color="#FF0000">*(6-20位)</font></td>
	</tr>
	<tr>
		<td width="30%" align=right><font size="2">确认密码：</font></td>
		<td width="50%"><input type="password" name="txtConfPassword"
			size="20" maxlength="20"
			value="<%=(user==null)?"":user.getUserPwd()%>"> <font size="2"
			color="#FF0000">*</font></td>
	</tr>
	<tr>
		<td colspan="2" align=center height="32"><font size="2"
			color="#0000FF">------------以下部分为您的私人材料， 承诺为您保密------------</font></td>
	</tr>
	<tr>
		<td width="30%" align=right><font size="2">真实姓名：</font></td>
		<td width="50%"><input type="text" name="txtRealName" size="15"
			maxlength="15" value="<%=(user==null)?"":user.getRealName()%>"></td>
	</tr>
	<tr>
		<td width="30%" align=right><font size="2">性别：</font></td>
		<td width="50%"><select size="1" name="sltGender">
			<%if (user == null) {

			%>
			<option selected value="">--</option>
			<%} else {

				%>
			<option selected value="<%=user.getGender()%>"><%=user.getGender() == 0 ? "女" : "男"%></option>
			<%}

			%>
			<option value="0">女</option>
			<option value="1">男</option>
		</select></td>
	</tr>
	<tr>
		<td width="40%" align=right><font size="2">电话：</font></td>
		<td width="57%"><input type="text" name="txtTel" size="19"
			maxlength="19" value="<%=(user==null)?"":user.getTelNumber()%>"></td>
	</tr>
	<tr>
		<td width="40%" align=right><font size="2">Email：</font></td>
		<td width="57%"><input type="text" name="txtEmail" size="30"
			value="<%=(user==null)?"":user.getEmail()%>"></td>
	</tr>
	<tr>
		<td width="40%" align=right><font size="2">网址：</font></td>
		<td width="57%"><input type="text" name="txtHomePage" size="30"
			value="<%=(user==null)?"":user.getHomepage()%>"></td>
	</tr>
	<tr>
		<td colspan="2" align=center><input type="submit" value="提 交"
			name="submit">&nbsp;&nbsp; <input type="reset" value="重 置"
			name="reset"></td>
	</tr>
</table>
</form>
</div>
</body>
</html>
