<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminName.aspx.cs" Inherits="ETongJin.Search.Web.Admin.AdminName"  %>
<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="5"> 网站管理员列表 </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="3" cellspacing="1" runat="server" visible="false" id="tbAdd">
    <tr>
      <th colspan="2"> 网站管理员添加 </th>
    </tr>
    <tr>
      <td class="td2" width="150">管理员名称：</td>
      <td class="td1">
        <asp:TextBox ID="txtName" runat="server" CssClass="ym12_input2"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic" ErrorMessage="不能为空！" ControlToValidate="txtName"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td class="td2"> 管理员密码：</td>
      <td class="td1">
        <asp:TextBox ID="txtPass" runat="server" TextMode="Password" CssClass="ym12_input2"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic" ErrorMessage="不能为空！" ControlToValidate="txtPass"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td class="td2"> 再输入一遍：</td>
      <td class="td1">
        <asp:TextBox ID="txtPass2" runat="server" TextMode="Password" CssClass="ym12_input2"></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>
      <td colspan="2" class="td3"><asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" CssClass="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
        <input type="reset" name="Submit2" value="重置" Class="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
      </td>
    </tr>
  </table>
  <table class="tableBorder" border="0" cellpadding="3" cellspacing="1" runat="server" visible="false" id="tbEdit">
    <tr>
      <th colspan="2"> 网站管理员修改 </th>
    </tr>
    <tr>
      <td class="td2" width="150"> 管理员名称： </td>
      <td class="td1"><asp:TextBox ID="txtName0" runat="server" CssClass="ym12_input2"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="Dynamic" ErrorMessage="不能为空！" ControlToValidate="txtName0"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td class="td2"> 旧密码： </td>
      <td class="td1"><asp:TextBox ID="txtPass0" runat="server" TextMode="Password" CssClass="ym12_input2"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Display="Dynamic" ErrorMessage="不能为空！" ControlToValidate="txtPass0"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td class="td2"> 新密码： </td>
      <td class="td1"><asp:TextBox ID="txtPass01" runat="server" TextMode="Password" CssClass="ym12_input2"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" Display="Dynamic" ErrorMessage="不能为空！" ControlToValidate="txtPass01"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td class="td2"> 再输入一遍新密码： </td>
      <td class="td1"><asp:TextBox ID="txtPass02" runat="server" TextMode="Password" CssClass="ym12_input2"></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>
      <td colspan="2" class="td3"><asp:Button ID="Button2" runat="server" Text="提交" OnClick="Button2_Click" CssClass="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
        <input type="reset" name="Submit2" value="重置" class="btn02" onmouseover="this.className='btn04'" onmouseout="this.className='btn02'" />
      </td>
    </tr>
  </table>
</asp:Content>
