<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.KS_UserExport" Title="用户管理" Codebehind="KS.UserExport.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <script>
        function SetManageMenu() {
            parent.openWin("用户管理菜单项", "User/KS.UserFieldStatus.aspx?", true, 550, 200);
        }
    </script>
    <div class="listedit">
        <ul>
        	
    	</ul>
    </div>
 	<div class="content-area mt20">
    	<div class="myTitle"><span class="fr mr20"><a href="javascript:;" onclick="SetManageMenu();" class="button button_on mr20">管理菜单</a><a href="KS.User.aspx" class="button">返回用户管理</a></span>用户导出</div> 
        <div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <asp:DropDownList ID="DrpSearchType" runat="server" style="margin-right:8px;">
                  <asp:ListItem Value="0" Selected="True">用户名</asp:ListItem>
                  <asp:ListItem Value="5">推荐人</asp:ListItem>
                  <asp:ListItem Value="1">姓名</asp:ListItem>
                  <asp:ListItem Value="2">用户ID</asp:ListItem>
                  <asp:ListItem Value="3">手机号码</asp:ListItem>
                  <asp:ListItem Value="4">电子邮箱</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox runat="server" Width="150px" ID="TxtKeyWord" CssClass="textbox" style="margin-right:8px;"/> 
                <asp:TextBox ID="TxtSearchBeginDate" Width="120px" runat="server"  onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>&nbsp;至&nbsp;&nbsp;<asp:TextBox ID="TxtSearchEndDate" Width="120px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});"  CssClass="textbox Wdate"></asp:TextBox>
                <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="搜索用户" OnClick="BtnSearch_Click"/>  
            </div>
            <div class="property">
                <div class="name button ml15">筛选</div>
                <div class="propertyBox">
                	<ul class="tabs">
                        <span class="screen fl">用户类型：</span>
                        <li <%=string.IsNullOrEmpty(KSCMS.S("gid"))?" class='active'":"" %>><a href="KS.UserExport.aspx"><span>所有用户</span></a></li>
                        <%
                            using (DataTable dt = MyCache.GetUserGroupTable())
                            {
                                foreach (DataRow dr in dt.Rows)
                                {
                                    if (Utils.StrToInt(dr["groupid"].ToString()) > 0 )
                                    {
                                        KSCMS.W(string.Format(@"<li{2}><a href=""KS.UserExport.aspx?gid={0}""><span>{1}</span></a></li>", dr["groupid"].ToString(), dr["groupname"].ToString(), KSCMS.S("gid") == dr["groupid"].ToString() ? " class='active'" : string.Empty));
                                    }
                                        
                                }
                            } 
                         %>
                     </ul>
                </div>
            </div>
        </div>  
         <asp:Repeater ID="RptList" runat="server" OnItemDataBound="RptList_ItemDataBound">
          <HeaderTemplate>
          <table width="99%" class="CTable"  border="0" cellpadding="1" cellspacing="1">
              <tr class="CTitle">
               <td align="center"><b>选择</b></td>
               <%--<td align="center"><b>UserID</b></td>
               <td align="center"><b>用户名</b></td>
               <td align="center"><b>用户组</b></td>
               <td align="center"><b>手机号</b></td>
               <td align="center"><b>邮箱</b></td>         
               <td align="center"><b>状态</b></td>
               <td align="center"><b>VIP有效时间</b></td>
               <td align="center"><b>业务员</b></td>--%>
                <asp:Literal ID="LiteralHeader" runat="server"></asp:Literal>
              </tr>
          </HeaderTemplate>
         <ItemTemplate>
           <tr onmouseover="this.className='CtrMouseOver'" onmouseout="this.className='CtrMouseOut'" onclick="chk(this);loadUserDetail(<%#Eval("UserID")%>,-1,1)">
                <td class="Ctd" style="text-align:center" onclick="doNone(event)"> <input type="checkbox"  name="ids" id="ids" value="<%#Eval("userid") %>" /></td>
              
               <%-- <td class="Ctd" style="text-align:center"><%# Eval("userid") %> </td>
                <td class="Ctd" style="text-align:center"><%# Eval("username") %> </td>
                <td class="Ctd" style="text-align:center"><%# Eval("groupname") %> </td>
          <td class="Ctd" style="text-align:center"><%# Eval("mobile") %> </td>
                <td class="Ctd" style="text-align:center"><%# Eval("email") %> </td>
               <td class="Ctd" style="text-align:center"><%# ShowUserStatus(Convert.ToInt32(Eval("locked"))) %>  </td>    
               <td class="Ctd" style="text-align:center"> 
                    <span class="tips"><a  href="javascript:;" class="link-color" > <%# GetVipTips(Eval("LoadType").ToString(),Eval("EndDate").ToString())  %> </a></span>
 </td>         
     
                <td class="Ctd" style="text-align:center">  <%# string.IsNullOrEmpty(Convert.ToString(Eval("agent")))?"-":Eval("agent") %></td>--%>
              <asp:Literal ID="LiteralItem" runat="server"></asp:Literal>
              </tr>         
       </ItemTemplate>
       <FooterTemplate>
              <tr class="tdbg emptycss" style="display:<%# bool.Parse((RptList.Items.Count==0).ToString())?"":"none"%>">
                <td class="Ctd" style="text-align:center" colspan="12">
                  
                </td>
               </tr> 
             
           </table>
       </FooterTemplate>
</asp:Repeater>
<asp:Panel ID="Panel1" runat="server" Height="30px">
      <div class="listedit">
        <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);"/><label for="chkall">全选</label>
        <asp:Button ID="ExecuteButton" CssClass="button" runat="server" Text="导出当前" OnClick="ExecuteButton_Click"/>
        <asp:Button ID="Button1"  CssClass="button" runat="server" Text="导出所有" OnClick="Button1_Click"/>
      </div>  
</asp:Panel>

      <KS:Page ID="Page1" runat="server" />
       
     </div>
    
</asp:Content>