<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_Collection_Article.aspx.cs" Inherits="MyITJob.Admin.Admin_Collection_Article" %>

<!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 id="Head1" runat="server">
    <title><%=Application["PageTitle"] %>——文章采集器</title>
    <link href="../images/Admin_Style.css" rel="stylesheet" type="text/css" />
<script language='javascript' type="text/javascript">

function CheckAll(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.name != 'chkAll' && e.disabled == false && e.type == 'checkbox') {
      e.checked = form.chkAll.checked;
      if (e.checked)
        hL(e);
      else
        dL(e);
    }
  }
}
function hL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg2';
}
function dL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg';
}
function Change_Regex(show){
    if(show == "0") {
        myform.PageUrlAll.style.display = 'none';
        myform.PageUrl.style.display = 'block';
        myform.NumStart.style.display = 'block';
        document.getElementById("NumbCount").style.display = 'block';
    } else {
        myform.PageUrlAll.style.display = 'block';
        myform.PageUrl.style.display = 'none';
        myform.NumStart.style.display = 'none';
        document.getElementById("NumbCount").style.display = 'none';
    }
}
</script>
</head>
<body>
    <form id="myform" runat="server">
        <div>
            <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" width="100%">
                <tr class="topbg">
                    <td colspan="10" style="height: 22px">
                        <table width="100%">
                            <tr class="topbg">
                                <td align="center">
                                    <b>文 章 采 集 管 理</b></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td height="30" width="70">
                        <strong>管理导航：</strong></td>
                    <td>
                        <a href="Admin_Collection.aspx">采集系统管理</a> |&nbsp; <a href="Admin_Collection_Article.aspx">添加文章采集规则</a> |&nbsp; <a href="#">添加企业采集规则</a> |</td>
                </tr>
            </table>
            <br />
            <table width='100%' border='0' align='center' cellpadding='3' cellspacing='1' class='border'>
              <tr class='title'>
                <td height='22' colspan='4' align='center' class='topbg'><strong>文 章 采 集 设 置</strong></td>
              </tr>
              <tr class='tdbg'>
                <td width='253' valign="top"><strong>采集站点名称：</strong></td>
                <td align="left">
                    <asp:TextBox ID="PageName" runat="server" Width="231px" MaxLength="100"></asp:TextBox></td>
                <td>采集文章归属：</td>
                <td>
                    <asp:DropDownList ID="coll_ddl" runat="server">
                    </asp:DropDownList></td>
              </tr>
              <tr class='tdbg'>
                <td width='253' valign="top"><strong>采集站点 - 地址规则：</strong><br />
                    <label for="Radio1"><input id="Radio1" type="radio" onclick="Change_Regex(0);" checked runat="server" />有序排列规则</label><br />
                    有序排列地址为有规律可寻的<br />
                    匹配条件为“{}”。<br />
                    <label for="Radio2"><input id="Radio2" type="radio" onclick="Change_Regex(1)" runat="server" />无序排列规则</label><br />
                    无序排列地址为无规律可循的<br />
                    多个地址间用英文分号“;”分隔。&nbsp;</td>
                <td colspan="3" align="left" valign="top">
                    <asp:TextBox ID="PageUrl" runat="server" Width="230px"></asp:TextBox><br />
                    <asp:TextBox ID="PageUrlAll" runat="server" Width="469px" Height="197px" style="display:none;" TextMode="MultiLine"></asp:TextBox>
                    </td>
              </tr>
              <tr class='tdbg'>
                <td width='253' valign="top"><strong>采集条数起始值：</strong><br />
                  选择从第几条信息开始采集。 </td>
                <td width="316" align="left">
                    <asp:TextBox ID="NumStart" runat="server" Width="77px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="NumStart" ErrorMessage="请输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator></td>
                <td width="133" align="left" valign="top"><strong>采集页面编码：</strong></td>
                <td width="405" align="left"><asp:RadioButtonList ID="Coding" runat="server" RepeatLayout="Flow">
                    <asp:ListItem Selected="True">UTF-8</asp:ListItem>
                    <asp:ListItem>GB2312</asp:ListItem>
                    </asp:RadioButtonList></td>
              </tr>
              <tr class='tdbg' id='NumbCount'>
                <td width='253' valign="top"><strong>采集条数总值：</strong><br />
                  选择从起始值开始，采集几条信息。<br />
                  采集数量越大，速度越慢。</td>
                <td colspan="3" align="left">
                    <asp:RadioButtonList ID="NumCount" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem Selected="True">10</asp:ListItem>
                        <asp:ListItem>20</asp:ListItem>
                        <asp:ListItem>30</asp:ListItem>
                        <asp:ListItem>40</asp:ListItem>
                        <asp:ListItem>50</asp:ListItem>
                        <asp:ListItem>60</asp:ListItem>
                    </asp:RadioButtonList></td>
              </tr>
              <tr class='tdbg'>
                <td width='253' rowspan="2" valign='top'><strong>采集站点 - 标题规则：</strong><br />
                  选择采集的新闻标题标签。<br /></td>
                <td colspan="3" align="left"> 开始采集HTML标签：<asp:TextBox ID="TitleStart" runat="server" Width="230px"></asp:TextBox></td>
              </tr>
              <tr class='tdbg'>
                <td colspan="3" align="left">结束采集HTML标签：<asp:TextBox ID="TitleEnd" runat="server" Width="230px"></asp:TextBox></td>
              </tr>
              <tr class='tdbg'>
                <td width='253' valign='top'><strong>采集站点 - 过滤规则：</strong><br />
过滤采集的新闻内容标签。</td>
                <td colspan="3" align="left">
                <asp:TextBox ID="guolv" runat="server" Width="230px" MaxLength="100"></asp:TextBox><br />
                    过滤HTML标题以及内容的字段，多个字段用英文逗号“,”分隔</td>
              </tr>
              <tr class='tdbg'>
                <td width='253' rowspan="2" valign="top"><strong>采集站点 - 内容规则：</strong><br />
                  选择采集的新闻内容标签。</td>
                <td colspan="3" align="left">开始采集HTML标签：<asp:TextBox ID="ContentS" runat="server" Width="328px"></asp:TextBox></td>
              </tr>
              <tr class='tdbg'>
                <td colspan="3" align="left">结束采集HTML标签：<asp:TextBox ID="ContentE" runat="server" Width="326px"></asp:TextBox></td>
              </tr>
              <tr class='tdbg'>
                <td height='40' colspan='4' align='center'>
                    <asp:Button ID="Button1" runat="server" Text="保存设置" OnClick="Button1_Click" />
                    <input id="Reset1" type="reset" value="重置规则" /></td>
              </tr>
            </table>
            <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
              <tr class='tdbg'>
    <td class="topbg">
      <div align="center">
        Copyright 2009-2019  <%=Application["PageTitle"] %> All Rights Reserved.</div>
      </td>
    </tr>
          </table>
        </div>
    </form>
</body>
</html>