<%@ Page Language="c#" Inherits="Web.Wpdcc.manageSiteBasicProperty" CodeBehind="manageSiteBasicProperty.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>网站基本属性设置</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/adminCss.htm"-->

    <script language="javascript" type="text/javascript">
    $(document).ready(function(){
    
        //检查是否允许子站投稿的设置（代替 原<body onload="javascript:checkContribute();"> ）
        checkContribute();
        
        //编辑导航页（改为fancybox形式）
        $("#btnNavpage").click( function(){
            var filename = $("#navPage").val().trim();           
            if (filename == "" || !(checkfileExt(filename))){
                alert('请输入扩展名为htm或者html的文件名');
                $.fancybox.cancle();
                return false;
            }
                var src = "creatNavpage.aspx?name=" + filename ;
                $(this).removeAttr('href').attr('href',src);
            
            }).fancybox({
                'width'		: 790,
				'height'	: 630,
				'type'		: 'iframe',
				'padding':'0'
        }); 
        
       
            //子站投编辑
            $("#btnSelect").click(function() {
                    return true; 
                }).fancybox({
                'width'		: 520,
				'height'	: 470,
				'hideOnOverlayClick': false,
				'type'		: 'iframe',
				'padding':'0',
				'href'      : 'selectItem.aspx?mode=6'
            });
            
        //保存前验证（改用统一验证js）
        $("#editSystem").click(function() {
            return checkAllValidate();
        });
        
        //验证文件扩展名
        function checkfileExt(filename){  
            var point = filename.lastIndexOf(".");            
            var type = filename.substr(point).toLowerCase() ;   
            if(type==".htm"||type==".html"){   
                return true;    
            } 
        }
    
    });

        function returnNavigation(name) {
            document.all.navPage.value = "name";
        }

        function openwindow(pkId, name) {
            window.open("accredit.aspx?pkId=" + pkId + "&name=" + name + "", "权限管理", "center:yes,width=400,height=450,status=1,resizable=yes,scrollbars=yes");
        }

        function foreColor2() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.pageBgColor.value = arr;
                Table2.bgColor = arr;
            }

        }
        function tableColor2() {
            Table2.bgColor = document.system.PageBgColor.value;
        }
        function foreColor4() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.upBgColor.value = arr;
                Table4.bgColor = arr;
            }

        }
        function tableColor4() {
            Table4.bgColor = document.system.upBgColor.value;
        }
        function foreColor6() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.upFontColor.value = arr;
                Table6.bgColor = arr;
            }

        }
        function tableColor6() {
            Table6.bgColor = document.system.upFontColor.value;
        }
        function foreColor8() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.downBgColor.value = arr;
                Table8.bgColor = arr;
            }

        }
        function tableColor8() {
            Table8.bgColor = document.system.downBgColor.value;
        }
        function foreColor10() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.downFontColor.value = arr;
                Table10.bgColor = arr;
            }

        }
        function tableColor10() {
            Table10.bgColor = document.system.downFontColor.value;
        }
        function foreColor12() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.leftTableColor.value = arr;
                Table12.bgColor = arr;
            }

        }
        function tableColor12() {
            Table12.bgColor = document.system.leftTableColor.value;
        }
        function foreColor14() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.middleTableColor.value = arr;
                Table14.bgColor = arr;
            }

        }
        function tableColor14() {
            Table14.bgColor = document.system.middleTableColor.value;
        }
        function foreColor16() {

            var arr = showModalDialog("selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
            if (arr != null) {
                document.system.rightTableColor.value = arr;
                Table16.bgColor = arr;
            }

        }
        function tableColor16() {
            Table16.bgColor = document.system.rightTableColor.value;
        }
        function openwin(name) {
            var arr = showModalDialog("./editor/Dialog/imgFile.htm?directory=system&name=" + name + "&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
            if (arr != null) {
                var module = eval("document.system." + name);
                module.value = arr;
            }
        }
        function swf(name) {
            var arr = showModalDialog("./editor/Dialog/flashFile.htm?directory=system&name=" + name + "&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
            if (arr != null) {
                var module = eval("document.system." + name);
                module.value = arr;
            }
        }
   
   

        //
        //选择子站投稿对应的具体栏目　李聪杰 20070711
        //
//        function selectContributeItem() {

//            var arr = showModalDialog("selectSiteContributeItem.htm", window, "dialogWidth:500px;dialogHeight:430px;help:no;scroll:no;status:no");
//            if (arr != null)
//                location.href = "managesitebasicproperty.aspx";

//        }

        function checkContribute() {
            var a = document.getElementById("rdoIsContribute");
            if (!a) return;

            
            var btnSelect = document.getElementById("btnSelect");
            var v;
            for (var i = 0; i <= 1; i++) {
                var ss = "rdoIsContribute_" + i;
                var aa = document.getElementById(ss).value;
                if (document.getElementById(ss).checked) {
                    v = aa;
                    break;
                }

            }

            if (v == 1) {
                btnSelect.style.display = "";
            }
            else {
                btnSelect.style.display = "none";
            }
        }

    </script>

</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
             您的位置：系统选项 &gt; 网站基本属性设置</div>
        <form id="system" method="post" runat="server">
        <div class="bd">
            <table class="edit-table">
                <tr>
                    <th width="25%">
                        使用分级浏览机制：
                    </th>
                    <td width="75%">
                        <asp:DropDownList ID="grade" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        文章默认状态：
                    </th>
                    <td>
                        <asp:DropDownList ID="defaultPassed" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">未审核</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">已审核</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        是否开启评论功能：
                    </th>
                    <td>
                        <asp:DropDownList ID="review" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                            <asp:ListItem Value="2">只允许会员发言</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        是否显示评论者IP地址：
                    </th>
                    <td>
                        <asp:DropDownList ID="showIp" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        评论默认状态：
                    </th>
                    <td>
                        <asp:DropDownList ID="reviewCheck" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">未审核</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">已审核</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        主题讨论栏目评论过滤词：
                    </th>
                    <td>
                        <asp:TextBox ID="reviewFiltrate" class="input-txt" runat="server"></asp:TextBox>
                        <span class="tip">(用|分格多个过滤词)<%--[仅用于主题讨论栏目]--%></span>
                    </td>
                </tr>
                <tr>
                    <th>
                        评论显示分页条数：
                    </th>
                    <td>
                        <asp:TextBox ID="reviewPage" runat="server" CssClass="input-txt" notNull="true" dataType="integer"
                            minvalue="0" maxvalue="9999" MaxLength="4" msgname="评论显示分页条数"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        评论发表时间间隔：
                    </th>
                    <td>
                        <asp:TextBox ID="reviewAlternation" class="input-txt" runat="server" notNull="true"
                            dataType="integer" minvalue="0" maxvalue="9999" MaxLength="4" msgname="评论发表时间间隔"></asp:TextBox>
                        <span class="tip">(秒)[参数为0则无限制]</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        网站全局分页数量：
                    </th>
                    <td>
                        <asp:TextBox ID="PageSize" class="input-txt" runat="server" notNull="true" dataType="integer"
                            minvalue="1" maxvalue="50" MaxLength="2" msgname="翻页数量"></asp:TextBox>
                        <asp:DropDownList ID="showClick" runat="server" Visible="False" CssClass="drop-txt">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        导航页文件名：
                    </th>
                    <td>
                        <asp:TextBox ID="navPage" class="input-txt" runat="server"></asp:TextBox>&nbsp;
                        <input id="btnNavpage" type="button" value="编辑导航页" class="btn1 btn" />
                    </td>
                </tr>
                <tr>
                    <th>
                        导航页浏览权限设置：
                    </th>
                    <td>
                        <asp:DropDownList ID="navGate" runat="server" class="drop-txt">
                            <asp:ListItem Value="0">无限制</asp:ListItem>
                            <asp:ListItem Value="1">仅内网可见</asp:ListItem>
                            <asp:ListItem Value="2">仅登录可见</asp:ListItem>
                            <asp:ListItem Value="3">内网或登录可见</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="display: none;">
                    <th>
                        主管单位网址：
                    </th>
                    <td>
                        <asp:TextBox ID="shareNewsUrl" class="input-txt w3" runat="server"></asp:TextBox>(为获取共享新闻)(未启用)
                    </td>
                </tr>
                <tr>
                    <th>
                        主管单位共享新闻模板：
                    </th>
                    <td>
                        <asp:DropDownList ID="shareNewsLayoutTemplateID" runat="server"  CssClass="drop-txt" DataValueField="pkId" 
                            DataTextField="name">
                        </asp:DropDownList>
                      <%--  (仅在使用主管单位信息共享栏目时为新闻指定新闻页模板用)--%>
                    </td>
                </tr>
                <tr>
                    <th>
                        网站页面缓存时间：
                    </th>
                    <td>
                        <asp:TextBox ID="outputCacheTime" class="input-txt" runat="server" notNull="true"
                            dataType="integer" minvalue="0" maxvalue="1000" MaxLength="4" msgname="网站页面缓存时间">6</asp:TextBox>
                        <span class="tip">(秒)</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        新闻打开方式：
                    </th>
                    <td>
                        <asp:RadioButtonList ID="NewsOpenModeRButton" runat="server" RepeatDirection="Horizontal"
                            RepeatLayout="Flow">
                            <asp:ListItem Value="1" Selected="True">新窗口打开&emsp;</asp:ListItem>
                            <asp:ListItem Value="0">原窗口打开</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <th>
                        是否使用右键功能：
                    </th>
                    <td>
                        <asp:RadioButtonList ID="rdoIsAllowCopy" runat="server" RepeatDirection="Horizontal"
                            RepeatLayout="Flow">
                            <asp:ListItem Value="1" Selected="True">是&emsp;</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                        &nbsp;&nbsp;&nbsp;<span class="tip">(如设置为否，则网站所有前台页面将屏蔽右键功能)</span>
                    </td>
                </tr>
                <tr id="trContribute" runat="server">
                    <th>
                        是否允许子站投稿：
                    </th>
                    <td>
                        <asp:RadioButtonList ID="rdoIsContribute" runat="server" RepeatDirection="Horizontal"
                            RepeatLayout="Flow" >
                            <asp:ListItem Value="1">是&emsp;</asp:ListItem>
                            <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                        </asp:RadioButtonList>
                        &nbsp;&nbsp;&nbsp;<input id="btnSelect" type="button" value="子站投稿栏目选择" class="btn" style="width:130px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        是否允许敏感词过滤：
                    </th>
                    <td>
                        <asp:DropDownList ID="SensitiveWordMonitorEnable" runat="server" class="drop-txt">
                            <asp:ListItem Text="不允许" Value="False"></asp:ListItem>
                            <asp:ListItem Text="允许" Value="True"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="display: none;">
                    <th>
                        是否允许敏感词监控发送至运营平台：
                    </th>
                    <td>
                        <asp:DropDownList ID="SensitiveWordMonitorPostPlatform" runat="server" class="drop-txt">
                            <asp:ListItem Text="不允许" Value="False"></asp:ListItem>
                            <asp:ListItem Text="允许" Value="True"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="display: none;">
                    <th>
                        敏感词监控运营平台服务地址：
                    </th>
                    <td>
                        <asp:TextBox ID="SensitiveWordMonitorPostPlatformServiceUrl" runat="server" class="input-txt w3"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
        <div class="ft">
            <div class="action-field btn-pl">
                <asp:Button ID="editSystem" class="btn" runat="server" Text="保 存" OnClick="editSystem_Click">
                </asp:Button>
                &emsp;<asp:Button ID="Button1" class="btn" runat="server" Text="重 载" OnClick="reset_Click">
                </asp:Button>
            </div>
            <!--/action-field-->
        </div>
        </form>
    </div>
</body>
</html>
