<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeBehind="KS.UserAnoLogin.aspx.cs" Inherits="Kesion.NET.WebSite.Admin.User.KS_UserAnoLogin" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <!--<KS:TopNav ID="TopNav1" runat="server" Text="会员登录及手机绑定记录管理" />-->
        <div class="content-area mt20">
            
            <div class="tabs_header">
                <ul class="tabs">
                    <li><a href="KS.UserLoginLog.aspx"><span>会员登录记录</span></a></li>
                    <li><a href="KS.UserMobileLog.aspx"><span>会员手机绑定记录</span></a></li>
                    <li class="active"><a href="KS.UserAnoLogin.aspx"><span>会员异地登录记录</span></a></li>
                </ul>
            </div>
            <div class="quickSearch clearfix">
                <asp:TextBox ID="TxtKeyWord" runat="server" CssClass="textbox" Width="200px" />
                <asp:DropDownList ID="DrpSearchType" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="0">用户名</asp:ListItem>
                    <asp:ListItem Value="1">用户IP</asp:ListItem>
                    <asp:ListItem Value="2">备注</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="开始搜索" OnClick="BtnSearch_Click" />
            </div>
            <div>
                
                <KS:KSGV ID="MessageView" CssClass="CTable" runat="server" AutoGenerateColumns="False" DataKeyNames="FieldID" GridLines="None"
                    OnRowDataBound="FieldListView_RowDataBound" OnRowCommand="list_RowCommand" PagerType="CustomNumeric" Width="99%" EnableTheming="True" EmptyDataText="找不到会员登录记录!">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <ItemStyle HorizontalAlign="Center" Width="50px" />
                            <ItemTemplate>
                                <input type="checkbox" name="ids" id="ids" value='<%#Eval("id") %>' > 
                            </ItemTemplate>
                        </asp:TemplateField>
                       <asp:TemplateField HeaderText="登录设备">
                            <ItemStyle Width="45px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style='color:#999;'" %>><%# Utils.OrderDeviceName(Utils.StrToInt(Eval("DeviceType"))) %></span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="用户名">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>><%#Eval("UserName") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="登录时间">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>><%#Eval("adddate") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="登录IP">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>><%#Eval("UserIP") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="登录地址">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>><%#Eval("LoginAddress") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="是否异地登录">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                 <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>>
                                    <%#Eval("IsLogInAnoplace").ToString()=="1"?"异地登录":"正常登录" %>
                                </span>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="备注说明">
                            <ItemStyle Width="120px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <span <%#Utils.StrToInt(Eval("IsLogInAnoplace").ToString())==1?"style='color:red;'":"style=''" %>><%#Eval("Remark") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="CTitle" />
                    <EmptyDataRowStyle CssClass="emptycss" />
                </KS:KSGV>
                <asp:Panel ID="Panel3" runat="server" Height="30px">
                    <div class="listedit">
                        <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);" /><label for="chkall">全选</label>
                        <input type="button" value="删除选中的记录" class="button" onclick="if (GetIDS('del')) { this.form.action = '?action=del'; this.form.submit() }" id="Button1" />
                    </div>
                </asp:Panel>

            </div>

            <KS:Page ID="Page1" runat="server" />
            <div class="message">
                <strong>特别提醒：</strong> 如果用户登录记录表记录太多，影响了系统性能，可以删除一定时间段前的记录以加快速度。 
                <div>
                    <strong>删除范围：</strong>
                    <asp:RadioButtonList ID="RdbDelType" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                        <asp:ListItem Value="1">10天前</asp:ListItem>
                        <asp:ListItem Value="2">1个月前</asp:ListItem>
                        <asp:ListItem Value="3">2个月前</asp:ListItem>
                        <asp:ListItem Value="4">3个月前</asp:ListItem>
                        <asp:ListItem Value="5">6个月前</asp:ListItem>
                        <asp:ListItem Value="6" Selected>1年前</asp:ListItem>
                    </asp:RadioButtonList>
                    <asp:Button ID="BtnDel" runat="server" Text="执行删除" OnClick="BtnDel_Click" CssClass="button button_on" />
                </div>
            </div>
    </asp:Panel>
</asp:Content>
