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

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="Server">
    <aspx:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server" HeadTitleTxt="采集管理-入库"
        ButtonList-Capacity="4">
        <aspx:HeadMenuButtonItem ButtonIcon="list.gif" ButtonName="规则列表" ButtonPopedom="List"
            ButtonUrl="Collect_List.aspx" ButtonUrlType="Href" ButtonVisible="True" />
        <aspx:HeadMenuButtonItem ButtonIcon="back.gif" ButtonName="返回" ButtonPopedom="List"
            ButtonUrl="history.back()" ButtonUrlType="JavaScript" ButtonVisible="True" />
    </aspx:HeadMenuWebControls>
    <aspx:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
        <aspx:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="信息列表">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input id="Checkbox1" type="checkbox" onclick="CheckAll(this)" runat="server" /><label>全选</label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="ItemCheckBox" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle Width="60px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="标题">
                        <ItemTemplate>
                            <%#MyTitle(Eval("id"), Eval("Title"))%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="采集来源">
                        <ItemTemplate>
                            <%#Source(Eval("Source"),Eval("Links"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入库状态">
                        <ItemTemplate>
                            <%#NewsStory(Eval("IsStorage"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%#NewsStat(Eval("IsDelete"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Channel_Title" HeaderText="栏目" />
                    <asp:TemplateField HeaderText="发布时间">
                        <ItemTemplate>
                            <%#v5star.Toolkit.Web.StrBuilder.FormatDate((DateTime)Eval("AddDate"), "6")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="采集时间">
                        <ItemTemplate>
                            <%#v5star.Toolkit.Web.StrBuilder.FormatDate((DateTime)Eval("CollectTime"),"6")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <a href="edit.aspx?id=<%# Eval("id")%>">编辑</a> | <a href="delete.aspx?id=<%# Eval("id")%>">
                                删除</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div style="float: left">
                <div style="float: left;" align="right">
                    &nbsp; &nbsp;
                    <asp:Button ID="Button1" runat="server" Text="回收站" CssClass="button_bak" OnClick="Button1_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" Text="入库选中" CssClass="button_bak" OnClick="Button2_Click" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </div>
                <div style="float: left; width: 50%;">
                    <aspx:CutePager ID="CutePager1" runat="server" OnPageChanged="CutePager1_PageChanged"
                        AlwaysShow="True" ShowCustomInfoSection="Left">
                    </aspx:CutePager>
                </div>
            </div>
        </aspx:TabOptionItem>
        <aspx:TabOptionItem ID="TabOptionItem2" runat="server" Tab_Name="搜索">
            <table width="100%" border="0" cellspacing="1" cellpadding="3">
                <tr>
                    <td class="table_body table_body_NoWidth" align="right">
                        入库状态：</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:DropDownList ID="DDLInsertState" runat="server">
                            <asp:ListItem Value="*">-请选择-</asp:ListItem>
                            <asp:ListItem Value="1">已入库</asp:ListItem>
                            <asp:ListItem Value="0">未入库</asp:ListItem>
                        </asp:DropDownList></td>
                    <td class="table_body table_body_NoWidth" align="right">
                        状态：</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:DropDownList ID="DDLSatate" runat="server">
                            <asp:ListItem Value="*">-请选择-</asp:ListItem>
                            <asp:ListItem Value="0">正常</asp:ListItem>
                            <asp:ListItem Value="1">删除</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 28px" align="right">
                        发布时间：</td>
                    <td class="table_none table_none_NoWidth" style="height: 28px">
                        <asp:TextBox ID="tbADDStartTime" runat="server" Width="80px" CssClass="text_input"
                           onfocus="javascript:HS_setDate(this);"></asp:TextBox>~<asp:TextBox
                                ID="tbADDEndTime" runat="server" Width="80px" CssClass="text_input" onfocus="javascript:HS_setDate(this);"></asp:TextBox></td>
                    <td class="table_body table_body_NoWidth" style="height: 28px" align="right">
                        采集时间：</td>
                    <td class="table_none table_none_NoWidth" style="height: 28px">
                        <asp:TextBox ID="tbStartCollectTime" runat="server" Width="80px" CssClass="text_input"
                            onfocus="javascript:HS_setDate(this);"></asp:TextBox>~<asp:TextBox
                                ID="tbEndCollectTime" runat="server" Width="80px" CssClass="text_input" onfocus="javascript:HS_setDate(this);"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 28px" align="right">
                        关键字：</td>
                    <td class="table_none table_none_NoWidth" colspan="3" style="height: 28px">
                        <asp:TextBox ID="tbKeyWords" runat="server" Width="213px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="4" align="right">
                        <asp:Button ID="Button3" runat="server" CssClass="button_bak" OnClick="Button3_Click"
                            Text="确 定" />&nbsp; &nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </aspx:TabOptionItem>
    </aspx:TabOptionWebControls>

    <script type="text/javascript">
  //<![CDATA[
  function CheckAll(oCheckbox)
  {
   var GridView1 = document.getElementById("<%=GridView1.ClientID %>");
   for(i = 1;i < GridView1.rows.length; i++)
   {
    GridView1.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = oCheckbox.checked;
   }
  }
  
  //]]>
    </script>
</asp:Content>
