<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminName.aspx.cs" Inherits="Aspx1.Admin.AdminName" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Repeater ID="Repeater1" runat="server" 
        onitemcommand="Repeater1_ItemCommand">
        <HeaderTemplate>
            <table class="tableBorder" border="0" cellpadding="0" cellspacing="1">
                <tr>
                    <th colspan="12" class="ym12_bti">
                        网站管理员列表
                    </th>
                </tr>
                <tr style="text-align: center;">
                    <td class="td1" style="padding-left: 10px;">
                        管理员名称
                    </td>
                    <td width="50" class="td1">
                        登录次数
                    </td>
                    <td width="100" class="td1" style="padding-left: 10px;">
                        最后登录IP
                    </td>
                    <td width="130" class="td1" style="padding-left: 10px;">
                        最后登录时间
                    </td>
                    <td width="100" class="td1" style="padding-left: 10px;">
                        常规操作
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr style="text-align: center;">
                <td width="165" class="td1">
                    <asp:Label ID="lblAdminName" runat="server" Text='<%#Eval("username") %>'></asp:Label>
                </td>
                <td width="40" class="td1">
                    <%#Eval("logintimes") %>
                </td>
                <td width="100" class="td1">
                    <%#Eval("lastloginip") %>
                </td>
                <td width="150" class="td1">
                    <%#Eval("lastlogintime") %>
                </td>
                <td width="100" class="td1" style="text-align: center; padding-left: 10px;">
                    <asp:LinkButton ID="LinkButton1" CommandArgument="0" runat="server" CausesValidation="false">修改密码</asp:LinkButton>
                    &nbsp;
                    <asp:LinkButton ID="LinkButton2" CommandArgument="1" runat="server" CausesValidation="false" OnClientClick="return confirm('确定要删除吗?删除后不可回复');">删除</asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr style="text-align: center;">
                <td colspan="5" class="td1" style="text-align: right; padding-left: 10px;">
                    <asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server" CausesValidation="false" Font-Bold="true">添加管理员</asp:LinkButton>    
                </td>
            </tr>
            </table></FooterTemplate>
    </asp:Repeater>
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="1" runat="server" visible="false"
        id="tbAdd">
        <tr>
            <th colspan="1" class="ym12_bti">
                网站管理员添加
            </th>
        </tr>
        <tr style="text-align: center;">
            <td class="td1" style="text-align: left; padding-left: 10px;">
                管理员名称：&nbsp;
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtName"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr style="text-align: center;">
            <td class="td1" style="text-align: left; padding-left: 10px;">
                管理员密码：&nbsp;
                <asp:TextBox ID="txtPass" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtPass"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr style="text-align: center;">
            <td class="td1" style="text-align: left; padding-left: 10px;">
                再输入一遍：&nbsp;
                <asp:TextBox ID="txtPass2" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtPass2"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" Display="Dynamic" ErrorMessage="两次输入的密码不匹配！"
                    ControlToCompare="txtPass" ControlToValidate="txtPass2"></asp:CompareValidator>
            </td>
        </tr>
        <tr style="text-align: center;">
            <td class="td2" style="text-align: center;">
                <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
                <input type="reset" name="Submit2" value="重置" />
            </td>
        </tr>
    </table>
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="1" runat="server"
        visible="false" id="tbEdit">
        <tr>
            <th colspan="2" class="ym12_bti">
                网站管理员修改
            </th>
        </tr>
        <tr>
            <td class="td1" align="left" style="padding-left: 10px; width: 120px;">
                管理员名称：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtName0" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtName0"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td1" style="text-align: left; padding-left: 10px;">
                旧密码：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtPass0" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtPass0"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td1" style="text-align: left; padding-left: 10px;">
                新密码：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtPass01" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtPass01"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td1" style="text-align: left; padding-left: 10px;">
                再输入一遍新密码：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtPass02" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtPass02"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator2" runat="server" Display="Dynamic" ErrorMessage="两次输入的密码不匹配！"
                    ControlToCompare="txtPass01" ControlToValidate="txtPass02"></asp:CompareValidator>
            </td>
        </tr>
        <tr style="text-align: center;">
            <td class="td2" style="text-align: center; padding-left: 10px;" colspan="2">
                <asp:Button ID="Button2" runat="server" Text="提交" OnClick="Button2_Click" />
                <input type="reset" name="Submit2" value="重置" />
            </td>
        </tr>
    </table>
</asp:Content>
