<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_User_UserList, QianboCMS" EnableEventValidation="false" %>
<%@ 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>
    <title>用户管理</title>
    <link href="../Css/layout.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../../Js/XmlHttp.js"></script>
    <script type="text/javascript" src="../../Js/Common.js"></script>
</head>

<body>
    <form id="Form2" runat="server">
        <table cellspacing="1" cellpadding="0" class="wzdh" align="center">
            <tr>
                <td style="padding-left: 10px;">
                    <img src="../Images/Skin/Default/you.gif" align="absmiddle" />
                    您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; 用户管理 &gt;&gt;
                    <asp:Literal ID="LitUserType" runat="server"></asp:Literal>
				</td>
            </tr>
        </table>
        <table align="center" cellpadding="0" cellspacing="1" class="border">
            <tr>
                <td class="wzlist">
                    <asp:Repeater ID="RepUserGroupModel" runat="server">
                        <ItemTemplate><a href="SetUser.aspx?TypeId=<%# Eval("Id") %>">新增<%# Eval("Name") %></a> | </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </table>
        <table class="border" align="center" cellpadding="1" cellspacing="1">
            <tr>
                <td class="wzlist">
					用户组：
					<asp:DropDownList ID="ddlUserGroup" runat="server"></asp:DropDownList>
                    时间：
					<asp:DropDownList ID="ddlLastLoginTime" runat="server">
						<asp:ListItem Value="0">全部</asp:ListItem>
						<asp:ListItem Value="1">三个月未登录</asp:ListItem>
						<asp:ListItem Value="2">半年未登录</asp:ListItem>
						<asp:ListItem Value="3">一年未登录</asp:ListItem>
					</asp:DropDownList>
                    用户名：
					<asp:TextBox ID="txtSearchUserName" runat="server"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="btn" OnClick="btnSearch_Click" />
				</td>
            </tr>
        </table>
        <table id="rptUserList" align="center" class="border" cellspacing="1" cellpadding="0">
            <asp:Repeater ID="RepUserList" runat="server" OnItemCommand="RepUserList_ItemCommand">
                <HeaderTemplate>
                    <tr class="title">
                        <td width="30px">选择</td>
                        <td width="60px"><a href='UserList.aspx?TypeId=<%=Request.QueryString["TypeId"] %>&Order=UserID'><font color="red">用户Id↓</font></a></td>
                        <td>用户名</td>
                        <td width="180px">所属用户组</td>
                        <td width="180px">所属站点</td>
                        <td width="120px">最后登陆时间</td>
                        <td width="90px"><a href='UserList.aspx?TypeId=<%=Request.QueryString["TypeId"] %>&Order=LoginNum'><font color="red">登录次数↓</font></a></td>
                        <td width="60px"><a href='UserList.aspx?TypeId=<%=Request.QueryString["TypeId"] %>&Order=Integral'><font color="red">积分↓</font></a></td>
                        <td width="60px"><a href='UserList.aspx?TypeId=<%=Request.QueryString["TypeId"] %>&Order=YellowBoy'><font color="red">金币↓</font></a></td>
                        <td width="60px">会员状态</td>
                        <td width="120px">常规操作</td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tdbg" onmouseover="this.className='tdbgmouseover'" onmouseout="this.className='tdbg'">
                        <td align="center"><asp:CheckBox ID="cboxSelect" runat="server" /></td>
                        <td><%# Eval("UserID") %></td>
                        <td><%# Eval("LogName") %><asp:Literal ID="LitId" runat="server" Text='<%#Eval("UserID") %>' Visible="false"></asp:Literal></td>
                        <td><%#Eval("UserGroupName")%></td>
                        <td><%#GetSubSiteName(Eval("SiteId","{0}")) %></td>
                        <td><%#Eval("LastLoginTime")%></td>
                        <td><%#Eval("LoginNum")%></td>
                        <td><%#Eval("Integral")%></td>
                        <td><%#Eval("YellowBoy")%></td>
                        <td><%#Eval("IsLock").ToString()=="True"?"<span style='color: red;'>锁定</span>":"正常"%></td>
                        <td>
							<a href='SetUser.aspx?TypeId=<%# Eval("TypeId") %>&uid=<%# Eval("UserID") %>'>修改</a>
                            <asp:LinkButton ID="linkbtnLockUser" runat="server" CommandName="Lock" CommandArgument='<%#Eval("UserID")%>' Text='<%#Eval("IsLock").ToString()=="True"?"解锁":"锁定"%>'></asp:LinkButton>
                            <asp:LinkButton ID="lnkStatus" runat="server" CommandName="status" CommandArgument='<%#Eval("UserId")+","+Eval("Status")%>' Text="认证" Enabled='<%#Eval("Status").ToString()=="1"?false:true %>'></asp:LinkButton>
                            <asp:LinkButton ID="lnkDelete" CommandName="Delete" CommandArgument='<%#Eval("UserID")%>' runat="server" OnClientClick="return confirm('删除会员将同时删除此会员的部分相关资源，包括：\r\n·用户收藏\r\n·用户专栏(不含投递文章)\r\n·用户好友列表\r\n是否确定继续操作？')">删除</asp:LinkButton>
						</td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <table class="border" align="center" cellpadding="1" cellspacing="1">
            <tr>
                <td class="wzlist">
                    <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageSize="20" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Never" ShowNavigationToolTip="True" Width="99%" HorizontalAlign="Right" OnPageChanging="AspNetPager_PageChanging" LayoutType="Table" CustomInfoSectionWidth="10%"></webdiyer:AspNetPager>
				</td>
            </tr>
        </table>
        <table class="border" align="center" cellpadding="1" cellspacing="1">
            <tr>
                <td class="wzlist">
                    <input type="checkbox" id="chk" onclick="SelectAll('chk', 'rptUserList')" />
                    全选
                    <asp:Button ID="btnDeleteMore" runat="server" Text="删除所选项" CssClass="btn" OnClick="btnDeleteMore_Click" OnClientClick="return confirm('删除会员将同时删除此会员的部分相关资源，包括：\r\n·用户收藏\r\n·用户专栏(不含投递文章)\r\n·用户好友列表\r\n是否确定继续操作？')" />
				</td>
            </tr>
        </table>
    </form>
</body>
</html>