<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminLoginHistoryList.aspx.cs"
    Inherits="WstWeb.Admin.Admin.AdminLoginHistoryList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <script src="../Js/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../Js/PublicComm.js" type="text/javascript"></script>
    <script src="../Js/WinFuns.js" type="text/javascript"></script>
    <script src="../Js/pageloader.js" type="text/javascript"></script>
    <script type="text/javascript">
        //刷新
        var RefreshPage = function (v_istop) {
            if (v_istop) $("#hdnIsTop").val("1");
            else $("#hdnIsTop").val("0");
            __doPostBack("lbtnRefresh", "");
        }
        var CloseChildPage = function (v_istop) {
            new WinFuns().CloseNewWindow("wincomm");
            setTimeout(function () { RefreshPage(v_istop); }, 200);
        }
        var DelInfo = function (v_id) {
            if (v_id == "-1") {
                if (!_alertCheckBoxCollection(document.getElementsByName('items'), '请选择需要删除的内容！')) {
                    var res = confirm("确定要删除所选记录吗？");
                    if (res == true) {
                        top.IndexNewWindow("Admin/LoginLogDel.aspx?from=main&action=Del&id=" + _getCheckBoxCollectionValue(document.getElementsByName('items')), "删除后台登录日志", 150, top.document.documentElement.clientHeight - 500);
                        //_goto(url + '&Id=' + _getCheckBoxCollectionValue(document.getElementsByName('items')));
                    }
                }
            } else {
                top.IndexNewWindow("Admin/LoginLogDel.aspx?from=main&action=Del&id=" + v_id, "删除后台登录日志", 150, top.document.documentElement.clientHeight - 500);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctright">
        <div class="map">
            <h3>
                <strong class="left">登录日志管理</strong><strong class="right search_icon"><a href="JavaScript:void(0)"
                    onclick="EditInfo(-1)"></a></strong></h3>
        </div>
        <div class="formclum">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td width="100" align="right">
                            登录时间段：
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtTime1" CssClass="inp1 easyui-datebox" runat="server" Width="120"></asp:TextBox>
                            到
                            <asp:TextBox ID="txtTime2" CssClass="inp1 easyui-datebox" runat="server" Width="120"></asp:TextBox>
                            <asp:Button ID="btn_cx" runat="server" Text="" CssClass="button10" OnClick="btn_cx_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" height="1" bgcolor="#5298B6">
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="clear">
        </div>
        <div class="form" style="margin-top: 10px;">
        <div class="map">
                <h3>
                    <strong class="left"><a href="JavaScript:void(0)" onclick="DelInfo(-1)">批量删除</a></strong>
                </h3>
            </div>
            <div class="clear">
            </div>
            <table class="gridView" cellspacing="0" cellpadding="0" rules="all" border="1" style="border-collapse: collapse;">
                <tr>
                    <th scope="col">
                        <input type="checkbox" name="CheckAll" id="CheckAll" title="全选" />
                    </th>
                    <th scope="col">
                        登录名
                    </th>
                    <th scope="col">
                        登录时间
                    </th>
                    <th scope="col">
                        登录IP
                    </th>
                </tr>
                <asp:Repeater ID="RepList" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <input type="checkbox" name="items" id="checkbox2" value='<%# Eval("Id") %>' />
                            </td>
                            <td align="left">
                                <%# Eval("AdminAccount")%>
                            </td><td>
                                <%# Convert.ToDateTime(Eval("LoginTime").ToString()).ToString("yyyy-MM-dd")%>
                            </td>
                            <td>
                                <%#Eval("LoginIp")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <div class="page-fenye">
                <webdiyer:AspNetPager ID="AspNetPager1" HorizontalAlign="Center" Font-Bold="true"
                    runat="server" Width="100%" CenterCurrentPageButton="True" OnPageChanging="AspNetPager1_PageChanging"
                    ShowPageIndexBox="Always" FirstPageText="首页" PrevPageText="上一页" NextPageText="下一页"
                    LastPageText="尾页" PageIndexBoxType="TextBox" CurrentPageButtonTextFormatString="{0:[0]}"
                    AlwaysShow="True" ShowNavigationToolTip="True" PageSize="20" CustomInfoHTML="记录总数：%RecordCount%"
                    CustomInfoSectionWidth="200px" ShowCustomInfoSection="Left" CustomInfoStyle="text-valign:middle;margin-right:0px;"
                    CustomInfoClass="bluelk">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    <input type="hidden" id="hdnIsTop" runat="server" value="0" />
    <asp:LinkButton ID="lbtnRefresh" runat="server" OnClick="lbtnRefresh_Click"></asp:LinkButton>
    </form>
</body>
</html>
