<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="infoSearch.aspx.cs" Inherits="Web.User.infoSearch" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>最近发布</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/userCssEdit.htm" -->
    <script type="text/javascript" src="../Editor/My97DatePicker/WdatePicker.js"></script>
    <script language="javascript" type="text/javascript">
    //防止用户恶意保存
    jQuery(function($) {       
            
        $("#btnSave").click(function() {
            //return confirm("您确定要保存列表吗？");
            return GridSelectCheck('newsGrid', true);
        });
    });
    
    //单个移动
    function MoveSave(menuID, oid) {
        //改用弹出层，因为201409发布的最新ghome开始不支持showModalDialog()
        $.fancybox({
            'type': 'iframe',
            'width': 400,
            'height': 350,
            'hideOnOverlayClick': false,
            'href': 'MoveSaveForSingle.aspx?menuID=' + menuID + '&oid=' + oid
        });
        //showModalDialog("MoveSaveForSingle.aspx?menuID=" + menuID + "&oid=" + oid, window, "dialogWidth:420px; dialogHeight:350px; status:0");
    }
    
    function CallMoveSubmit()
    {
        $("#btnMoveSave").click();
    }
    
        //选中背景特效
        $(function(){
            $('.txt-c input').click(function(){
	            $(this).parents('tr').toggleClass('active');
            })
            $('.title.txt-c input').click(function(){
	            
	            if($('.list-table tr:first').hasClass('active')){
		            $('.list-table tr').addClass('active');
	            }else{
		            $('.list-table tr').removeClass('active');
	            }
            })
            $('.list-table select').change(function(){
	            //背景选中
	            if($(this).parents('tr').hasClass('active')){
		            
	            }else{
		            $(this).parents('tr').toggleClass('active');
	            }
	            
	            //复选框选中
	            var checkbox = $(this).parents("tr").find("input");
                for (var i = 0; i < checkbox.length; i++) {
                    if (checkbox[i].type == 'checkbox') {
                        checkbox[i].checked = true;
                    }
                }
            })
        })
        
        function checkAll()
        {
            //验证
            return checkAllValidate();
        }
    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="list-func-box func-box">
        <%--<div class="hd">
            <div class="breadcrumb">
                <span>我的工作台 &nbsp;&gt;&nbsp; 最近发布</span>
            </div>
            <!--/breadcrumb-->
            <div class="user-service">
                <a class="help" href="#" title="帮助：查询结果仅为当前登录用户管理权限内的数据。">帮助</a></div>
            <!--/user-service-->
        </div>--%>
        <div class="bd">
            <div class="function-hd">
                <div class="workbench">
                    <a href="AuditingNews.aspx" target="funcFrame"><i class="check"></i>待审信息<i class="arrow"></i></a>
                    <a class="active" href="infoSearch.aspx"><i class="publish"></i>最近发布<i class="arrow"></i></a>
                    <a href="myDraft.aspx" target="funcFrame"><i class="draft"></i>草稿箱<i class="arrow"></i></a>
                    <a href="search.aspx" target="funcFrame"><i class="sitesearch"></i>站内搜索<i class="arrow"></i></a>
                </div>
                <div class="search-box fr">
                    审核状态：
                    <asp:DropDownList ID="DDLpass" runat="server" CssClass="drop-txt" Width="75">
                    <asp:ListItem Text="<全部>" Value=""></asp:ListItem>
                    <asp:ListItem Text="待审" Value="0"></asp:ListItem>
                    <asp:ListItem Text="通过" Value="1"></asp:ListItem>
                    <asp:ListItem Text="不通过" Value="2"></asp:ListItem>
                    </asp:DropDownList>
                    发布时间：<asp:TextBox ID="txtbegin" runat="server" CssClass="input-txt" notNull="true" msgName="发布起始时间" MaxLength="19" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                    至：<asp:TextBox ID="txtend" runat="server" CssClass="input-txt" notNull="true" msgName="发布结束时间" MaxLength="19" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>&nbsp;&nbsp;
                    <asp:DropDownList ID="SearchTypeSelectBox" runat="server" EnableViewState="False" CssClass="drop-txt" Width="60">
                        <asp:ListItem Value="intacttitle" Selected="True">标题</asp:ListItem>
                        <asp:ListItem Value="content">内容</asp:ListItem>
                        <%--<asp:ListItem Value="fullname">发布人</asp:ListItem>--%>
                    </asp:DropDownList>
                    <asp:TextBox ID="SearchStrTextBox" runat="server" CssClass="input-txt" MaxLength="25"></asp:TextBox>
                    <asp:Button ID="Search" class="btn btn1" runat="server" Text="查 询" OnClientClick="return checkAll();" OnClick="Search_Click" />
                </div>
                <!--/search-box-->
                <div class="action-field">
                    <asp:Button ID="btnSave" class="btn" runat="server" Text="保 存" OnClick="save_Click" ></asp:Button>
                    <asp:HiddenField ID="MoveTargetBigClassID" runat="server" />
                    <asp:HiddenField ID="MoveTargetMenuID" runat="server" />
                    <asp:HiddenField ID="MoveObjectId" runat="server" />
                    <asp:Button ID="btnMoveSave" runat="server" Text="MoveSave" OnClick="MoveSaveButton_Click" UseSubmitBehavior="False" Style="display: none"></asp:Button>
                </div>
                <!--/action-field-->
            </div>
            <div class="function-bd" style="height: 480px; overflow: auto;">
            <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
            <asp:HiddenField ID="hfidstr" runat="server" />
            <asp:HiddenField ID="hftitlestr" runat="server" />
            <asp:DataGrid ID="newsGrid" CssClass="list-table" runat="server" AllowSorting="True" AutoGenerateColumns="False" >
                <Columns>
                    <asp:TemplateColumn HeaderStyle-CssClass="title txt-c" ItemStyle-CssClass="txt-c" ItemStyle-Width="36px">
                        <HeaderTemplate>
                            <asp:CheckBox ID="cbAll" Text="" runat="server" onclick="GridSelectAll('newsGrid',this.checked)" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbthis" runat="server" Text=""></asp:CheckBox>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="标题" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="CC" Visible="false" runat="server" Text="[抄送]" ForeColor="Red"></asp:Label>
                            <asp:Label ID="IsListTitle" Visible="false" runat="server" Text="[链接]" ForeColor="Red"></asp:Label>
                            <asp:HyperLink ID="intactTitle" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.intactTitle") %>'
                                Target="_blank" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.pkId", "../newsInfo.aspx?pkId={0}") %>'>
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="所属栏目" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="menuLabel" runat="server" Text='<%# Eval("menuName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="发布人" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <a href="#"><asp:Label ID="info" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.fullName") %>' ToolTip='<%# "发布IP："+DataBinder.Eval(Container, "DataItem.updateIp") %>'></asp:Label></a>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="发布时间" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <a href="#"><asp:Label ID="lbtime" runat="server" Text='<%# Eval("updateTime", "{0:yyyy-M-d}") %>' ToolTip='<%# Eval("updateTime") %>'></asp:Label></a>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="今日推荐" HeaderStyle-CssClass="title" Visible="false">
                        <ItemTemplate>
                            <asp:DropDownList ID="isRecommand" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.isRecommand") %>'>
                                <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                <asp:ListItem Value="1">推荐</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="click" HeaderText="点击量" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="固顶" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="isTop" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.isTop") %>'>
                                <asp:ListItem Value="0" Selected="True">取消</asp:ListItem>
                                <asp:ListItem Value="1">固顶</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="审核" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="pass" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.passed") %>'>
                                <asp:ListItem Value="0" Selected="True">待审</asp:ListItem>
                                <asp:ListItem Value="1">通过</asp:ListItem>
                                <asp:ListItem Value="2">不通过</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="显示等级" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="gradeDrop" runat="server" DataValueField="pkId" DataTextField="name" DataSource="<%# dv %>">
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="浏览权限" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="gate" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.gate") %>'>
                                <asp:ListItem Value="0" Selected="True">无限制</asp:ListItem>
                                <asp:ListItem Value="1">仅内网可见</asp:ListItem>
                                <asp:ListItem Value="2">仅登录可见</asp:ListItem>
                                <asp:ListItem Value="3">内网或登录可见</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                        <ItemTemplate>
                            <asp:LinkButton ID="edit" runat="server" CommandName="edit">编辑</asp:LinkButton>&nbsp;&nbsp;
                            <a href='manageReview.aspx?newsId=<%# DataBinder.Eval(Container, "DataItem.pkId")%>' target="_blank">评论</a>&nbsp;&nbsp;
                            <asp:LinkButton ID="lbmove" runat="server" >移动</asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="del" runat="server" CommandName="del">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="grade" HeaderText="等级"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="useListTitle" HeaderText="useListTitle"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="listTitle" HeaderText="listTitle"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="Code" HeaderText="TemplateCode"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="bigClassId" HeaderText="bigClassId"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="sourceMenuId" HeaderText="menuId"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="isDuplicated" HeaderText="isDuplicated"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="duplicatedPkId" HeaderText="duplicatedPkId"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
            <div id="isnull" runat="server" visible="false" style="text-align:center;">
            <p class="no-record">暂无内容哦！</p>
            </div>
            <!--[if lte IE 7]></div><![endif]-->
            </div>
        </div>
        <div class="ft">
            <div class="pagination">
                <asp:Label ID="showPage" runat="server"></asp:Label>
            </div>
            <!--/pagination-->
        </div>
    </div>
    <!--/list-func-box-->
    </form>
</body>
</html>