<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="Web.User.search" %>

<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<%@ Register Src="~/User/AuditingNav.ascx" TagPrefix="uc1" TagName="AuditingNav" %>
<!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/head.htm" -->
</head>
<body>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <form id="Form1" method="post" runat="server">
                    <div class="list-func-box func-box">
                        <div class="tabbable">
                            <uc1:AuditingNav runat="server" id="AuditingNav" />
                        </div>
                        <div class="bd tab-content">
                            <div class="page-header clearfix">
                                <div class="action-field col-xs-12">
                                    <asp:DropDownList ID="ddlBigclasstype" runat="server" EnableViewState="False" CssClass="input-md" Width="80">
                                        <asp:ListItem Value="news" Selected="True">文章</asp:ListItem>
                                        <asp:ListItem Value="messageboard">留言本</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="SearchTypeSelectBox" runat="server" EnableViewState="False" CssClass="input-md" Width="80">
                                        <asp:ListItem Value="pkid">编号</asp:ListItem>
                                        <asp:ListItem Value="intacttitle" Selected="True">标题</asp:ListItem>
                                        <asp:ListItem Value="content">内容</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:TextBox ID="SearchStrTextBox" runat="server" CssClass="input-md w3" notNull="true" msgName="搜索内容" MaxLength="100"></asp:TextBox>
                                    <asp:Button ID="btnSerach" class="btn btn-sm btn-primary" runat="server" Text="搜 索" OnClientClick="return checkAll();" OnClick="Btn_Click" />
                                </div>
                            </div>
                            <div class="function-bd">
                                <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
                                <asp:HiddenField ID="hfidstr" runat="server" />
                                <asp:HiddenField ID="hftitlestr" runat="server" />
                                <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting"
                                    OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" EmptyDataText="暂无数据..." OnSorting="GridView1_Sorting">
                                    <Columns>
                                        <asp:BoundField DataField="pkId" HeaderText="编号"  SortExpression="pkId" />
                                        <asp:TemplateField HeaderText="标题" SortExpression="intactTitle">
                                            <ItemTemplate>
                                                <asp:Label ID="V" Visible="false" runat="server" Text="[过期]" ForeColor="Red"></asp:Label>
                                                <asp:Label ID="D" Visible="false" runat="server" Text="[抄]" ForeColor="Red"></asp:Label>
                                                <asp:Label ID="L" Visible="false" runat="server" Text="[链]" ForeColor="Red"></asp:Label>
                                                <span data-placement="right" data-rel="popover" data-content="<%# Eval("intactTitle") %>" data-trigger="hover">
                                                    <asp:HyperLink ID="intactTitle" runat="server" Visible="false" Text='<%# Eval("intactTitle") %>' Target="_blank" NavigateUrl='<%# Eval("pkId", "../newsInfo.aspx?pkId={0}") %>'>
                                                    </asp:HyperLink>
                                                    <asp:HyperLink ID="messageboardTitle" runat="server" Visible="false" onclick='<%#"javascript:showDetail("+Eval("pkId")+")"%>' Text='<%# Eval("intactTitle") %>' NavigateUrl="javascript:#">
                                                    </asp:HyperLink>
                                                </span>
                                                <asp:Panel ID="StaticDiv" runat="server" data-rel="popover" data-trigger="hover" data-placement="right" data-content="可能此条信息未审核通过或者设置了浏览权限、用户等级、链接标题等功能则不会静态化。" Visible="false" Style="display: inline-block;">
                                                    <i class="fa fa-question-circle bigger-120 blue"></i>
                                                </asp:Panel>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="所属栏目" SortExpression="menuName">
                                            <ItemTemplate>
                                                <asp:Label ID="menuLabel" runat="server" Text='<%# Eval("menuName") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="发布人" SortExpression="fullName">
                                            <ItemTemplate>
                                                <span data-placement="right" data-rel="popover" data-content="<%# "发布IP："+Eval("updateIp") %>" data-trigger="hover"><%# Eval("fullName") %></span>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="发布时间" ItemStyle-Width="100px" SortExpression="updateTime">
                                            <ItemTemplate>
                                                <span data-placement="right" data-rel="popover" data-content="<%# Eval("updateTime") %>" data-trigger="hover">
                                                    <asp:Label ID="lbtime" runat="server" Text='<%# Eval("updateTime", "{0:yyyy-M-d}") %>'></asp:Label>
                                                </span>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="click" HeaderText="阅读" SortExpression="click"></asp:BoundField>
                                        <asp:TemplateField HeaderText="审核" SortExpression="passed">
                                            <ItemTemplate>
                                                <asp:Label ID="lbpassed" runat="server" Text='<%# Eval("passed").ToString().Trim() == "0" ? "待审" : (Eval("passed").ToString().Trim() =="1" ? "通过" : "不通过") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                                            <ItemTemplate>
                                                <div class="action-buttons">
                                                    <asp:LinkButton ID="edit" runat="server" Visible="false" CommandName="edit" CommandArgument='<%#Eval("pkId") +"&"+Eval("Code")+"&"+Eval("bigClassId")+"&"+Eval("sourceMenuId") %>' data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                                                    <asp:HyperLink ID="edit2" runat="server" CssClass="FBox" Visible="false" data-toggle="tooltip" data-placement="bottom" title="编辑" ><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:HyperLink>
                                                    <asp:LinkButton ID="edit1" runat="server" data-toggle="tooltip" data-placement="bottom" title="很抱歉，您没有权限编辑" Visible="false" Enabled="false"><i class="ace-icon fa fa-pencil bigger-120 grey"></i></asp:LinkButton>
                                                    <asp:LinkButton ID="del" runat="server" Visible="false" CommandName="del" CommandArgument='<%#Eval("pkId")+"&"+Eval("Code") %>' data-toggle="tooltip" data-placement="bottom" title="删除" OnClientClick="javascript:return window.confirm('注意！您确定要删除此信息吗？');"><i class="ace-icon fa fa-trash-o bigger-120 red" ></i></asp:LinkButton>
                                                    <asp:LinkButton ID="del1" runat="server" CssClass="FBox3" data-toggle="tooltip" data-placement="bottom" title="对不起，您没有权限删除" Visible="false" Enabled="false"><i class="ace-icon fa fa-trash-o bigger-120 grey" ></i></asp:LinkButton>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <%--<asp:BoundField Visible="False" DataField="useListTitle" HeaderText="useListTitle"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="listTitle" HeaderText="listTitle"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="Code" HeaderText="TemplateCode"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="bigClassId" HeaderText="bigClassId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="sourceMenuId" HeaderText="menuId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="isDuplicated" HeaderText="isDuplicated"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="duplicatedPkId" HeaderText="duplicatedPkId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="usersId" HeaderText="usersId"></asp:BoundField>
                                    <asp:BoundField DataField="isStatic" Visible="false" HeaderText="是否静态化"></asp:BoundField>
                                    <asp:BoundField DataField="staticUrl" Visible="false" HeaderText="静态化URL"></asp:BoundField>--%>
                                    </Columns>
                                </asp:GridView>
                                <div class="grid-pager">
                                    <uc1:pageNavi runat="server" id="pageNavi" dataCtlName="GridView1" />
                                </div>
                                <!--[if lte IE 7]></div><![endif]-->
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--#include file = "../Css/foot.htm" -->
    <script language="javascript" type="text/javascript">
        function checkAll() {
            //验证
            return checkAllValidate();
        }

        //设置“最近发布”的样式为选中效果。
        document.getElementById("search").className = "active";

        //留言本打开留言详细信息页面
        function showDetail(pkId) {
            w = 510;
            h = 500;
            LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0;
            TopPosition = (screen.height) ? (screen.height - h) / 2 : 0;
            settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no';
            window.open("../Wpet/MessageBoardDetail.aspx?pkId=" + pkId, "", settings);
        }

        jQuery(function ($) {
        $(".FBox").click().fancybox({
            'width': 860,
            'height': 585,
            autoSize: false,
            'hideOnOverlayClick': false,
            'transitionIn': 'elastic',
            'transitionOut': 'fade',
            'type': 'iframe',
            'padding': '0'
        });
        });
    </script>
</body>
</html>
