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

<%@ Import Namespace="D.Common" %>
<!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 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="UserGroupList.aspx">管理用户组</a>
                >> 设置用户组
            </td>
        </tr>
    </table>
    <table class="tabs" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td id="TabTitle0" class="title6" onclick="ShowTabs(0)">
                基本权限
            </td>
            <td id="TabTitle4" class="title5" onclick="ShowTabs(4)">
                功能权限
            </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:TextBox ID="txtGroupDesc" Columns="50" Rows="4" runat="server" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    该组用户成功注册：
                </td>
                <td class="bqright">
                    赠送<asp:TextBox ID="txtRegIntegral" runat="server" Columns="5" Text="5" CssClass="in1"></asp:TextBox>分积分
                    <asp:TextBox ID="txtRegPoint" runat="server" Columns="5" Text="0" CssClass="in1"></asp:TextBox><asp:Literal
                        ID="LitPoint" runat="server"></asp:Literal>
                    <asp:TextBox ID="txtRegExpire" runat="server" Columns="5" Text="0" CssClass="in1"></asp:TextBox>天有效期
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    投稿权限：
                </td>
                <td class="bqright">
                    投稿时获取积分为模型设置的
                    <asp:TextBox ID="txtContribute" MaxLength="10" runat="server" Text="1" Columns="5"
                        onkeyup="value=value.replace(/[^\d]/g,'')" CssClass="in1"></asp:TextBox>倍
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    注册认证：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="Status" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="1">开放</asp:ListItem>
                        <asp:ListItem Value="0">认证</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    上传头像：
                </td>
                <td class="bqright">
                    <asp:CheckBox ID="IsUserFace" runat="server" Text="允许该组会员上传自定义头像" />
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    收藏夹权限：
                </td>
                <td class="bqright">
                    用户最多可收藏<asp:TextBox ID="Collection" runat="server" Columns="4" MaxLength="4" onkeyup="value=value.replace(/[^\d-]/g,'')"
                        CssClass="in1">0</asp:TextBox>条信息（如果为0，则不限制，-1为没有收藏权限）
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    商店权限：
                </td>
                <td class="bqright">
                    购物时可以享受的折扣率：<asp:TextBox ID="txtRebate" runat="server" Columns="5" CssClass="in1"
                        Text="100"></asp:TextBox>%<br />
                    允许透支的最大额度：<asp:TextBox ID="txtOverdraft" runat="server" Columns="5" CssClass="in1"
                        Text="0"></asp:TextBox>元人民币
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    有效邀请：
                </td>
                <td class="bqright">
                    启用邀请机制后，一个有效邀请获取<asp:TextBox ID="Invite" runat="server" Columns="4" MaxLength="4"
                        onkeyup="value=value.replace(/[^\d]/g,'')" CssClass="in1">5</asp:TextBox>个积分
                    <asp:TextBox ID="Point" runat="server" Columns="4" MaxLength="4" onkeyup="value=value.replace(/[^\d]/g,'')"
                        CssClass="in1">5</asp:TextBox><asp:Literal ID="LitPoint1" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    该组默认积分等级：
                </td>
                <td class="bqright">
                    <asp:DropDownList ID="DropUserGrade" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    默认用户后台方案：
                </td>
                <td class="bqright">
                    <asp:DropDownList ID="DropUserIframe" runat="server">
                        <asp:ListItem Value="0">系统默认</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </tbody>
        <tbody style="display: none" id="Tabs1">
            <tr>
                <td class="bqleft">
                    模型录入权限：
                </td>
                <td class="bqright">
                    <table align="center" cellpadding="0" cellspacing="1" width="99%" class="border"
                        id="RepInfoList">
                        <asp:Repeater ID="RepInsertList" runat="server">
                            <HeaderTemplate>
                                <tr class="title">
                                    <td width="15" class="t1">
                                        <asp:CheckBox ID="CheckAll" runat="server" onclick="CheckAll(this,'RepInfoList')" />
                                    </td>
                                    <td>
                                        录入界面名称
                                    </td>
                                    <td>
                                        录入界面描述
                                    </td>
                                    <td>
                                        所属模型
                                    </td>
                                    <td>
                                        <span style="padding-left: 10px;">
                                            <asp:CheckBox ID="CheckBox3" runat="server" onclick="seleCol(this,'Show')" /></span>查看
                                    </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 style="display: none">
                                        <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="CheckBox5" runat="server" onclick="selectRow(this)" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtId" Style="display: none" runat="server" Text='<%#Eval("Id") %>'></asp:TextBox><asp:TextBox
                                            ID="txtTableName" Style="display: none" runat="server" Text='<%#Eval("TableName") %>'></asp:TextBox>
                                        <%#Eval("Name") %>
                                    </td>
                                    <td>
                                        <%#Eval("Alias") %>
                                    </td>
                                    <td>
                                        <%#Eval("ModelName") %>
                                    </td>
                                    <td align="center">
                                        <asp:CheckBox ID="Show" runat="server" />
                                        <td align="center">
                                            <asp:CheckBox ID="Insert" runat="server" />
                                        </td>
                                        <td align="center">
                                            <asp:CheckBox ID="Update" runat="server" />
                                        </td>
                                        <td align="center" style="display: none">
                                            <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>
        </tbody>
        <tbody style="display: none" id="Tabs2">
            <tr>
                <td class="bqleft">
                    阅读内容收费方式：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="RadChargeType" runat="server">
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    有效期内：
                </td>
                <td class="bqright">
                    总共可以看<asp:TextBox ID="txtExpireReadInfoNum" runat="server" Columns="5" CssClass="in1"></asp:TextBox>条收费信息（如果为-1，则不限制）<br />
                    每天最多可以看<asp:TextBox ID="txtExpireDayReadNumInfo" runat="server" Columns="5" CssClass="in1"></asp:TextBox>条收费信息（如果为-1，则不限制）<br />
                    <font color="red">注：此处设置只针对阅读内容收费方式中的 ② ④ ⑤有效，并优先于② ④ ⑤</font>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    下载文件收费方式：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="RadFileChargeType" runat="server">
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    有效期内：
                </td>
                <td class="bqright">
                    总共可以下载<asp:TextBox ID="txtFileExpireReadInfoNum" runat="server" Columns="5" CssClass="in1"></asp:TextBox>个收费软件（如果为-1，则不限制）<br />
                    每天最多可以下载<asp:TextBox ID="txtFileExpireDayReadNumInfo" runat="server" Columns="5"
                        CssClass="in1"></asp:TextBox>个收费软件（如果为-1，则不限制）<br />
                    <font color="red">注：此处设置只针对下载文件收费方式中的 ② ④ ⑤有效，并优先于② ④ ⑤</font>
                </td>
            </tr>
        </tbody>
        <tbody id="Tabs3" style="display: none">
            <tr>
                <td class="bqleft">
                    注册开启空间：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="RadRegSpace" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1">开启</asp:ListItem>
                        <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    默认模板：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtSpaceTemplate" runat="server" CssClass="in1" Text="1"></asp:TextBox>
                    填写空间模板ID，如：1
                </td>
            </tr>
        </tbody>
        <tbody id="Tabs4" style="display: none">
            <tr>
                <td class="bqleft">
                    功能权限：
                </td>
                <td class="bqright">
                    <asp:CheckBoxList ID="BasicPower" runat="server" RepeatDirection="Horizontal"
                        RepeatColumns="7">
                        <asp:ListItem Value="Message">站内短信</asp:ListItem>
                    </asp:CheckBoxList>
                </td>
            </tr>
        </tbody>
        <tr>
            <td class="bqleft">
            </td>
            <td height="40" class="bqright">
                <asp:Button ID="btnSubmit" runat="server" Text=" 确定 " CssClass="btn radius30 pad_0_30" OnClick="btnSubmit_Click" /><input
                    id="btnNo" type="button" value=" 取消 " onclick="location.href='UserGroupList.aspx'"
                    class="btn radius30 pad_0_30" style="margin-left: 20px;" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
