<%@ page language="C#" autoeventwireup="true" inherits="admin_Collection_SetCollection2, 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>

</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="CollectionList.aspx">采集项目管理</a>
                >> <asp:Literal ID="LitItem" runat="server"></asp:Literal>
            </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 class="titleline">
                &nbsp;
            </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 valign="top">
                        <table cellspacing="1" cellpadding="0" width="99%">
                            <tbody id="Tabs0" runat="server">
                                <tr>
                                    <td class="bqleft">
                                        所属采集项目：
                                    </td>
                                    <td class="bqright">
                                        <asp:Literal ID="LitItemName" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                        <font color="red">*</font>列表开始代码：
                                    </td>
                                    <td class="bqright">
                                        <asp:TextBox ID="txtListBeginCode" runat="server" TextMode="MultiLine" Style="width: 98%;
                                            height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                        <font color="red">*</font>列表结束代码：
                                    </td>
                                    <td class="bqright">
                                        <asp:TextBox ID="txtListEndCode" runat="server" TextMode="MultiLine" Style="width: 98%;
                                            height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                    </td>
                                    <td class="bqright" height="30">
                                        <asp:Button ID="Button1" runat="server" Text=" 测试列表 " Style="float: right" CssClass="btn"
                                            OnClick="Button1_Click" />使用@@进行通配符替换,如<font color="red">&lt;a@@&quot;&gt;</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                        <font color="red">*</font>链接开始代码：
                                    </td>
                                    <td class="bqright">
                                        <asp:TextBox ID="txtUrlBeginCode" runat="server" TextMode="MultiLine" Style="width: 98%;
                                            height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                        <font color="red">*</font>链接结束代码：
                                    </td>
                                    <td class="bqright">
                                        <asp:TextBox ID="txtUrlEndCode" runat="server" TextMode="MultiLine" Style="width: 98%;
                                            height: 80px; word-break: break-all; word-wrap: break-word;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bqleft">
                                    </td>
                                    <td class="bqright" height="30">
                                        <asp:Button ID="Button2" runat="server" Text=" 测试连接 " Style="float: right" CssClass="btn"
                                            OnClick="Button2_Click" />
                                    </td>
                                </tr>
                            </tbody>
                            <tbody id="Tabs1" style="display: none" runat="server">
                                <tr>
                                    <td class="bqleft">
                                        选择分页类型：
                                    </td>
                                    <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="2">批量指定分页URL代码</asp:ListItem>
                                            <asp:ListItem Value="3">手动添加分页URL代码</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr id="PageType2_1" runat="server" style="display: none">
                                    <td class="bqleft">
                                        <font color="red">*</font>“下一页”URL开始代码：
                                    </td>
                                    <td class="bqright">
                                        <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="bqleft">
                                        <font color="red">*</font>“下一页”URL结束代码：
                                    </td>
                                    <td class="bqright">
                                        <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="bqleft">
                                    </td>
                                    <td class="bqright" height="50">
                                        <asp:Button ID="Button5" runat="server" Text=" 测试下一页 " CssClass="btn" OnClick="Button5_Click"
                                            Style="float: right" />
                                    </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;" CssClass="in1"></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="bqleft"></td>
                                    <td class="bqright"></td>
                                 </tr>
                                 <tr id="PageType5_2" runat="server" style="display: none">
                                    <td class="bqleft"></td>
                                    <td class="bqright"></td>
                                 </tr>
                                 <tr id="PageType5_3" runat="server" style="display: none">
                                    <td class="bqleft"></td>
                                    <td class="bqright"></td>
                                 </tr>
                                 <tr id="PageType5_4" runat="server" style="display: none">
                                    <td class="bqleft"></td>
                                    <td class="bqright"></td>
                                 </tr>
                            </tbody>
                        </table>
                    </td>
                    <td width="50%" class="bqright">
                        <span style="float: left">列表页代码：↓</span><span style="margin-left: 10px;"><a href="javascript:"
                            onclick="GetPageCode('<%=url %>','<%=coding %>')">重新获取列表代码</a>：↓</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: 380px; 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>
                </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="Button4_Click" /><asp:Button ID="Button4" runat="server" Text=" 保存并进入下一步 "
                                CssClass="btn radius30 pad_0_30" Style="margin-left: 10px" OnClick="Button4_Click" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
    </form>
</body>
</html>
