<%@ Page Language="c#" Inherits="Web.User.AuditingMessageBoard" CodeBehind="AuditingMessageBoard.aspx.cs" %>

<%@ 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">
                     <%--   <ul class="inbox-tabs nav nav-tabs tab-size-bigger tab-space-1" id="inbox-tabs">
                            <!-- #section:pages/inbox.compose-btn -->

                            <li class="dropdown active">
                                <a class="dropdown-toggle" href="#" data-toggle="dropdown">
                                    <i class="pink ace-icon fa fa-tags bigger-130"></i>

                                    <span class="bigger-110">待审信息
														
                                    <i class="ace-icon fa fa-caret-down"></i>
                                        <span class="badge badge-danger" id="addred" runat="server"><%= add %></span>
                                    </span>

                                </a>

                                <ul class="dropdown-menu dropdown-light-blue dropdown-125">
                                    <li id="none" runat="server" visible="False">
                                        <a href="AuditingNews.aspx" data-toggle="tab">
                                            <span>没有需要审核的内容</span>
                                        </a>
                                    </li>

                                    <li id="newsHyper" runat="server" visible="False">
                                        <a href="AuditingNews.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>新闻待审</span>
                                            <span class="badge badge-danger"><%= newsCount %></span>
                                        </a>
                                    </li>

                                    <li id="reviewHyper" runat="server" visible="False">
                                        <a href="AuditingReviews.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>评论待审</span>
                                            <span class="badge badge-danger"><%= reviewsCount %></span>
                                        </a>
                                    </li>

                                    <li id="messageHyper" runat="server" visible="False" class="active">
                                        <a href="AuditingMessageBoard.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>留言待审</span>
                                            <span class="badge badge-danger"><%= messageCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyLink" runat="server" visible="False">
                                        <a href="AuditingLink.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>链接待审</span>
                                            <span class="badge badge-danger"><%= linkCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyLinkGang" runat="server" visible="False">
                                        <a href="AuditingLinkGang.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>链接组待审</span>
                                            <span class="badge badge-danger"><%= linkGangCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyPeople" runat="server" visible="False">
                                        <a href="AuditingPeople.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>人事物信息待审</span>
                                            <span class="badge badge-danger"><%= peopleCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyBoard" runat="server" visible="False">
                                        <a href="AuditingBoard.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>公告待审</span>
                                            <span class="badge badge-danger"><%= boardCount %></span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <!-- /.dropdown -->
                            <li>
                                <a href="infoSearch.aspx" data-toggle="tab" data-target="write">
                                    <i class="pink ace-icon fa fa-envelope bigger-130"></i>
                                    <span class="bigger-110">我的发布</span>
                                </a>
                            </li>
                            <!-- /.li-new-mail -->

                            <!-- /section:pages/inbox.compose-btn -->
                            <li>
                                <a href="myDraft.aspx" data-toggle="tab" data-target="inbox">
                                    <i class="blue ace-icon fa fa-inbox bigger-130"></i>
                                    <span class="bigger-110">我的草稿</span>
                                </a>
                            </li>

                            <li>
                                <a href="search.aspx" data-toggle="tab" data-target="sent">
                                    <i class="orange ace-icon fa fa-location-arrow bigger-130"></i>
                                    <span class="bigger-110">站内搜索</span>
                                </a>
                            </li>
                        </ul>--%>
                    <uc1:AuditingNav runat="server" id="AuditingNav" />
                    <div class="bd tab-content">
                        <div class="page-header clearfix">
                            <div class="pull-left col-xs-6">
                                <asp:Button ID="btnSave" runat="server" class="btn btn-sm btn-primary" Text="保 存" OnClick="Btn_Click"></asp:Button>
                                &emsp;
                    <asp:Button ID="btnPass" runat="server" class="btn btn-sm btn-primary" Text="通 过" OnClick="Btn_Click" />
                                &emsp;
                    <asp:Button ID="btnNopass" runat="server" class="btn btn-sm btn-primary" Text="不通过" OnClick="Btn_Click" />
                                &emsp;
                    <asp:Label ID="lbTip" runat="server" ForeColor="Red" Text=""></asp:Label>
                                <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>
                        </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" EnableModelValidation="True" AutoGenerateColumns="false" CssClass="table table-striped table-bordered table-hover table-sorting"
                                 OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" EmptyDataText="暂无数据..." OnSorting="GridView1_Sorting" AllowSorting="true">
                                <Columns>
                                    <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
                                    <asp:TemplateField HeaderText="标题" SortExpression="title" >
                                        <ItemTemplate>
                                            <span data-placement="right" data-rel="popover" data-content="<%# Eval("title") %>" data-trigger="hover">
                                                <asp:HyperLink ID="intactTitle" onclick='<%#"javascript:showDetail("+ Eval("pkId")+")"%>'
                                                    runat="server" Text='<%# Eval("title") %>'
                                                    NavigateUrl="javascript:void(0);">
                                                </asp:HyperLink>
                                            </span>
                                            <asp:Label ID="content" runat="server" Text='<%# Eval("content") %>' Visible="false"></asp:Label>
                                        </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="author" >
                                        <ItemTemplate>
                                            <span data-placement="right" data-rel="popover" data-content="<%# "发布IP："+ Eval("updateIp") %>" data-trigger="hover">
                                                <%# Eval( "author") %></span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="留言时间" 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:TemplateField HeaderText="保密" SortExpression="isSecrecy" >
                                        <ItemTemplate>
                                            <asp:DropDownList ID="isSecrecy" runat="server" SelectedValue='<%# Eval("isSecrecy") %>' Enabled="False">
                                                <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                                <asp:ListItem Value="1">保密</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="click" HeaderText="点击量" SortExpression="click"  />
                                    <asp:BoundField HeaderText="回复状态"  />
                                    <asp:TemplateField HeaderText="固顶" SortExpression="isTop" >
                                        <ItemTemplate>
                                            <asp:DropDownList ID="isTop" runat="server" SelectedValue='<%# Eval("isTop") %>'>
                                                <asp:ListItem Value="0" Selected="True">取消</asp:ListItem>
                                                <asp:ListItem Value="1">固顶</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="显示等级"  SortExpression="gradeId">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="gradeDrop" runat="server" DataSource="<%# dt_grade %>" SelectedValue='<%# Eval("gradeId") %>'
                                                DataTextField="name" DataValueField="pkId">
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="浏览权限" SortExpression="gate" >
                                        <ItemTemplate>
                                            <asp:DropDownList ID="gate" runat="server" SelectedValue='<%#Eval("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:TemplateField>
                                    <asp:TemplateField HeaderText="管理" ItemStyle-Width="100px">
                                        <ItemTemplate  >
                                            <div class="action-buttons">
                                                <asp:HyperLink ID="edit" CssClass="FBox" runat="server"  CommandName="edit" data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="ace-icon fa fa-pencil bigger-120 blue"></i></asp:HyperLink>
                                                <%-- <asp:LinkButton ID="edit1" CssClass="FBox3" 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="move" runat="server" data-toggle="tooltip" Visible="false" data-placement="bottom" title="移动"><i class="ace-icon fa fa-exchange bigger-120 pink"></i></asp:LinkButton>
                                                <asp:LinkButton ID="move1" runat="server"  data-toggle="tooltip" data-placement="bottom" title="对不起，您没有权限移动" Visible="false" Enabled="false"><i class="ace-icon fa fa-exchange bigger-120 grey" ></i></asp:LinkButton>
                                                <asp:LinkButton ID="del" runat="server"  CommandName="del" data-toggle="tooltip" CommandArgument='<%#Eval("pkId") %>' data-placement="bottom" Visible="false" title="删除"><i class="ace-icon fa fa-trash-o bigger-120 red"  title="删除"></i></asp:LinkButton>
                                                <asp:LinkButton ID="del1" runat="server"  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="grade" HeaderText="等级"  />
                                    <asp:TemplateField Visible="False">
                                        <ItemTemplate>
                                            <asp:Label ID="ContentLabel" runat="server" Text='<%#Eval("retime") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField Visible="False" DataField="sourceMenuId" HeaderText="menuId" />
                                    <asp:BoundField DataField="bigClassId" HeaderText="bigClassId" Visible="False" />

                                </Columns>
                            </asp:GridView>
                            
                            <div class="grid-pager">
                                <uc1:pageNavi runat="server" id="pageNavi" dataCtlName="GridView1" />
                            </div>
                            <!--[if lte IE 7]></div><![endif]-->
                        </div>
                        <!--/function-bd-->
                    </div>
                </form>
                <!--/bd-->
               <%-- <div class="ft">
                    <div class="pagination">
                        <asp:Label ID="showPage" runat="server"></asp:Label>
                    </div>
                </div>--%>
            </div>
        </div>
    </div>
    <!--#include file = "../Css/foot.htm" -->
      <script type="text/javascript">
          //防止用户误操作
          jQuery(function ($) {
              $('#AuditingNav_messageHyper').addClass('active');
              
              $("#btnSave").click(function () {
                  //return confirm("您确定要保存列表吗？");
                  return GridSelectCheck('GridView1', true);
              });

              $("#btnPass").click(function () {
                  return GridSelectCheck('GridView1', true);
              });
              $("#btnNopass").click(function () {
                  return GridSelectCheck('GridView1', true);
              });


          });

          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);

          }

          function CallMoveSubmit() {
              $("#btnMoveSave").click();
          }

          //单个移动
          function MoveSave(menuID, oid) {
              //改用弹出层，因为201409发布的最新ghome开始不支持showModalDialog()
              $.fancybox({
                  'type': 'iframe',
                  'width': 400,
                  'height': 350,
                  autoSize: false,
                  'hideOnOverlayClick': false,
                  'href': 'MoveSaveForSingle.aspx?menuID=' + menuID + '&oid=' + oid
              });
              //showModalDialog("MoveSaveForSingle.aspx?menuID=" + menuID + "&oid=" + oid, window, "dialogWidth:420px; dialogHeight:350px; status:0");
          };

          $(".FBox").click().fancybox({
              'width': 860,
              'height': 585,
              autoSize: false,
              'hideOnOverlayClick': false,
              'transitionIn': 'elastic',
              'transitionOut': 'fade',
              'type': 'iframe',
              'padding': '0'
          });

          //选中背景特效
          //$(function () {
          //    $('.text-center input').click(function () {
          //        $(this).parents('tr').toggleClass('active');
          //    })
          //    $('.title.text-center input').click(function () {

          //        if ($('.list-table tr:first').hasClass('active')) {
          //            $('.list-table tr').addClass('active');
          //        } else {
          //            $('.list-table tr').removeClass('active');
          //        }
          //    })
          //    $('.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;
          //            }
          //        }
          //    })
          //})
    </script>
</body>
</html>
