<%@ page language="C#" masterpagefile="~/SiteServer/MasterPage/PageTemplate.Master" autoeventwireup="true" inherits="SiteServer_Collect_Collect_List, v5star.Web" title="Untitled Page" theme="Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="Server">
    <aspx:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server" HeadTitleTxt="采集管理">
        <aspx:HeadMenuButtonItem ButtonName="采集对象" ButtonPopedom="New" ButtonUrlType="Href"
            ButtonVisible="True" ButtonUrl="Collect_Add.aspx" />
        <aspx:HeadMenuButtonItem ButtonName="关键字过滤" ButtonPopedom="New" ButtonUrlType="Href"
            ButtonVisible="True" ButtonUrl="Collect_RuleAdd.aspx" />
        <aspx:HeadMenuButtonItem ButtonName="过滤规则" ButtonPopedom="List" ButtonUrl="Collect_RuleList.aspx"
            ButtonUrlType="Href" ButtonVisible="True" />
        <aspx:HeadMenuButtonItem ButtonIcon="list.gif" ButtonName="信息处理" ButtonPopedom="List"
            ButtonUrlType="Href" ButtonVisible="True" ButtonUrl="Collect_News.aspx" />
    </aspx:HeadMenuWebControls>
    <aspx:TabOptionWebControls ID="TabOptionWebControls1" runat="server" >
        <aspx:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="对象列表">
            <div class="border">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"
                    Width="100%">
                    <Columns>
                        <asp:BoundField HeaderText="序号" />
                        <asp:HyperLinkField DataNavigateUrlFields="objURL" DataNavigateUrlFormatString="{0}"
                            DataTextField="SiteName" HeaderText="项目名称" Target="_blank" />
                        <asp:BoundField DataField="Channel_Title" HeaderText="所属栏目" />
                        <asp:BoundField DataField="LockState" HeaderText="状态" />
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href="javascript:Handle(0,<%# DataBinder.Eval(Container.DataItem, "ID")%>);">复制</a>&nbsp;┊&nbsp;<a
                                    href="Collect_Add.aspx?Type=edit&ID=<%# DataBinder.Eval(Container.DataItem, "ID")%>">向导</a>&nbsp;┊&nbsp;<a
                                        href="javascript:Handle(1,<%# DataBinder.Eval(Container.DataItem, "ID")%>);">删除</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="设置">
                            <ItemTemplate>
                                <a href="Collect_StepTwo.aspx?id=<%# Eval("ID")%>">列表设置</a> | <a href="Collect_StepThree.aspx?id=<%# Eval("ID")%>">
                                    正文设置</a> | <a href="Collect_Test.aspx?id=<%# Eval("ID")%>">采样测试</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="采集">
                            <ItemTemplate>
                                <a href="javascript:Collect(<%# Eval("ID")%>,'<%# Eval("LockState")%>');">采集</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
            <aspx:CutePager ID="CutePager1" runat="server" AlwaysShow="True" 
                HorizontalAlign="Center" OnPageChanged="CutePager1_PageChanged" ShowCustomInfoSection="Right">
            </aspx:CutePager>
        </aspx:TabOptionItem>
    </aspx:TabOptionWebControls>

    <script type="text/javascript">
 <!--
 function Handle(op,id)
 {
    var retype = '站点';
    var ob = 'Site';   
    var opt = 'Delete'; 
    var confm = '您确定要删除该'+ retype +'吗?数据将不可恢复!';
    if(op == 0)
    {
        opt = 'Copy';
        confm = '您确定要复制该'+ retype +'吗?';
    }
    
    if(window.confirm(confm))
    {
        var param = 'Option='+ opt + ob +'&ID='+ id;
        location.href ="?"+param;       
    }
 } 
 function Collect(id,flag)
 {
    if(flag != '有效')
    {
        alert('该站点参数没有设置完成,不能采集!\r请点击"向导"设置参数...');
        return;
    }
    
    var WWidth = (window.screen.width-500)/2;
    var Wheight = (window.screen.height-150)/2;
  
    window.open('Collect_NumSet.aspx?id='+ id,'采集设置','status=0,directories=0,resizable=0,top='+Wheight+', left='+WWidth+',toolbar=0,location=0,scrollbars=0,width=360px,height=165px');
 }
 //-->
    </script>

</asp:Content>
