<%@ 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="3" cellspacing="1" id="demo_table">
      <tr>
        <th colspan="5"> 网站管理员列表 </th>
      </tr>
      <tr align="center">
        <td class="td1"> 管理员名称 </td>
        <td class="td1" width="10%"> 登录次数 </td>
        <td class="td1" width="15%"> 最后登录IP </td>
        <td class="td1" width="15%"> 最后登录时间 </td>
        <td class="td1" width="15%"> 常规操作 </td>
      </tr>
    </HeaderTemplate>
    <ItemTemplate>
      <tr align="center">
        <td class="td4"><asp:Label ID="lblAdminName" runat="server" Text='<%#Eval("username") %>'></asp:Label></td>
        <td><%#Eval("logintimes") %> </td>
        <td><%#Eval("lastloginip") %> </td>
        <td><%#Eval("lastlogintime") %> </td>
        <td><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>
        <td colspan="5" class="td5"><asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server" CausesValidation="false" Font-Bold="true">添加管理员</asp:LinkButton>
        </td>
      </tr>
      </table>
<script language="JavaScript">
	tigra_tables('demo_table', 2, 1, '#ecfbd4', '#ffffff', '#e5f1f4', '#bce774');
</script>
    </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 width="150" class="td2"> 管理员名称：</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 width="150" class="td2"> 管理员名称： </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>
