<%@ Page Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Useradd.aspx.cs" Inherits="Mvcb2b.admin.Useradd" Title="用户添加" ValidateRequest="false" %>
<%@ MasterType VirtualPath="Admin.Master" %>
<%@ Register Src="controls/Upsmall.ascx" TagName="Upsmall" TagPrefix="uc3" %>
<%@ Register Src="controls/Areaclass.ascx" TagName="Areaclass" TagPrefix="uc4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" src="calendar/calendar.js"></script>
    <script type="text/javascript">
        function setCheckInstartdate(d) {
            document.getElementById("birthday").value = d;
        }
        var editorpath = "<%=Webd()%>editors/";
        function checkform() {
            if (typeof (Page_ClientValidate) == 'function') {
                if (Page_ClientValidate('Haosubmit'))    //(Page_ClientValidate())
                {
                    if (document.getElementById("sel0").value == "" || document.getElementById("sel0").value == null) {
                        alert("-城市不能为空！");
                        return false;
                    }
                }
            }
        }

        function check_Pass(source, args) {
            args.IsValid = true;
            if (args.Value.length < 5) {
                //   alert("你输入的密码太短了，至少要 5 个字符...");	      
                args.IsValid = false;
            }
            if (args.Value.length > 15) {
                // alert("你输入的密码太长，最长不可超过 15 个字符...");
                args.IsValid = false;
            }
        }

        function check_PassI(source, args) {
            args.IsValid = true;
            if (args.Value != document.getElementById("<%=user_pwd_txt.ClientID%>").value) {
                // alert("「确认密码」与「密码」必须要完全相同..");
                args.IsValid = false;
            }
        }


    </script>
    <div class="path">
        当前位置： 用户管理 >> 用户添加</div>
    <h3>
        <asp:Literal ID="Literal1" runat="server"></asp:Literal></h3>
    <table width="92%" border="0" class="editor" align="center" style="background-color: #f5f5f5;"
        cellpadding="3" cellspacing="1">
        <tr>
            <td width="120" align="right">
                <span style="color: Red">*</span>注册账号：
            </td>
            <td>
                <asp:TextBox ID="user_en_txt" runat="server" Text="" Width="120px"></asp:TextBox>
                <span style="color: #ccc;">&nbsp; *为必填</span>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="用户名不能为空"
                    Display="None" ControlToValidate="user_en_txt" ValidationGroup="Haosubmit"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <span style="color: Red">*</span>密码：
            </td>
            <td>
                <asp:TextBox ID="user_pwd_txt" TextMode="Password" runat="server" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="user_pwd_txt"
                    Display="None" ErrorMessage="密码不能为空！5-15位的数字或英文字母" ValidationGroup="Haosubmit">密码不能为空！</asp:RequiredFieldValidator><asp:CustomValidator
                        ID="CustomValidator2" runat="server" ControlToValidate="user_pwd_txt" Display="None"
                        ErrorMessage="密码格式不正确！" ClientValidationFunction="check_Pass" ValidationGroup="Haosubmit">密码格式不正确！</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <span style="color: Red">*</span>确认：
            </td>
            <td>
                <asp:TextBox ID="user_pwdI_txt" runat="server" TextMode="Password" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="user_pwdI_txt"
                    Display="None" ErrorMessage="确认密码不能为空！" ValidationGroup="Haosubmit">确认密码不能为空！</asp:RequiredFieldValidator><asp:CustomValidator
                        ID="Customvalidator4" runat="server" ControlToValidate="user_pwdI_txt" Display="None"
                        ErrorMessage="确认密码必须和密码相同！" ClientValidationFunction="check_PassI" ValidationGroup="Haosubmit">确认密码必须和密码相同！</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                找回密码问题：
            </td>
            <td>
                <asp:TextBox ID="user_que_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                找回密码答案：
            </td>
            <td>
                <asp:TextBox ID="user_ans_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <!--<tr><td align="right">用户级别：</td><td><asp:dropdownlist id="jbid_txt" runat="server" Width="120px" >	
									<asp:ListItem Value="">请选择</asp:ListItem>									
								</asp:dropdownlist></td>
