<%@ Page Language="c#" Inherits="Web.User.reg" CodeBehind="reg.aspx.cs" %>

<!DOCTYPE html>
<html>
<head>
    <title>用户注册</title>
    <link type="text/css" rel="stylesheet" href="../css/site.css" />
    <script type="text/javascript" src="../js/base64.js"></script>
    <script type="text/javascript" src="../Js/validate.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/pwdintensity.js"></script>
    <script language="javascript" type="text/javascript">
        var rank = 100;   

        function changePwdRank(o) 
        {
            if (o) 
            {
                rank = PwdIntensity(o.value);
                printIntensity(rank);		
            }
        }
	
        function CheckPassword()
        {
            //验证
            if (checkAllValidate())
            {
                if (rank < <%= Common.Config.userStrongPassword %>)
            {
                alert("密码过于简单,请重新输入密码!");
            return false;
        }
        else
        {
            //两次密码输入不一样
            var pwd1=document.getElementById("password").value;
            var pwd2=document.getElementById("password1").value;
            if(pwd1!=pwd2)
            {
                alert("两次密码输入不一样!");
                return false;
            }
            else
            {
                return true;
            }
        }
    }
    else
    {
            return false ;
    }
        
    }
	
    </script>
</head>
<body>
    <form id="user" method="post" runat="server">
        <div class="wrapper">
            <div class="main">
                <div class="hd">
                    <h1>
                        <asp:Label ID="webname" runat="server" Text=""></asp:Label></h1>
                </div>
                <div class="bd">
                    <div class="bd_inner">
                        <h2>用户信息</h2>
                        <div class="content">
                            <table class="table_border" cellspacing="0" cellpadding="0" align="center" border="0">
                                <tr>
                                    <td align="right"><b>*</b>注册名： </td>
                                    <td>
                                        <asp:TextBox ID="name" runat="server" notnull="true" msgname="注册名" MaxLength="25"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                        <asp:Label ID="nameExit" runat="server" ForeColor="Red" Visible="False">用户名已存在！</asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b> 密 码： </td>
                                    <td>
                                        <asp:TextBox ID="password" runat="server" TextMode="Password" onkeyup="changePwdRank(this);" notnull="true" msgname="密码" MaxLength="16"></asp:TextBox>
                                        <asp:HiddenField ID="km" runat="server" />
                                        <span><font color="red">*</font></span>
                                        <div id="PasswordCheck" style="display: none; background-position: 0px 0px; background-image: url(../images/resfile/password_check_bk.gif); width: 235px; background-repeat: no-repeat; height: 15px; overflow: hidden;"></div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b> 确认密码： </td>
                                    <td>
                                        <asp:TextBox ID="password1" runat="server" TextMode="Password" notnull="true" msgname="确认密码" MaxLength="16"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b>真实姓名： </td>
                                    <td>
                                        <asp:TextBox ID="fullName" runat="server" notnull="true" msgname="真实姓名" MaxLength="25"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b>提示问题： </td>
                                    <td>
                                        <asp:TextBox ID="question" runat="server" notnull="true" msgname="提示问题" MaxLength="25"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                        用于取回密码 </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b>问题答案： </td>
                                    <td>
                                        <asp:TextBox ID="answer" runat="server" notnull="true" msgname="问题答案" MaxLength="25"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                        用于取回密码 </td>
                                </tr>
                                <tr>
                                    <td align="right">性 别： </td>
                                    <td>
                                        <asp:DropDownList ID="sex" runat="server">
                                            <asp:ListItem Value="男" Selected="True">男</asp:ListItem>
                                            <asp:ListItem Value="女">女</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">出生年月： </td>
                                    <td>
                                        <asp:DropDownList ID="born1" runat="server"></asp:DropDownList>
                                        年
										<asp:DropDownList ID="born2" runat="server"></asp:DropDownList>
                                        月
										<asp:DropDownList ID="born3" runat="server"></asp:DropDownList>
                                        日 </td>
                                </tr>
                                <tr>
                                    <td align="right">工作单位： </td>
                                    <td>
                                        <asp:TextBox ID="company" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">所在部门： </td>
                                    <td>
                                        <asp:DropDownList ID="department" runat="server" DataValueField="pkId" DataTextField="name"></asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">联系电话： </td>
                                    <td>
                                        <asp:TextBox ID="tel" runat="server" datatype="integer" msgname="联系电话" MaxLength="25"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">QQ号码： </td>
                                    <td>
                                        <asp:TextBox ID="qq" runat="server" datatype="integer" msgname="QQ号码"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><b>*</b>电子邮件： </td>
                                    <td>
                                        <asp:TextBox ID="email" runat="server" notnull="true" msgname="电子邮件" regex="/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/" regexmsg="信箱格式不正确" MaxLength="50"></asp:TextBox>
                                        <span><font color="red">*</font></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">个人简介： </td>
                                    <td>
                                        <asp:TextBox ID="intro" runat="server" Height="50px" Width="300px" TextMode="MultiLine"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">验证码： </td>
                                    <td>
                                        <asp:TextBox ID="VerifyCode" runat="server" notnull="true" msgname="验证码"></asp:TextBox>
                                        <img class="verifyCodeImg" src="../user/verifyimg.aspx" title="看不清,换一张" alt="" onclick="this.src='../user/verifyImg.aspx?'+Math.random()" />
                                        <br />
                                        <asp:Label ID="showMessage" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="ft_btn">
                            <asp:Button ID="ok" runat="server" Text="注 册" OnClick="ok_Click" OnClientClick="if (!CheckPassword()){return false;};" CssClass="blue_button"></asp:Button>
                            <input type="button" onclick="javascript:window.close()" value="关 闭" class="blue_button" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
