<%@ page language="C#" autoeventwireup="true" inherits="admin_user_PowerGroup, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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 runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script src="../../js/Common.js" type="text/javascript"></script>

    <script type="text/javascript">
        function check(obj, name) {
            var input = DianCMS_$(name).getElementsByTagName("input");

            if (obj.checked) {
                DianCMS_$("SapnPowerGroup").innerHTML = "选择全部";
                for (var i = 0; i < input.length; i++) {
                    if (input[i].type == "checkbox")
                        input[i].checked = true;
                }
            }
            else {
                DianCMS_$("SapnPowerGroup").innerHTML = "取消选择";
                for (var i = 0; i < input.length; i++) {
                    if (input[i].type == "checkbox")
                        input[i].checked = false;
                }
            }
        }

        //权限按行选函数
        function selectRow(obj) {
            var _obj = obj.id.split("_")[0] + "_" + obj.id.split("_")[1] + "_";
            document.getElementById(_obj + "Show").checked = obj.checked;
            document.getElementById(_obj + "Insert").checked = obj.checked;
            document.getElementById(_obj + "Update").checked = obj.checked;
            document.getElementById(_obj + "Delete").checked = obj.checked;
        }
        //权限按列选函数
        function seleCol(obj, name) {
            var _i;
            var i = 1;
            var _obj;
            var __obj;
            while (true) {
                if (i < 10)
                    _i = "0" + i;
                else
                    _i = i;
                __obj = obj.id.split("_")[0] + "_ctl" + _i + "_" + name;
                _obj = document.getElementById(__obj);
                if (_obj == null) break;
                _obj.checked = obj.checked;
                i++;
            }
        }

        function CheckAll(obj, name) {
            var input = DianCMS_$(name).getElementsByTagName("input");
            for (var i = 0; i < input.length; i++) {
                if (input[i].type == "checkbox")
                    input[i].checked = obj.checked;
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
            <tr>
                <td>
                    <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                    您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="PowerGroupList.aspx">管理员组列表</a>
                    >> 设置管理员组
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" border="0" align="center" class="tabs">
            <tr>
                <td id="TabTitle0" class="title6" onclick="ShowTabs(0)">基本设置
                </td>
                <td id="TabTitle1" class="title5" onclick="ShowTabs(1)">内容管理
                </td>
                <td id="TabTitle2" class="title5" onclick="ShowTabs(2)">商城管理
                </td>
                <td id="TabTitle3" class="title5" onclick="ShowTabs(3)">考试系统
                </td>
                <td class="titleline">&nbsp;
                </td>
            </tr>
        </table>
        <table class="border" cellspacing="1" cellpadding="0" border="0" align="center">
            <tbody id="Tabs0">
                <tr>
                    <td class="bqleft">管理员组名称：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtGroupName" MaxLength="50" runat="server" CssClass="in1"></asp:TextBox><font
                            color="#ff0066">*</font>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">导航布局方案：
                    </td>
                    <td class="bqright">
                        <asp:DropDownList ID="DropIframe" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">默认导航风格：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radFengGe" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">经典版</asp:ListItem>
                            <asp:ListItem Value="2">风尚版</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">管理员组说明：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtGroupDesc" Columns="50" Rows="4" runat="server" TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">基本权限：
                    </td>
                    <td class="bqright">
                        <input id="Checkbox1" type="checkbox" onclick="check(this, 'DivPowerGroup')" style="margin-left: 3px" /><span
                            id="SapnPowerGroup">选择全部</span><div id="DivPowerGroup">
                                <asp:CheckBoxList ID="PowerGroupStr" runat="server" RepeatDirection="Horizontal"
                                    RepeatColumns="7">
                                    <asp:ListItem Value="SinglePage">单页管理</asp:ListItem>
                                    <asp:ListItem Value="Column">栏目管理</asp:ListItem>
                                    <asp:ListItem Value="Template">模板管理</asp:ListItem>
                                    <asp:ListItem Value="TemplateProgram">模板方案</asp:ListItem>
                                    <asp:ListItem Value="Style">样式管理</asp:ListItem>
                                    <asp:ListItem Value="Label">标签管理</asp:ListItem>
                                    <asp:ListItem Value="Model">模型管理</asp:ListItem>
                                    <asp:ListItem Value="Field">字段管理</asp:ListItem>
                                    <asp:ListItem Value="ModelWeb">模型录入界面</asp:ListItem>
                                    <asp:ListItem Value="Form">表单管理</asp:ListItem>
                                    <asp:ListItem Value="FormWeb">表单录入界面</asp:ListItem>
                                    <asp:ListItem Value="UserModel">用户注册模型</asp:ListItem>
                                    <asp:ListItem Value="UserGroup">用户组管理</asp:ListItem>
                                    <asp:ListItem Value="User">用户管理</asp:ListItem>
                                    <asp:ListItem Value="UserLog">用户日志</asp:ListItem>
                                    <asp:ListItem Value="UserAccount">用户账户记录</asp:ListItem>
                                    <asp:ListItem Value="UserGrade">积分等级</asp:ListItem>
                                    <asp:ListItem Value="UserNotice">用户公告</asp:ListItem>
                                    <asp:ListItem Value="Message">站内短信</asp:ListItem>
                                    <asp:ListItem Value="PowerLog">管理员日志</asp:ListItem>
                                    <asp:ListItem Value="PowerGroup">管理员组</asp:ListItem>
                                    <asp:ListItem Value="Admin">管理员管理</asp:ListItem>
                                    <asp:ListItem Value="Excel">Excel导入</asp:ListItem>
                                    <asp:ListItem Value="Regex">正则表达式</asp:ListItem>
                                    <asp:ListItem Value="Email">邮件发送</asp:ListItem>
                                    <asp:ListItem Value="FilterWord">过滤字符</asp:ListItem>
                                    <asp:ListItem Value="InsideLink">站内链接</asp:ListItem>
                                    <asp:ListItem Value="BackupDatabase">备份数据库</asp:ListItem>
                                    <asp:ListItem Value="CompressDatabase">压缩数据库</asp:ListItem>
                                    <asp:ListItem Value="SiteInfo">全站参数</asp:ListItem>
                                    <asp:ListItem Value="SiteUser">用户参数</asp:ListItem>
                                    <asp:ListItem Value="CreateIndex">生成首页</asp:ListItem>
                                    <asp:ListItem Value="CreateModel">生成模型页</asp:ListItem>
                                    <asp:ListItem Value="CreateColumn">生成栏目页</asp:ListItem>
                                    <asp:ListItem Value="CreateInfo">生成内容页</asp:ListItem>
                                    <asp:ListItem Value="Upload">上传文件管理</asp:ListItem>
                                    <asp:ListItem Value="Comment">评论管理</asp:ListItem>
                                    <asp:ListItem Value="Tag">关键字管理</asp:ListItem>
                                    <asp:ListItem Value="Collection">采集管理</asp:ListItem>
                                    <asp:ListItem Value="VSFree">VS Free</asp:ListItem>
                                    <asp:ListItem Value="URLRewriting">URL重写规则</asp:ListItem>
                                    <asp:ListItem Value="Notice">用户公告</asp:ListItem>
                                    <asp:ListItem Value="Upgrade">在线升级</asp:ListItem>
                                    <asp:ListItem Value="Report">举报错误</asp:ListItem>
                                    <asp:ListItem Value="AdminIpLimit">后台访问</asp:ListItem>
                                    <asp:ListItem Value="Card">充值卡</asp:ListItem>
                                    <asp:ListItem Value="Sitemap">Sitemap</asp:ListItem>
                                    <asp:ListItem Value="VoteLimit">投票方案</asp:ListItem>
                                    <asp:ListItem Value="Link">友情链接</asp:ListItem>
                                    <asp:ListItem Value="BackUpSQLServer">备份数据库</asp:ListItem>
                                    <asp:ListItem Value="RestoreSQLServer">还原数据库</asp:ListItem>
                                    <asp:ListItem Value="ChangeDatabase">更改数据库</asp:ListItem>
                                    <asp:ListItem Value="Iframe">后台导航方案</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                    </td>
                </tr>
            </tbody>
            <tbody style="display: none" id="Tabs1">
                <tr>
                    <td class="bqleft">内容管理：
                    </td>
                    <td class="bqright">
                        <table align="center" cellpadding="0" cellspacing="1" class="border"
                            id="RepInfoList">
                            <asp:Repeater ID="RepInfo" runat="server">
                                <HeaderTemplate>
                                    <tr class="title">
                                        <td class="t1">
                                            <asp:CheckBox ID="CheckAll" runat="server" onclick="CheckAll(this,'RepInfoList')" />选择所有
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox3" runat="server" onclick="seleCol(this,'Show')" />查看
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox4" runat="server" onclick="seleCol(this,'Insert')" />录入
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox5" runat="server" onclick="seleCol(this,'Update')" />编辑
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox6" runat="server" onclick="seleCol(this,'Delete')" />删除
                                        </td>
                                        <td>审核级别
                                        </td>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                                        <td class="t1">
                                            <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectRow(this)" /><asp:TextBox
                                                ID="txtModelId" Style="display: none" runat="server" Text='<%#Eval("ModelId") %>'></asp:TextBox><%#Eval("ModelName") %>
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Show" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Insert" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Update" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Delete" runat="server" />
                                        </td>
                                        <td align="center">
                                            <asp:RadioButtonList ID="RadioAuditing" runat="server" RepeatDirection="Horizontal">
                                                <asp:ListItem Value="0" Selected="True">无</asp:ListItem>
                                                <asp:ListItem Value="1">初审</asp:ListItem>
                                                <asp:ListItem Value="2">二审</asp:ListItem>
                                                <asp:ListItem Value="3">终审</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">表单管理：
                    </td>
                    <td class="bqright">
                        <table align="center" cellpadding="0" cellspacing="1" class="border"
                            id="RepFormList">
                            <asp:Repeater ID="RepForm" runat="server">
                                <HeaderTemplate>
                                    <tr class="title">
                                        <td class="t1">
                                            <asp:CheckBox ID="CheckAll" runat="server" onclick="CheckAll(this,'RepFormList')" />选择所有
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox3" runat="server" onclick="seleCol(this,'Show')" />查看
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox4" runat="server" onclick="seleCol(this,'Insert')" />录入
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox5" runat="server" onclick="seleCol(this,'Update')" />编辑
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="CheckBox6" runat="server" onclick="seleCol(this,'Delete')" />删除
                                        </td>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                                        <td class="t1">
                                            <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectRow(this)" /><asp:TextBox
                                                ID="txtFormId" Style="display: none" runat="server" Text='<%#Eval("FormId") %>'></asp:TextBox><%#Eval("Name") %>
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Show" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Insert" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Update" runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="Delete" runat="server" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
            </tbody>
            <tbody style="display: none" id="Tabs2">
                <tr>
                    <td class="bqleft">商城设置：
                    </td>
                    <td class="bqright">
                        <input id="Checkbox7" type="checkbox" onclick="check(this, 'DivShopPower')" style="margin-left: 3px" /><span
                            id="Span1">选择全部</span><div id="DivShopPower">
                                <asp:CheckBoxList ID="ShopPower" runat="server" RepeatDirection="Horizontal" RepeatColumns="7">
                                    <asp:ListItem Value="SiteShop">商店参数</asp:ListItem>
                                    <asp:ListItem Value="CreateShopCart">生成购物车</asp:ListItem>
                                    <asp:ListItem Value="CreateCheckOut">生成结算页</asp:ListItem>
                                    <asp:ListItem Value="DeliverType">送货方式</asp:ListItem>
                                    <asp:ListItem Value="ShopDistributionAddress">收货地址管理</asp:ListItem>
                                    <asp:ListItem Value="PayPlatform">在线支付</asp:ListItem>
                                    <asp:ListItem Value="PaymentType">付款方式</asp:ListItem>
                                    <asp:ListItem Value="PayPlatform">在线支付</asp:ListItem>
                                    <asp:ListItem Value="Bank">银行账户</asp:ListItem>
                                    <asp:ListItem Value="Orders">订单管理</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                    </td>
                </tr>
            </tbody>
            <tbody style="display: none" id="Tabs3">
                <tr>
                    <td class="bqleft">考试系统：
                    </td>
                    <td class="bqright">
                        <input id="Checkbox8" type="checkbox" onclick="check(this, 'DivExamPower')" style="margin-left: 3px" /><span
                            id="Span2">选择全部</span><div id="DivExamPower">
                                <asp:CheckBoxList ID="ExamPower" runat="server" RepeatDirection="Horizontal" RepeatColumns="7">
                                    <asp:ListItem Value="ExamSite">参数设置</asp:ListItem>
                                    <asp:ListItem Value="ExamAddTheme">添加试题</asp:ListItem>
                                    <asp:ListItem Value="ExamEditTheme">编辑试题</asp:ListItem>
                                    <asp:ListItem Value="ExamDeleteTheme">删除试题</asp:ListItem>
                                    <asp:ListItem Value="ExamThemeClass">试题分类</asp:ListItem>
                                    <asp:ListItem Value="ExamAddPaper">添加试卷</asp:ListItem>
                                    <asp:ListItem Value="ExamEditPaper">编辑试卷</asp:ListItem>
                                    <asp:ListItem Value="ExamDeletePaper">删除试卷</asp:ListItem>
                                    <asp:ListItem Value="ExamZuJuan">试题组卷</asp:ListItem>
                                    <asp:ListItem Value="ExamCreate">生成试卷</asp:ListItem>
                                    <asp:ListItem Value="ExamPaperClass">试卷分类</asp:ListItem>
                                    <asp:ListItem Value="ExamPingFen">试卷评分</asp:ListItem>
                                    <asp:ListItem Value="ExamUser">用户管理</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                    </td>
                </tr>
            </tbody>
                <tr>
                    <td class="bqleft">
                    </td>
                    <td class="bqright" height="50">
                        <asp:Button ID="Button1" runat="server" Text=" 确认,保存 " OnClick="Button1_Click" CssClass="btn radius30 pad_0_30" />
                    </td>
                </tr>
        </table>
    </form>
</body>
</html>
