<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true"
    CodeBehind="Administrators.aspx.cs" Inherits="Amr.SuperSiteGroup.Web.Management.Administrators" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit" colspan="2">
                    <h1 style="float: left">
                        用户信息</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr class="tr1">
                            <td colspan="2">
                                <asp:Label ID="lbEditType" runat="server" Text="修改个人信息"></asp:Label><br />
                                <asp:Label ID="errorInfo" runat="server" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    用户名<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbUserName" runat="server" Wrap="False" />
                                <validation targetid="<%=tbUserName.ClientID%>" targetname="用户名" type="text" />
                            </td>
                        </tr>
                        <tr style="<%=oldPassword%>">
                            <td width="20%">
                                <div align="right">
                                    旧密码<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbOldPassword" runat="server" Wrap="False" TextMode="Password" />
                                &nbsp;不修改密码请留空
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    密码<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbNewPassword" runat="server" Wrap="False" TextMode="Password" />
                                &nbsp;不修改密码请留空
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    确认密码<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbConfirmPassword" runat="server" Wrap="False" TextMode="Password" />
                                &nbsp;不修改密码请留空
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    姓名：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbName" runat="server" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    Email：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbEmail" runat="server" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    手机：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbMobilePhone" runat="server" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    用户类型：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="UserType" runat="server" RepeatDirection="Horizontal" CssClass="checkbox"
                                    AutoPostBack="True" OnSelectedIndexChanged="UserType_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Selected="True">超级管理员</asp:ListItem>
                                    <asp:ListItem Value="1">站点管理员</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    账户状态：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="IsActive" runat="server" RepeatDirection="Horizontal" CssClass="checkbox">
                                    <asp:ListItem Value="0">停用</asp:ListItem>
                                    <asp:ListItem Value="1" Selected="True">启用</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:LinkButton ID="lbSubmit" runat="server" Text="【提交】" OnClick="lbSubmit_Click"
                                    OnClientClick="return validateForm()" />&nbsp; &nbsp;
                                <asp:LinkButton ID="lbAddNewUser" runat="server" Text="【添加新用户】" Visible="false" OnClientClick="return validateForm()"
                                    OnClick="lbAddNewUser_Click" />&nbsp; &nbsp;<asp:LinkButton ID="lbCancel" runat="server"
                                        Text="【取消】" OnClick="lbCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="edit_main" style="width: 50%;">
                    <div style="width: 100%; height: 350px; overflow-y: auto; overflow-x: hidden; <%=manageSite%>">
                        <asp:GridView ID="SiteList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
                            Width="100%" CellPadding="2" GridLines="None" CssClass="table_list" DataKeyNames="SiteId"
                            CellSpacing="1">
                            <AlternatingRowStyle />
                            <Columns>
                                <asp:TemplateField HeaderText="管理站点">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbManageSite" runat="server" />
                                    </ItemTemplate>
                                    <ControlStyle CssClass="CheckBox" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="SiteId" HeaderText="站点编号"></asp:BoundField>
                                <asp:BoundField DataField="SiteName" HeaderText="站点名称"></asp:BoundField>
                                <asp:TemplateField HeaderText="站点网址">
                                    <ItemTemplate>
                                      <asp:Literal ID="ltSiteChildDomain" runat="server" Text='<%# Bind("SiteChildDomain") %>'></asp:Literal>.<asp:Literal ID="ltSiteRootDomain" runat="server" Text='<%# Bind("SiteRootDomain") %>'></asp:Literal>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle CssClass="dg_page" />
                            <HeaderStyle CssClass="tr1" />
                            <RowStyle CssClass="tr_a" />
                            <AlternatingRowStyle CssClass="tr_b" />
                            <EditRowStyle CssClass="tr_a" />
                            <FooterStyle CssClass="dg_header" />
                            <SelectedRowStyle CssClass="tr_a" />
                        </asp:GridView>
                    </div>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit" style="<%=managerList%>">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left; width: 84px;">
                        管理员列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main" width="100%">
                    <asp:GridView ID="gvSiteUser" runat="server" GridLines="None" CssClass="table_list"
                        Width="100%" EnableModelValidation="True" AutoGenerateColumns="False">
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbEditUser" runat="server" CausesValidation="False" Text="【编辑】"
                                        CommandArgument='<%# Bind("UserId") %>' OnClick="lbEditUser_Click"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="UserId" HeaderText="用户编号" SortExpression="UserId" />
                            <asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="UserName" />
                            <asp:BoundField DataField="Name" HeaderText="姓名" SortExpression="Name" />
                            <asp:BoundField DataField="Email" HeaderText="邮箱" SortExpression="Email" />
                            <asp:BoundField DataField="MobilePhone" HeaderText="手机" SortExpression="MobilePhone" />
                            <asp:BoundField DataField="UserType" HeaderText="用户类型" SortExpression="UserType" />
                            <asp:BoundField DataField="LastLoginIP" HeaderText="上次登录IP" SortExpression="LastLoginIP" />
                            <asp:BoundField DataField="LastLoginOn" HeaderText="上次登录时间" SortExpression="LastLoginOn" />
                            <asp:BoundField DataField="IsActive" HeaderText="启用状态" SortExpression="IsActive" />
                            <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" SortExpression="CreatedOn" />
                        </Columns>
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
    </div>
</asp:Content>
