<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sys_user_add.aspx.cs" Inherits="admin_sys_user_add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link href="../../admin/skin/css.css" rel="stylesheet" type="text/css" />
    <link href="/images/css/inbox.css"rel="stylesheet" type="text/css" />
    <script src="../../js/Ajax.js"></script>
    <script language=javascript>
    function SetValue(username)
    {
         var str="";
         Page_Load(username.value,"sys_user_add.aspx");
         var test=CallFun();
         if(test=="true")
         {
              str="<font color=green>该用户名可以注册</font>";
              document.getElementById("ImageButton1").disabled="";
              
         }
         else
         {
             str="<font color=red>该用户名已经被注册</font>";
             document.getElementById("ImageButton1").disabled="disabled";
         }
         document.getElementById("dv1").innerHTML=str;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 98%" class="Ibx_gTable_Con">
            <tr>
                <td align="center" colspan="2">
                    会员添加</td>
            </tr>
            <tr>
                <td align="right">
                    所属会员组:</td>
                <td>
                    <asp:DropDownList ID="drop_role" runat="server">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td align="right">
                    用户名:</td>
                <td>
                    <asp:TextBox ID="txt_name" onBlur="SetValue(this)" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_name"
                        Display="Dynamic" ErrorMessage="用户名不能为空"></asp:RequiredFieldValidator><div id="dv1"></div></td>
            </tr>
            <tr>
                <td align="right">
                    密码:</td>
                <td>
                    <asp:TextBox ID="txt_pass" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_pass"
                        Display="Dynamic" ErrorMessage="密码不能为空"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td align="right">
                    昵称:</td>
                <td>
                    <asp:TextBox ID="txt_nichen" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="right">
                    电子邮箱:</td>
                <td>
                    <asp:TextBox ID="txt_email" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/admin/skin/images/button_save.gif" OnClick="ImageButton1_Click" /></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
