<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OperatorEdit.aspx.cs" Inherits="LMN.Web.Admin.Config.OperatorEdit" %>

<!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="../css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
<script src="../../ckeditor/fckeditor.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server" target="iframe">
    <div style="padding: 20px;">
        <h4>管理员管理</h4>
        <div class="division">
            <table width="100%">
                <tr>
                    <th class="w120">用户名：</th>
                    <td><asp:TextBox ID="username" runat="server"></asp:TextBox></td>
                </tr>
            </table>
        </div>
        <h4>修改密码</h4>
        <div class="division">
            <table width="100%">
                <tr>
                    <th class="w120">新密码： </th>
                    <td><input type="password" name="userpass" style="width: 120px" id="userpass" runat="server" /></td>
                </tr>
                <tr>
                    <th>确认密码：</th>
                    <td><input type="password" name="confirm" id="confirm" style="width: 120px" runat="server" /></td>
                </tr>
            </table>
        </div>
        <h4>权限管理</h4>
        <div class="division">
            <table width="100%">
                <tr>
                    <th class="w120">类型：</th>
                    <td><label><input type="radio" name="super" id="super_n" value="0" runat="server" onclick="$('#authBox').show()" />普通管理员</label> <label><input type="radio" runat="server" name="super" value="1" id="super_s" onclick="$('#authBox').hide()" />超级管理员</label></td>
                </tr>
                <tr id="authBox" style="display: none">
                    <th>权限：</th>
                    <td>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <div>
                                    <input type="checkbox" name="auth" value="<%#Eval("id") %>" id="auth_<%#Eval("id") %>" /> <label for="auth_<%#Eval("id") %>">
                                        <%#Eval("name") %></label></div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
                <tr>
                    <th>状态：</th>
                    <td><label><input type="checkbox" name="islock" id="islock" value="1" runat="server" />锁定</label></td>
                </tr>
            </table>
        </div>
        <h4>基本信息</h4>
        <div class="division">
            <table width="100%">
                <tr>
                    <th class="w120">姓名：</th>
                    <td><input type="text" name="nick" id="nick" maxlength="50" runat="server" /></td>
                </tr>
                <tr>
                    <th>编号：</th>
                    <td><input type="text" name="operno" id="operno" maxlength="50" runat="server" /></td>
                </tr>
                <tr>
                    <th>部门：</th>
                    <td><input type="text" name="depart" id="depart" maxlength="50" runat="server" /></td>
                </tr>
                <tr>
                    <th>备注：</th>
                    <td>
                        <textarea name="remarks" id="remarks" style="height: 50px; width: 80%;" runat="server"></textarea></td>
                </tr>
                <tr>
                    <th>注册：</th>
                    <td>
                        <asp:Label ID="addtime" runat="server" /></td>
                </tr>
                <tr>
                    <th>登录：</th>
                    <td>上次登录：<asp:Label ID="logintime" runat="server" />，<asp:Label ID="loginip" runat="server" />
                        &nbsp;登录次数：<asp:Label ID="logins" runat="server" /></td>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td><b class="submitBtn"><input type="submit" value="保存" id="x-op-info-form-btn" /></b></td>
                </tr>
            </table>
        </div>
    </div>
</form>
<iframe id="iframe" name="iframe" src="about:blank" style="display: ;"></iframe>
<script type="text/javascript">
<!--
    var id = "<%=OperId%>";
    $(document).ready(function() {
        if ($("#super_s").attr("checked"))
            $("#authBox").hide();
        else {
            $("#authBox").show();

            $.get("Action.aspx?action=getauthbyadminid&id=" + id + "&" + new Date(), function(data) {
                if (data != "-" || data != "null") {
                    var json = eval(data);
                    for (var j = 0; j < json.length; j++) {
                        $("#auth_" + json[j].auth_id).attr("checked", true);
                    }
                }
            });
        }
    });
//-->
</script>
</body>
</html>
