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

<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">
                    <h1 style="float: left">
                        <asp:Literal ID="ltEdit" runat="server" Text="编辑" Visible="false"></asp:Literal><asp:Literal
                            ID="ltAdd" runat="server" Text="添加"></asp:Literal>站点设置</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <asp:HiddenField ID="hfSettingId" runat="server" />
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr>
                            <td>
                                <div align="right">
                                    站点设置名称<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbName" runat="server" Wrap="False" />
                                 <validation targetid="<%=tbName.ClientID%>" targetname="站点名称" type="text" />
                            </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>
                            &nbsp;站点只能有一个启用的设置，如果设置一个站点状态为启用，那么其他设置将变成未启用状态</td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    Head区域新增字符串：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbHeadCode" runat="server" CausesValidation="True" EnableViewState="False"
                                    TextMode="MultiLine" Width="100%" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    Body区域新增字符串：</div>
                            </td>
                            <td>
                                <asp:TextBox ID="tbBodyCode" runat="server" TextMode="MultiLine" Width="100%" Wrap="False" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    自动更新静态时间<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbCacheTime" runat="server" Width="50px" Wrap="False" >3600</asp:TextBox>
                                秒
                                <validation targetid="<%=tbCacheTime.ClientID%>" targetname="缓存时间" type="number" />
                                ，0代表不清除缓存，仅授权版可以修改。<span class="red">如希望有的页面不自动更新，请点击【<a href="NotUpdatePage.aspx">这里</a>】设置固定页面。</span></td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    网站编码<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbCharset" runat="server" Wrap="False" Text="UTF-8" />
                                 <validation targetid="<%=tbCharset.ClientID%>" targetname="网站编码" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    禁止下载的文件类型<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbForbiddenFileType" runat="server" Wrap="False" Text="rar|zip|mp3|rm" />
                                <validation targetid="<%=tbForbiddenFileType.ClientID%>" targetname="禁止下载的文件类型" type="text" />
                            &nbsp;请输入扩展名，用“|”分割，如 zip|mp3|rm，扩展名请不要输入点号“.”， 如 .zip|.mp3|.rm是不正确的</td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    是否下载图片<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:CheckBox ID="cbIsCollectImage" CssClass="checkbox" runat="server" Checked="true"
                                    Text="选中代表下载图片到本站服务器" />
                            </td>
                        </tr>
                        <tr style="display:none">
                            <td>
                                <div align="right">
                                    伪原创设置：</div>
                            </td>
                            <td align="left">
                                <asp:CheckBox ID="cbFakeOriginalContent" CssClass="checkbox" runat="server" Text="内容伪原创" />
                                <asp:CheckBox ID="cbFakeOriginalTitle" CssClass="checkbox" runat="server" Text="标题伪原创" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    静态扩展名<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbStaticExtension" runat="server" Wrap="False" Width="50px">htm</asp:TextBox>
                                 <validation targetid="<%=tbStaticExtension.ClientID%>" targetname="静态扩展名" type="text" />
                                扩展名请不要输入点号“.”</td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div align="right">
                                    开启风云榜：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="EnableBillboard" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                                    <asp:ListItem Value="1">启用</asp:ListItem>
                                </asp:RadioButtonList>
                                将[*Billboard*]作为替换符放置在您想放置的网页位置，就可以自动调用风云榜数据，此功能需购买授权。点击<a href="Billboard.aspx">此处</a>进行详细配置</td>
                        </tr>
                        <tr style="display:none">
                            <td>
                                <div align="right">
                                    内链热门关键词：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbCustomInternalLinkKeyword" runat="server" Wrap="False" Width="100%" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    站内搜索模板<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                /Management/theme/
                                <asp:TextBox ID="tbInternalSearchTemplate" runat="server" Wrap="False">default/search.html</asp:TextBox>
                                 <validation targetid="<%=tbInternalSearchTemplate.ClientID%>" targetname="站内搜索模板" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div align="right">
                                    多域名采集设置：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="SupportPandomain" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                                    <asp:ListItem Value="1">启用</asp:ListItem>
                                </asp:RadioButtonList>
                                指同一个主域名下有多个二级域名，如www.baidu.com和zhidao.baidu.com
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    开启日志：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="EnableErrorLog" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <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="convertToRecirectLink" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <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="UseProxy" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                                    <asp:ListItem Value="1">开启</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div align="right">
                                    开启自定义Cookie：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="SycIECookie" runat="server" RepeatDirection="Horizontal"
                                    CssClass="checkbox">
                                    <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                                    <asp:ListItem Value="1">开启</asp:ListItem>
                                </asp:RadioButtonList>
                                用户将http头中的cookie抓获下来，并且填写到下面的Cookie字符串里，即可抓获登陆后所能看到的页面
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div align="right">
                                    Cookie字符串：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbCookieString" runat="server" Wrap="False" Width="100%" 
                                    TextMode="MultiLine" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div align="right">
                                    开启官方统计：</div>
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="enableStatisticalCode" 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 valign="top">
                                <div align="right">
                                    工作模式：</div>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="workMode" runat="server">
                                    <asp:ListItem>集成模式</asp:ListItem>
                                    <asp:ListItem>镜像模式</asp:ListItem>
                                    <asp:ListItem>智能模式</asp:ListItem>
                                </asp:DropDownList>
                                <br />
                                集成模式会将所有的子域名和缓存服务器内容采集到一起，但是会对网址进行编码<br />
                                镜像模式完全复制目标站点的目录结构和文件名，需要对站点进行多种配置，才能正常运行<br />
                                智能模式跟目标站点的目录名和文件名都保持一致，但是会自己进行集成，能将多域名，多站点的内容集合于一个站点<br />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="errorInfo" runat="server" Text="Label"></asp:Label>
                                <asp:LinkButton ID="lbSubmit" runat="server" Text="【提交】" OnClick="lbSubmit_Click"
                                    OnClientClick="return validateForm()" />&nbsp; &nbsp;<asp:LinkButton ID="lbCancel"
                                        runat="server" Text="【取消】" OnClick="lbCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        站点设置列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <asp:GridView ID="gvSiteSettings" runat="server" GridLines="None" CssClass="table_list"
                        Width="100%" EnableModelValidation="True" AutoGenerateColumns="False">
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" Text="【编辑】" CommandArgument='<%# Bind("SettingId") %>'
                                        OnClick="lbEdit_Click"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandArgument='<%# Bind("SettingId") %>'
                                        Text="【删除】" OnClick="lbDelete_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="SettingId" HeaderText="设置编号" SortExpression="SettingId" />
                            <asp:BoundField DataField="SiteId" HeaderText="站点编号" SortExpression="SiteId" />
                            <asp:BoundField DataField="Name" HeaderText="规则名称" SortExpression="Name" />
                            <asp:CheckBoxField DataField="IsActive" HeaderText="是否激活" SortExpression="IsActive" />
                            <asp:TemplateField HeaderText="Head区域新增代码" SortExpression="HeadCode">
                                <ItemTemplate>
                                    <asp:TextBox ID="headCode" runat="server" Text='<%# Bind("HeadCode") %>' ReadOnly="true"
                                        TextMode="MultiLine" Width="100%" Wrap="False"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Body区域新增代码" SortExpression="BodyCode">
                                <ItemTemplate>
                                    <asp:TextBox ID="bodyCode" runat="server" Text='<%# Bind("BodyCode") %>' ReadOnly="true"
                                        TextMode="MultiLine" Width="100%" Wrap="False"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CacheExpireTime" HeaderText="缓存时间" SortExpression="CacheExpireTime">
                            </asp:BoundField>
                            <asp:BoundField DataField="Charset" HeaderText="网页编码" SortExpression="Charset" />
                            <asp:BoundField DataField="StaticExtension" HeaderText="静态文件扩展名" SortExpression="StaticExtension" />
                            <asp:CheckBoxField DataField="CollectImage" HeaderText="是否缓存图片" SortExpression="CollectImage" />
                            <asp:CheckBoxField DataField="EnableBillboard" HeaderText="开启首页显示百度风云榜" SortExpression="EnableBillboard" />
                            <asp:CheckBoxField DataField="SupportPandomain" HeaderText="多个子域名支持" SortExpression="SupportPandomain" />
                            <asp:CheckBoxField DataField="EnableErrorLog" HeaderText="开启日志" SortExpression="EnableErrorLog" />
                        </Columns>
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <div class="clear" style="margin-top: 10px;">
        </div>
    </div>
</asp:Content>
