<%@ Page Language="C#" AutoEventWireup="true" CodeFile="userList.aspx.cs" Inherits="WebXabara_userList" %>

<!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 id="Head1" runat="server">
    <title>管理员列表</title>
    <link href="../InClude/StyleSheet.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery.min.js" type="text/javascript"></script>
    <script src="/js/all.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body {
	    margin-left: 0px;margin-top: 15px;margin-right: 10px;margin-bottom: 10px;
    }
    -->
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="divWidth">
        <div class="titleBg">
            管理员列表
            <asp:DropDownList ID="classList" runat="server" CssClass="inputText" OnSelectedIndexChanged="classList_SelectedIndexChanged"
                AutoPostBack="True">
            </asp:DropDownList>
            <asp:TextBox ID="keyWord" runat="server" CssClass="inputText"></asp:TextBox>
            <asp:Button ID="searchButton" runat="server" CssClass="inputBottom" Text="搜索" OnClick="searchButton_Click"
                Width="50px" />
            <asp:RequiredFieldValidator SetFocusOnError="True" ForeColor="#ff3300" ID="RequiredFieldValidator1"
                runat="server" ControlToValidate="keyWord" ErrorMessage="*"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="height10px">
    </div>
    <div class="divWidth">
        <asp:Repeater ID="RepeaterList" runat="server">
            <HeaderTemplate>
                <table width="100%" class="tableLine">
                    <tr>
                        <td class="trTitleBG">
                            用户名
                        </td>
                        <td class="trTitleBG">
                            姓名
                        </td>
                        <td class="trTitleBG">
                            区域
                        </td>
                        <td class="trTitleBG">
                            用户组
                        </td>
                        <td class="trTitleBG">
                            用户角色
                        </td>
                        <td class="trTitleBG">
                            电子邮箱
                        </td>
                        <td class="trTitleBG">
                            联系电话
                        </td>
                        <td class="trTitleBG">
                            QQ
                        </td>
                        <td class="trTitleBG">
                            最近登陆时间
                        </td>
                        <td class="trTitleBG">
                            上次登陆IP地址
                        </td>
                        <td class="trTitleBG">
                            登录次数
                        </td>
                        <td class="trTitleBG">
                            操作
                        </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%# Eval("UserId").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("UserName").ToString().Trim() %>
                    </td>                    
                    <td style="text-align:center;">
                        <%# getClass(Eval("cityID").ToString().Trim())%>
                    </td>
                    <td style="text-align:center;">
                        <%# getClass(Eval("groupID").ToString().Trim())%>
                    </td>
                    <td style="text-align:center;">
                        <%# getClass(Eval("classID").ToString().Trim())%>
                    </td>                 
                    <td>
                        <%# Eval("userEmail").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("userMobile").ToString().Trim() + (!string.IsNullOrEmpty(Eval("userTel").ToString().Trim()) ? " " + Eval("userTel").ToString().Trim() : "") %>
                    </td>
                    <td style="text-align:center;">
                        <%# getQQ(Eval("userQQ").ToString().Trim())%>
                    </td>
                    <td style="text-align:center;">
                        <%# Convert.ToDateTime(Eval("LoginDate").ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss") %>
                    </td>
                    <td>
                        <%# Eval("LoginIP").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <%# Eval("LoginNum").ToString().Trim()%>
                    </td>
                    <td style="text-align:center;">
                        <a href="userDel.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;" onclick="return confirm('删除管理员将对老数据显示真实姓名有影响，确认吗？');">删除</a>&nbsp;&nbsp;<a href="userPw.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;" onclick="return confirm('确定重设密码吗？');">重设密码</a>&nbsp;&nbsp;<a href="exe.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">操作记录</a>&nbsp;&nbsp;<a href="userPopedom.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">设置权限</a>&nbsp;&nbsp;<a href="userEdit.aspx?page=<%=Request.QueryString["page"] %>&uid=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">修改</a>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr>
                    <td style="background-color: #E9F8FC;">
                        <%# Eval("UserId").ToString().Trim()%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("UserName").ToString().Trim() %>
                    </td>
                    <td style="text-align:center;background-color: #E9F8FC;">
                        <%# getClass(Eval("cityID").ToString().Trim())%>
                    </td>
                    <td style="text-align:center;background-color: #E9F8FC;">
                        <%# getClass(Eval("groupID").ToString().Trim())%>
                    </td>
                    <td style="text-align:center;background-color: #E9F8FC;">
                        <%# getClass(Eval("classID").ToString().Trim())%>
                    </td>
                    <td style="background-color: #E9F8FC;">
                        <%# Eval("userEmail").ToString().Trim()%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("userMobile").ToString().Trim() + (!string.IsNullOrEmpty(Eval("userTel").ToString().Trim()) ? " " + Eval("userTel").ToString().Trim() : "") %>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# getQQ(Eval("userQQ").ToString().Trim())%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Convert.ToDateTime(Eval("LoginDate").ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss") %>
                    </td>
                    <td style="background-color: #E9F8FC;">
                        <%# Eval("LoginIP").ToString().Trim()%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <%# Eval("LoginNum").ToString().Trim()%>
                    </td>
                    <td style="background-color: #E9F8FC; text-align:center;">
                        <a href="userDel.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;" onclick="return confirm('删除管理员将对老数据显示真实姓名有影响，确认吗？');">删除</a>&nbsp;&nbsp;<a href="userPw.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;" onclick="return confirm('确定重设密码吗？');">重设密码</a>&nbsp;&nbsp;<a href="exe.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">操作记录</a>&nbsp;&nbsp;<a href="userPopedom.aspx?page=<%=Request.QueryString["page"] %>&id=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">设置权限</a>&nbsp;&nbsp;<a href="userEdit.aspx?page=<%=Request.QueryString["page"] %>&uid=<%# Eval("UserId").ToString().Trim() %>" style="font-weight:bold;">修改</a>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <div class="height10px">
    </div>
    <div class="divWidth">
        <asp:Literal ID="lblCurrentPage" runat="server"></asp:Literal>
    </div>
    </form>
</body>
</html>
