<%@ Page Language="c#" Inherits="Web.User.AuditingMessageBoard" CodeBehind="AuditingMessageBoard.aspx.cs" %>
<!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">
    //防止用户误操作
    jQuery(function($) {       
            
            $("#btnSave").click(function() {
                //return confirm("您确定要保存列表吗？");
                return GridSelectCheck('newsGrid', true);
            });

            $("#btnPass").click(function () {
                return GridSelectCheck('newsGrid', true);
            });
            $("#btnNopass").click(function () {
                return GridSelectCheck('newsGrid', 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("../MessageBoardDetail.aspx?pkId=" + pkId, "", settings);

        }
        
    function CallMoveSubmit()
    {
        $("#btnMoveSave").click();
    }
    //单个移动
    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(){
            $('.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;
                    }
                }
            })
        })
    </script>

</head>
<body>
    <form id="form1" method="post" runat="server">
    <div class="list-func-box func-box">
        
        <div class="bd">
            <div class="function-hd">
                <div class="workbench">
                    <a class="active" href="AuditingNews.aspx"><i class="check"></i>待审信息<i class="arrow"></i></a>
                    <a href="infoSearch.aspx" target="funcFrame"><i class="publish"></i>最近发布<i class="arrow"></i></a>
                    <a href="javascritp:void(0);"><i class="draft"></i>草稿箱<i class="arrow"></i></a>
                    <%--<a href="javascritp:void(0);"><i class="timing"></i>定时发布<i class="arrow"></i></a>--%>
                    <a href="search.aspx" target="funcFrame"><i class="sitesearch"></i>站内搜索<i class="arrow"></i></a>
                </div>
                <div class="action-field">
                    <asp:Button ID="btnSave" runat="server" class="btn" Text="保 存" OnClick="save_Click"></asp:Button>&nbsp;&nbsp;
                    <asp:Button ID="btnPass" runat="server" class="btn" Text="通 过" OnClick="btnPass_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnNopass" runat="server" class="btn" Text="不通过" OnClick="btnNopass_Click" />&nbsp;
                    
                    <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>
                    &nbsp;&nbsp;&nbsp;
                    <asp:HyperLink ID="newsHyper" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingNews.aspx" Visible="False"></asp:HyperLink>
                    <asp:HyperLink ID="reviewHyper" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingReviews.aspx" Visible="False"></asp:HyperLink>
                    <asp:HyperLink ID="hyLink" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingLink.aspx" Visible="False"></asp:HyperLink>
                    <asp:HyperLink ID="hyPeople" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingPeople.aspx" Visible="False"></asp:HyperLink>
                    <asp:HyperLink ID="hyBoard" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingBoard.aspx" Visible="False"></asp:HyperLink>
                    <asp:HyperLink ID="hyLinkGang" runat="server" CssClass="fn-fr" Font-Underline="True" NavigateUrl="AuditingLinkGang.aspx" Visible="False"></asp:HyperLink>
                </div>
            </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" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="list-table" onitemcommand="newsGrid_ItemCommand">
                <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:HyperLink ID="intactTitle" onclick='<%#"javascript:showDetail("+DataBinder.Eval(Container, "DataItem.pkId")+")"%>'
                                runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.title") %>' ToolTip='<%# DataBinder.Eval(Container, "DataItem.title") %>'
                                NavigateUrl="javascript:void(0);">
                            </asp:HyperLink>
                            <asp:Label ID="content" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.content") %>' Visible="false"></asp:Label>
                        </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.author") %>'
                                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='<%# DataBinder.Eval(Container, "DataItem.updateTime", "{0:yyyy-M-d}") %>' ToolTip='<%# Eval("updateTime") %>'></asp:Label></a>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="保密" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:DropDownList ID="isSecrecy" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.isSecrecy") %>' Enabled="False">
                                <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:BoundColumn 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="gradeDrop" runat="server" DataSource="<%# dv %>" SelectedValue='<%# Eval("gradeId") %>'
                                DataTextField="name" DataValueField="pkId">
                            </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="javascript:void(0);" onclick="javascript:MoveSave(<%#Eval("sourceMenuId") %>,<%#Eval("pkId") %>);">移动</a>&nbsp;&nbsp;
                            <asp:LinkButton ID="del" runat="server" CommandName="del">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="grade" HeaderText="等级" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                    <asp:TemplateColumn Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="ContentLabel" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.retime") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="sourceMenuId" HeaderText="menuId"></asp:BoundColumn>
                    <asp:BoundColumn DataField="bigClassId" HeaderText="bigClassId" Visible="False">
                    </asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="是否为问答形式留言" Visible="false" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="IsAskAnswer" runat="server" Text="0"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                </Columns>
            </asp:DataGrid>
            <!--[if lte IE 7]></div><![endif]-->
            </div><!--/function-bd-->
        </div>
        <!--/bd-->
        <div class="ft">
            <div class="pagination">
                <asp:Label ID="showPage" runat="server">Label</asp:Label>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
