<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ArticleGather_WrokConfig.aspx.cs"
    Inherits="TopWinCMS.WebUI.Admin.ArticleGather.ArticleGather_WrokConfig" %>

<%@ Register TagPrefix="cc1" Namespace="TopWinCMS.WebControls" Assembly="TopWinCMS.WebControls" %>
<!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>采集</title>
    <link rel="stylesheet" type="text/css" href="../Style.css" />
    <script language="javascript" type="text/javascript" src="../../Images/skysoft.js"></script>
    <script language="javascript" type="text/javascript" src="../TopWin.js"></script>
    <script language="javascript" type="text/javascript" src="Quarry2.js"></script>
    <script language="javascript" type="text/javascript" src="../../JS/AJAX/AJAX.js"></script>
    <script type="text/javascript">
        ReWriteArtler = false;

        function Message(info, state)
        {
            if (stoplog == true)
            {
                return;
            }
            var today = new Date();
            var time = today.format('hh:mm:ss:fff');
            if (state == 0 && $("LogErr").checked == false)
            {
                return;
            }
            if (state == 1 && $("LogRight").checked == false)
            {
                return;
            }
            if (state == 2 && $("LogAlert").checked == false)
            {
                return;
            }

            var LogList = document.getElementById("LogList");
            var newline = LogList.insertRow(1);

            var ojb = newline.insertCell();
            ojb.style.width = "150px";
            ojb.innerHTML = time;

            ojb = newline.insertCell();
            ojb.className = "info";
            ojb.innerHTML = info;
        }

        var stoplog = false;
        function WriteLog(obj)
        {
            if (stoplog == false)
            {
                stoplog = true;
                obj.value = "开始日志";
            }
            else
            {
                stoplog = false;
                obj.value = "停止日志";
            }
        }
    </script>
    <style type="text/css">
        #BadLinkNum, #GatherNum
        {
            width: 28px;
        }
        .info
        {
            text-align: left;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table cellpadding="3" cellspacing="1" class="GridView" style="width: 500px; margin-left: auto;
        margin-right: auto">
        <tr>
            <td style="text-align: right;">
                <label for="IsTest">
                    测试采集</label><input id="IsTest" type="checkbox" />
                <br />
                <div>
                    倒序采集<asp:CheckBox ID="Reverse" runat="server" /></div>
                <div>
                    更新模式<input id="IsUpdate" type="checkbox" /></div>
            </td>
            <td style="text-align: center;">
                <div>
                    记录错误<input id="LogErr" type="checkbox" checked="checked" /></div>
                <div>
                    记录警告<input id="LogAlert" type="checkbox" /></div>
                <div>
                    记录正常<input id="LogRight" type="checkbox" /></div>
            </td>
            <td style="text-align: center;">
                采集数量<input id="GatherNum" type="text" value="<%=gather_model.GatherNum %>" />
                <div>
                    反反盗链<input id="IsLeech" type="checkbox" /></div>
                <div>
                    容忍图片死链接
                    <input id="BadLinkNum" type="text" value="0" /></div>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;" colspan="2">
                &nbsp;
                <input id="bt_start" type="button" onclick="Start();" value="采集" class="btn" />
                <button id="bt_stop" onclick="Stop();" disabled="disabled" class="btn">
                    停止</button>
                <input type="button" onclick="WriteLog(this);" class="btn" value="停止日志" />
                <div style="text-align: center; font-weight: bold;">
                    当前采集 / 跳过采集 / 计划采集： <span id="ProgressNum">0</span> / <span id="ProgressIgnoreNum">0</span>
                    / <span id="ProgressTotal">0</span></div>
            </td>
        </tr>
    </table>
    <table width="100%" border="1" cellspacing="2" cellpadding="0" style="text-align: center"
        id="LogList">
        <tr style="background-color: Black; color: White; height: 26px">
            <td style="width: 150px">
                时间
            </td>
            <td>
                信息
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
