<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_UserMobileLog" Title="手机绑定记录管理" Codebehind="KS.UserMobileLog.aspx.cs" %>
<%@ 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 class='active'><a href="KS.UserMobileLog.aspx"><span>会员手机绑定记录</span></a></li>
                    <li <%=MyCache.GetShopCommonConfig(124)=="1"?"style='display:block'":"style='display:none'" %>><a href="KS.UserAnoLogin.aspx"><span>会员异地登录记录</span></a></li>
                </ul>
            </div>
            <div class="quickSearch notitle clearfix">
               <div class="SearchBox fl">
                   <asp:TextBox ID="TxtKeyWord" runat="server" CssClass="textbox" Width="200px" />
                     <asp:DropDownList ID="DrpSearchType" runat="server" style="margin-right:8px;">
                         <asp:ListItem Value="2">手机号</asp:ListItem>
                         <asp:ListItem Value="0">用户名</asp:ListItem>
                         <asp:ListItem Value="1">用户IP</asp:ListItem>
                     </asp:DropDownList>
                   <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="开始搜索" OnClick="BtnSearch_Click" />
               </div>
            </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 style="color:#999;"><%# Utils.OrderDeviceName(Utils.StrToInt(Eval("DeviceType"))) %></span>
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="username" HeaderText="用户名" >
                             <itemstyle width="120px" HorizontalAlign="Center" />
                        </asp:BoundField> 
                        <asp:BoundField DataField="adddate" HeaderText="绑定时间">
                            <itemstyle width="120px" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UserIP" HeaderText="绑定时IP">
                            <itemstyle width="120px" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="绑定地点">
                            <itemstyle width="120px" HorizontalAlign="Center" />
                            <itemtemplate>
                                 <span><%# Kesion.BLL.CheckUserLogin.GetAddressByIP(Eval("UserIP").ToString(),1,1) %></span>
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="绑定手机号">
                            <itemstyle HorizontalAlign="center" />
                            <itemtemplate>
                                <%# Eval("mobile") %>
                            </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>
        </div>
    </asp:Panel>
</asp:Content>

