<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_GetSubRecord_InputData, QianboCMS" EnableEventValidation="false" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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 runat="server">
    <title>数据入库</title>
    <link rel="stylesheet" href="../Css/layout.css" type="text/css" />
    <script type="text/javascript" src="../../Js/jquery.js"></script>
    <script type="text/javascript" src="../../Js/lhgdialog/lhgdialog.min.js?self=true"></script>
    <script language="javascript" type="text/javascript" src="../../Js/Common.js"></script>
    <script language="javascript" type="text/javascript">
        function checkedAll() {
            var s = document.getElementById("tableCheck").getElementsByTagName("INPUT");
            for (var i = 0; i < s.length; i++) {
                if (s[i].type == "checkbox") {
                    s[i].checked = document.getElementById("chkBoxChooseAll").checked;
                }
            }
        }
        function CheckValidate() {
            var dayCount = $('txtDayCount').value.trim();
            if (!CheckNumberNotZero(dayCount)) {
                alert("清理推送数据天数必须为正整数！");
                return false;
            }
            if (confirm('是否确定清理' + dayCount + '天前的推送数据记录？')) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
</head>

<body>
    <form id="form1" runat="server">
        <div>
            <table cellspacing="1" cellpadding="0" class="wzdh" align="center">
                <tr>
                    <td class="wzlist">
                        <img src="../Images/Skin/Default/you.gif" align="absmiddle" />
                        您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; <a href="../User/LogList.aspx">扩展功能</a> &gt;&gt; 抽取数据
					</td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="1" class="border" align="center" id="tableCheck">
                <tr class="title">
                    <td width="30px">全选</td>
                    <td>标题</td>
                    <td width="180px">作者</td>
                    <td width="180px">推送者</td>
                    <td width="180px">分站</td>
                    <td width="90px">操作</td>
                </tr>
                <asp:Repeater runat="server" ID="repInputDataList" OnItemCommand="repInputDataList_ItemCommand">
                    <ItemTemplate>
                        <tr class="tdbg" onmouseover="this.className='tdbgmouseover'" onmouseout="this.className='tdbg'">
                            <td><asp:CheckBox ID="CheckBox1" runat="server" /></td>
                            <td><%# Eval("Title") %></td>
                            <td><%# Eval("UName") %></td>
                            <td><%#GetInputDataAuthor(Eval("InputDateOuthor").ToString())%></td>
                            <td><%# getSubSiteName( Eval("SubSiteId").ToString())%></td>
                            <td>
                                <asp:HiddenField ID="hidTempTableId" Value='<%# Eval("Id") %>' runat="server" />
                                <asp:LinkButton ID="lkBtnDelete" CommandName="Delete" OnClientClick="return confirm('是否确定删除？')" runat="server">删除</asp:LinkButton>
                                | <a href="PreviewInputData.aspx?Id=<%# Eval("Id") %>" target="_blank">预览</a>
							</td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <tr class="tdbg">
                            <td align="left" colspan="6"><input id="chkBoxChooseAll" type="checkbox" onclick="checkedAll()" />选中所有</td>
                        </tr>
                    </FooterTemplate>
                </asp:Repeater>
                <tr class="tdbg">
                    <td colspan="6">
                        <webdiyer:AspNetPager ID="InputDataPage" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageSize="20" HorizontalAlign="Right" PrevPageText="上一页" ShowInputBox="Never" UrlPageIndexName="" ShowCustomInfoSection="Left" Width="99%" OnPageChanging="InputDataPage_PageChanging" LayoutType="Table" CustomInfoSectionWidth="10%"></webdiyer:AspNetPager>
					</td>
                </tr>
            </table>
            <script type="text/javascript">
                var jq = jQuery.noConflict();
                jQuery(function () {
                    jQuery('#Button1').click(function () {
                        jQuery.dialog({
                            id: 'txtSetColumn',
                            lock: true,
                            title: '选择入库栏目',
                            content: "url:SetColumn.aspx",
                            width: 350,
                            height: 500
                        });
                    });
                });
            </script>
            <table id="baseTable" align="center" class="border" cellspacing="1" cellpadding="0">
                <tr>
                    <td class="wzlist">
						入库栏目：<asp:HiddenField ID="hidColumnId" runat="server" />
                        <asp:TextBox ID="txtColumnId" runat="server" Width="80" Enabled="false"></asp:TextBox>
                        <input id="Button1" type="button" class="btn" value="点击选择" />
                        <asp:Button ID="btnInputData" runat="server" CssClass="btn" Text="抽取数据" OnClick="btnInputData_Click" />
                        <asp:Literal ID="ltMsg" runat="server"></asp:Literal>
                        清理
                        <asp:TextBox ID="txtDayCount" runat="server" Width="50" MaxLength="5"></asp:TextBox>
                        天前的推送记录
                        <asp:Button ID="btnClear" runat="server" CssClass="btn" OnClick="btnClear_Click" OnClientClick="return CheckValidate()" Text="清理" />
					</td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>