<%@ page language="C#" autoeventwireup="true" inherits="s_plus_zkcms_caiji_news_index, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<!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>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>知科——新闻简易采集器</title>
    <style type="text/css">
        body
        {
            padding: 0px 20px 20px 20px;
            background-color: #6cafda;
        }
        body, td
        {
            color: #fff;
            font-size: 12px;
        }
        .red
        {
            color: #fff;
            font-weight:bold;
        }
        .self_inp1
        {
            border: solid 1px #069;
            height: 24px;
            line-height: 24px;
            font-size: 14px;
            background-color: #fff;
            width: 100px;
            padding-left: 4px;
            padding-right: 2px;
            color: #666;
            padding-left: 5px;
            padding-right: 3px;
        }
        .self_sel1
        {
        	background-color: #fff;
            font-size: 12px;
            color: #666;
            font-size: 14px;
        }
        textarea
        {
            background-color: #fff;
            border: solid 1px #069;
            line-height: 24px;
            font-size: 14px;
            color: #666;
            padding-left: 5px;
            padding-right: 3px;
        }
        .self_but1
        {
            font-size: 12px;
            background-color: #3d6bc9;
            color: #fff;
            width: 60px;
            height: 28px;
            border-width: 0;
            overflow: hidden;
            cursor: pointer;
            border-right: solid 1px #264d9d;
            border-bottom: solid 1px #264d9d;
            border-left: solid 1px #8aabf0;
            border-top: solid 1px #8aabf0;
            font-size: 14px;
            font-weight: bold;
        }
        .self_table1 td
        {
            padding: 10px;
        }
        .self_msg1
        {
            color: #f00;
            display: block;
            padding-left: 10px;
            height: 26px;
            line-height: 26px;
            border: solid 1px #ffcc9a;
            width: 397px;
            margin-left: 173px;
            margin-top: 10px;
            background-color: #fff;
        }
    </style>
    <script type="text/javascript">
        function replaceCharLegal(){
            document.getElementById("CJname").value= document.getElementById('CJname').value.replace(/\"/g,'').replace(/\'/g,'').replace(/\//g,'').replace(/\\/g,'').replace(/\[/g,'').replace(/\]/g,'').replace(/,/g,'').replace(/\./g,'').replace(/\(/g,'').replace(/\)/g,'').replace(/\{/g,'').replace(/\}/g,'').replace(/:/g,'').replace(/</g,'').replace(/>/g,'').replace(/\?/g,'').replace(/;/g,'').replace(/\|/g,'').replace(/\+/g,'').replace(/\=/g,'').replace(/\-/g,'').replace(/\*/g,'').replace(/\&/g,'').replace(/\^/g,'').replace(/\%/g,'').replace(/\$/g,'').replace(/\#/g,'').replace(/\@/g,'').replace(/\!/g,'').replace(/\`/g,'').replace(/\~/g,'').replace(/ /g,'').replace(/　/g,'');
        }
        function ShowAdvanced(){
            document.getElementById("tr1").style.display="";
            document.getElementById("tr2").style.display="";
            document.getElementById("tr3").style.display="";
            document.getElementById("tr4").style.display="";
        }
        function setRS(obj)
        {
            if(document.getElementById(obj).value.indexOf("{$}")==-1)document.getElementById(obj).value=document.getElementById(obj).value+"{$}";
        }
    </script>
    <asp:Literal ID="JS1" runat="server"></asp:Literal>
</head>
<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="previewbox" runat="server" TextMode="MultiLine" Height="500" Width="100%"
        Visible="false"></asp:TextBox>
    <asp:Label ID="msg" runat="server" CssClass="self_msg1" Visible="false"></asp:Label>
    <table border="0" cellpadding="0" cellspacing="0" class="self_table1">
        <tr>
            <td class="red">
                采集规则名称：
            </td>
            <td>
                <asp:TextBox ID="CJname" runat="server" CssClass="self_inp1" Width="400" MaxLength="20" onblur="replaceCharLegal()"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="red">
                网址：
            </td>
            <td>
                <asp:TextBox ID="PAGEs" runat="server" TextMode="MultiLine" Height="200" Width="600"></asp:TextBox>&nbsp;多个网址请换行输入
            </td>
        </tr>
        <tr>
            <td class="red">
                列表页起始字符：
            </td>
            <td>
                <asp:TextBox ID="PAGEsta" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="red">
                列表页结束字符：
            </td>
            <td>
                <asp:TextBox ID="PAGEend" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                内容页网址前缀：
            </td>
            <td>
                <asp:TextBox ID="HREFprefix" runat="server" CssClass="self_inp1" Width="400"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                列表链接中包含：
            </td>
            <td>
                <asp:TextBox ID="PAGEin" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox><%--多个条件请换行输入--%>
            </td>
        </tr>
        <tr>
            <td>
                列表链接中排除：
            </td>
            <td>
                <asp:TextBox ID="PAGEout" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox><%--多个条件请换行输入--%>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="red">
                标题：
            </td>
            <td>
                <asp:TextBox ID="Ftitle" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox><span onclick="setRS('Ftitle')">{$}</span>
            </td>
        </tr>
        <tr>
            <td>
                时间：
            </td>
            <td>
                <asp:TextBox ID="Ftime" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox><span onclick="setRS('Ftime')">{$}</span>
            </td>
        </tr>
        <tr>
            <td class="red">
                内容：
            </td>
            <td>
                <asp:TextBox ID="Fcontent" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox><span onclick="setRS('Fcontent')">{$}</span>
            </td>
        </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="red">
                操作模式：
            </td>
            <td>
                <asp:DropDownList ID="option1" runat="server" CssClass="self_sel1" Width="350">
                    <asp:ListItem Value="mode1">Ａ、显示列表源（第一页）</asp:ListItem>
                    <asp:ListItem Value="mode2">显示过滤之后列表源（第一页）</asp:ListItem>
                    <asp:ListItem Value="mode3">显示列表的内容页链接（全部）</asp:ListItem>
                    <asp:ListItem Value="">－－－－－－－－－－－－－</asp:ListItem>
                    <asp:ListItem Value="mode4">Ｂ、显示采集第一条（第一页）</asp:ListItem>
                    <asp:ListItem Value="mode5">正式采集并入库（采集过程中请不要重复提交）</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="red">
                入库新闻栏目的ID编号：
            </td>
            <td>
                <asp:TextBox ID="classid" runat="server" CssClass="self_inp1" MaxLength="3"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                切换规则：<asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" style="text-decoration:none;color:#f00; font-weight:bold;"><font style="font-size:12px; text-decoration:none;" color="#ff0000">[管理规则]</font></asp:HyperLink>
            </td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" CssClass="self_sel1" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" Width="350" Style="font-weight: bold;color: #538ba5;"></asp:DropDownList>                
            </td>
        </tr>
          <tr>
            <td>&nbsp;</td>
            <td>
                <asp:CheckBox ID="CheckBox1" runat="server" Text="显示高级选项" AutoPostBack="true" oncheckedchanged="CheckBox1_CheckedChanged" style="color:#333;" />
            </td>
        </tr>
        
         <tr id="tr1" style="display:none">
            <td>
                替换列表字符源：
            </td>
            <td>
                <asp:TextBox ID="ListStr1" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox>
            </td>
        </tr>
         <tr id="tr2" style="display:none">
            <td>
                 替换列表字符目标：
            </td>
            <td>
                <asp:TextBox ID="ListStr2" runat="server" TextMode="MultiLine" Height="100" Width="600"></asp:TextBox>
            </td>
        </tr>
        <tr id="tr3" style="display:none">
            <td>
               列表页编码：
            </td>
            <td>
                <asp:DropDownList ID="ListCharset" runat="server" CssClass="self_sel1" Width="150">
                    <asp:ListItem Value="">自动</asp:ListItem>
                    <asp:ListItem Value="utf-8">UTF-8</asp:ListItem>
                    <asp:ListItem Value="gb2312">GB2312</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
          <tr id="tr4" style="display:none">
            <td>
               内容页编码：
            </td>
            <td>
                <asp:DropDownList ID="ViewCharset" runat="server" CssClass="self_sel1" Width="150">
                    <asp:ListItem Value="">自动</asp:ListItem>
                    <asp:ListItem Value="utf-8">UTF-8</asp:ListItem>
                    <asp:ListItem Value="gb2312">GB2312</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Literal ID="JS2" runat="server"></asp:Literal>&nbsp;
            </td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="确定" OnClick="Button1_Click" CssClass="self_but1" OnClientClick="this.style.display='none'" />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <asp:Button ID="Button2" runat="server" Text="保存采集规则" OnClick="Button2_Click" CssClass="self_but1" Width="120" OnClientClick="if(document.getElementById('CJname').value==''){alert('请输入采集规则名称！');return false}" />
                &nbsp;
                <asp:Button ID="Button3" runat="server" Text="创建新采集规则" OnClick="Button3_Click" CssClass="self_but1" Width="130" OnClientClick="if(!confirm('确定创建吗？'))return false" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