</tr>-->
        <tr>
            <td align="right">
                性别：
            </td>
            <td>
                <label>
                    <input type="radio" name="sex" id="man" value="0" class="input1" /></label>男
                <label>
                    <input type="radio" name="sex" id="woman" value="1" class="input1" /></label>女
            </td>
        </tr>
        <tr>
            <td align="right">
                用户昵称：
            </td>
            <td>
                <asp:TextBox ID="usernick_txt" runat="server" Text="" Width="120px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                真实姓名：
            </td>
            <td>
                <asp:TextBox ID="realname_txt" runat="server" Text="" Width="120px"></asp:TextBox>
            </td>
        </tr>
        <tr>
             <td  align="right">出生日期：</td>
             <td ><input name="birthday" id="birthday" style="width:120px;"  maxlength="12"  />
              <a onclick="event.cancelBubble=true;" href="javascript:showCalendar('dimg1',false,'birthday',null,'setCheckInstartdate')"><img src="calendar/timebtn.gif" alt="" width="34" height="21" border="0" align="middle"  id="dimg1" /></a> <span style="color:#ccc;">&nbsp; 可直接输入日期如：2014-4-26</span>
             </td>
             </tr>
        <tr>
            <td align="right">
                <span style="color: Red">*</span>所在地区：
            </td>
            <td>
                <uc4:Areaclass ID="Areaclass1" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">
                身份证号：
            </td>
            <td>
                <asp:TextBox ID="usersfz_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                联系方式：
            </td>
            <td>
                <asp:TextBox ID="contact_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <span style="color: Red">*</span>Email：
            </td>
            <td>
                <asp:TextBox ID="email_txt" runat="server" Text="" Width="300px"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator2" runat="server" ErrorMessage="邮箱不能为空" Display="None"
                    ControlToValidate="email_txt" ValidationGroup="Haosubmit"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                电话：
            </td>
            <td>
                <asp:TextBox ID="tel_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                传真：
            </td>
            <td>
                <asp:TextBox ID="fax_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                手机：
            </td>
            <td>
                <asp:TextBox ID="mobile_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                地址：
            </td>
            <td>
                <asp:TextBox ID="address_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                邮编：
            </td>
            <td>
                <asp:TextBox ID="postcode_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                QQ/MSN：
            </td>
            <td>
                <asp:TextBox ID="userqq_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                网址：
            </td>
            <td>
                <asp:TextBox ID="userweb_txt" runat="server" Text="" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
             <td  align="right" >所属行业：</td>
             <td class="hui12-9"><select name="industry" id="industry">
              <option value="" selected="selected"></option>
                    <option value="1">国家机关/党群组织/事业单位</option>
                    <option value="2">教育/培训/科研/院校</option>
                    <option value="3">媒体/出版/文化传播</option>
                    <option value="4">金融业（银行/投资/基金/证券/保险）</option>
                    <option value="5">企业（国有企业/外资企业/合资企业等）</option>
                    <option value="6">房地产/建筑/建材/工程</option>
                    <option value="7">其他</option>
             </select></td>
           </tr>
           <tr>
             <td  align="right" >职务：</td>
             <td class="hui12-9"><select name="post" id="post">
                                 <option value="" selected="selected"></option>
                    <option value="职员">职员</option>
                    <option value="经理">经理</option>
                    <option value="资深经理">资深经理</option>
                    <option value="总监">总监</option>
                    <option value="高级总监">高级总监</option>
                    <option value="总经理">总经理</option>
                    <option value="其他">其他</option>
             </select></td>
           </tr>
           <tr>
             <td  align="right" >学历：</td>
             <td class="hui12-9"><label>
               <input type="radio" name="degree" id="specialist" value="专科以下" class="input1" /></label>专科以下　<label><input type="radio" name="degree" id="undergraduate" value="本、专科" class="input1" /></label>本、专科　<label><input type="radio" name="degree" id="master" value="硕士" class="input1" /></label>硕士　<label><input type="radio" name="degree" id="dr" value="博士" class="input1" /></label>博士</td>
             </tr>
        <!--<tr>
            <td align="right">
                用户图像：
            </td>
            <td>
                <uc3:Upsmall ID="Upsmall1" runat="server" />
            </td>
        </tr>-->
        <%--picsmall_txt 对应 userlogo--%>
        <tr>
            <td colspan="2" align="center">
                <asp:HiddenField ID="action_txt" runat="server" />
                <asp:HiddenField ID="id_txt" runat="server" />
                <asp:Button ID="Add" runat="server" Text="添加" Width="58px" ValidationGroup="Haosubmit"
                    OnClick="Add_Click" />&nbsp;<asp:Button ID="Edit" runat="server" Text="修改" Width="58px"
                        TabIndex="10" ValidationGroup="Haosubmit"></asp:Button>&nbsp;<asp:ValidationSummary
                            ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False"
                            ValidationGroup="Haosubmit"></asp:ValidationSummary>
                <input type="button" value="返回" name="go" style="width: 58px;" onclick="javascript:history.go(-1);" />
            </td>
        </tr>
    </table>
</asp:Content>
