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

<%@ Import Namespace="D.BLL" %>
<!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" src="../../js/<%=B_Lang.getLang() %>/Copy.js"></script>

    <script type="text/javascript" src="../../js/<%=B_Lang.getLang() %>/Collection.js"></script>

    <script type="text/javascript">
        var api = frameElement.api, W = api.opener;
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="99%" cellpadding="0" cellspacing="0" border="0" align="center" class="tabs">
            <tr>
                <td>
                    <span style="float: left; margin-top: 2px; height: 22px">采集项目：<asp:Literal ID="LitItemName" runat="server"></asp:Literal></span>
                    <span style="margin-left: 10px; float: left; height: 22px">字段名称：
                                    <asp:Literal ID="LitFieldName" runat="server"></asp:Literal></span>
                </td>
                <td id="TabTitle0" class="title6" onclick="ShowTabs(0)">字段设置
                </td>
                <td id="TabTitle1" class="title5" onclick="ShowTabs(1)">分页设置
                </td>
                <td width="140" class="titleline"></td>
            </tr>
        </table>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center">
                    <tr>
                        <td width="60%" class="bqright">
                            <span style="float: left">随机内容页代码：↓</span><span style="margin-left: 10px;"><asp:Literal
                                ID="Literal1" runat="server"></asp:Literal>：↓</span><span style="margin-left: 10px;"><asp:HyperLink
                                    ID="HyperLink1" runat="server">访问该内容页</asp:HyperLink>：→</span><br />
                            <asp:TextBox ID="txtHtml" runat="server" TextMode="MultiLine" Style="width: 100%; height: 350px; word-break: break-all; word-wrap: break-word;"></asp:TextBox><br />
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td bgcolor="#e0dfe3" align="right">
                                        <a href="javascript:" onclick="runEx('txtHtml')">
                                            <img src="../images/PreView.gif" border="0" title="预览源代码" /></a> <a href="javascript:"
                                                onclick="copyToClipboard(document.form1.txtHtml.value)">
                                                <img src="../images/copy.gif" border="0" title="复制源代码" style="margin-left: 20px" /></a>
                                        <a href="javascript:" onclick="SizePlus('txtHtml')" title="增加编辑高度">
                                            <img src="../images/sizeplus.gif" border="0" style="margin-left: 20px;" /></a>
                                        <a href="javascript:" onclick="SizeMinus('txtHtml')">
                                            <img src="../images/sizeminus.gif" border="0" title="减少编辑高度" style="margin-left: 20px; margin-right: 20px" /></a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td valign="top" class="bqright">
                            <table cellspacing="1" cellpadding="0" width="99%">
                                <tbody id="Tabs0" runat="server">
                                    <tr>
                                        <td class="bqright">
                                            <font color="red">*</font>字段内容开始代码：
                                        <asp:TextBox ID="txtFieldBeginCode" runat="server" TextMode="MultiLine" Style="width: 98%; height: 60px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="bqright">
                                            <font color="red">*</font>字段内容结束代码：
                                        <asp:TextBox ID="txtFieldEndCode" runat="server" TextMode="MultiLine" Style="width: 98%; height: 60px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="bqright">
                                            <table cellpadding="4" cellspacing="0" border="0" width="100%">
                                                <tr>
                                                    <td width="50%">公用过滤项目：<br />
                                                        <asp:ListBox ID="ListFilter" runat="server" SelectionMode="Multiple" Height="182px"
                                                            Width="134px"></asp:ListBox>
                                                    </td>
                                                    <td>私有过滤项目：<br />
                                                        <asp:ListBox ID="ListCommon" runat="server" SelectionMode="Multiple" Height="182px"
                                                            Width="134px">
                                                            <asp:ListItem Value="Iframe">过滤内联页</asp:ListItem>
                                                            <asp:ListItem Value="Object">过滤Falsh</asp:ListItem>
                                                            <asp:ListItem Value="Script">过滤脚本</asp:ListItem>
                                                            <asp:ListItem Value="Style">过滤样式</asp:ListItem>
                                                            <asp:ListItem Value="Div">过滤Div容器</asp:ListItem>
                                                            <asp:ListItem Value="Span">过滤Span容器</asp:ListItem>
                                                            <asp:ListItem Value="Table">过滤表格</asp:ListItem>
                                                            <asp:ListItem Value="Img">过滤图片</asp:ListItem>
                                                            <asp:ListItem Value="Font">过滤字体</asp:ListItem>
                                                            <asp:ListItem Value="A">过滤链接</asp:ListItem>
                                                            <asp:ListItem Value="Html">过滤html元素</asp:ListItem>
                                                        </asp:ListBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="bqright" height="30">
                                            <asp:Button ID="Button1" runat="server" Text=" 测试字段内容 " Style="float: right" CssClass="btn"
                                                OnClick="Button1_Click" />
                                        </td>
                                    </tr>
                                </tbody>
                                <tbody id="Tabs1" style="display: none" runat="server">
                                    <tr>
                                        <td class="bqright" colspan="2">选择分页类型：
                                        <asp:RadioButtonList ID="RadioPageType" runat="server" onclick="PageType()">
                                            <asp:ListItem Value="0" Selected="True">不分页</asp:ListItem>
                                            <asp:ListItem Value="1">从源代码中获取下一页的URL</asp:ListItem>
                                            <asp:ListItem Value="4">从源代码中获取分页URL</asp:ListItem>
                                        </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr id="PageType2_1" runat="server" style="display: none">
                                        <td class="bqright">
                                            <font color="red">*</font>“下一页”URL开始代码：
                                        <asp:TextBox ID="txtPageCodeUrlBegin" runat="server" TextMode="MultiLine" Style="width: 98%; height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr id="PageType2_2" runat="server" style="display: none">
                                        <td class="bqright">
                                            <font color="red">*</font>“下一页”URL结束代码：
                                        <asp:TextBox ID="txtPageCodeUrlEnd" runat="server" TextMode="MultiLine" Style="width: 98%; height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr id="PageType2_3" runat="server" style="display: none">
                                        <td class="bqright" height="50">
                                            <asp:Button ID="Button5" runat="server" Text=" 测试下一页 " CssClass="btn"
                                                Style="float: right" OnClick="Button5_Click" />
                                        </td>
                                    </tr>
                                    <tr id="PageType3_1" runat="server" style="display: none">
                                        <td class="bqleft">
                                            <font color="red">*</font>URL地址：
                                        </td>
                                        <td class="bqright">
                                            <asp:TextBox ID="txtDesignatedUrl" runat="server" Style="width: 98%; word-break: break-all; word-wrap: break-word;"></asp:TextBox><br />
                                            例：http://www.DianCMS.com/down/index_{$ID}.html<br />
                                            {$ID}代表分页数
                                        </td>
                                    </tr>
                                    <tr id="PageType3_2" runat="server" style="display: none">
                                        <td class="bqleft">
                                            <font color="red">*</font>ID范围：
                                        </td>
                                        <td class="bqright">
                                            <asp:TextBox ID="txtScopeBegin" runat="server" CssClass="in1" Columns="3" Text="1"></asp:TextBox>
                                            ~
                                        <asp:TextBox ID="txtScopeEnd" runat="server" CssClass="in1" Columns="3" Text="9"></asp:TextBox><br />
                                            例： 1 ~ 9 或 9 ~ 1 升序或倒序采集
                                        </td>
                                    </tr>
                                    <tr id="PageType4_1" runat="server" style="display: none">
                                        <td class="bqleft">
                                            <font color="red">*</font>URL列表：
                                        </td>
                                        <td class="bqright">
                                            <asp:TextBox ID="txtUrlList" runat="server" TextMode="MultiLine" Rows="6" Style="width: 98%; height: 200px; word-break: break-all; word-wrap: break-word;"></asp:TextBox><br />
                                            注：一行一个网页地址
                                        </td>
                                    </tr>
                                    <tr id="PageType5_1" runat="server" style="display: none">
                                        <td class="bqright">分页代码开始：
                                        <br />
                                            <font color="red">注：第一页为当前内容页，请从第二个分页开始设置</font>
                                            <asp:TextBox ID="txtPaingBegin" runat="server" TextMode="MultiLine" Style="width: 98%; word-break: break-all; word-wrap: break-word; height: 65px;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr id="PageType5_2" runat="server" style="display: none">
                                        <td class="bqright">分页代码结束：
                                        <asp:TextBox ID="txtPaingEnd" runat="server" TextMode="MultiLine" Style="width: 98%; word-break: break-all; word-wrap: break-word; height: 65px;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr id="PageType5_3" runat="server" style="display: none">
                                        <td class="bqright">分页URL开始代码：
                                        <asp:TextBox ID="txtLinkBegin" runat="server" TextMode="MultiLine" Rows="6" Style="width: 98%; height: 50px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr id="PageType5_4" runat="server" style="display: none">
                                        <td class="bqright">分页URL结束代码：
                                        <asp:TextBox ID="txtLinkEnd" runat="server" TextMode="MultiLine" Rows="6" Style="width: 98%; height: 50px; word-break: break-all; word-wrap: break-word;"></asp:TextBox><br />
                                            <asp:Button ID="Button2" runat="server" Text="测试从源代码中获取分页URL" CssClass="btn"
                                                Style="margin-top: 5px;" OnClick="Button2_Click" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="bqright" height="50" colspan="2" align="center">
                            <asp:Button ID="Button3" runat="server" Text=" 保存 " CssClass="btn radius30 pad_0_30"
                                Style="margin-left: 40%" OnClick="Button3_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="Button3" />
            </Triggers>
        </asp:UpdatePanel>
    </form>
</body>
</html>
