<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/MasterPage.master"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.CommentManage" CodeBehind="CommentManage.aspx.cs" Title="评论管理" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="Server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="Server">

    <script language="javascript" type="text/javascript">
  function unselectall(){
    if(document.aspnetForm.chkAll.checked){
        document.aspnetForm.chkAll.checked = document.aspnetForm.chkAll.checked&0;
    }
  }
  function CheckAll(form){
  for (var i=0;i <form.elements.length;i++){
      var e = form.elements[i];
      if (e.Name != 'chkAll'&&e.disabled==false)
      e.checked = form.chkAll.checked;
      }
  }
  function CheckAll1(form){
  for (var i=0;i <form.elements.length;i++){
      var e = form.elements[i];
      if (e.Name != 'chkAll1'&&e.disabled==false)
      e.checked = form.chkAll1.checked;
      }
  }
    </script>

    <div style="padding-top: 5px;">
    </div>
    <table border='0' cellpadding='0' cellspacing='0' width='100%'>
        <tr>
            <td id="AdminTabs">
                <ul>
                    <!-- CSS Tabs -->
                    <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteContentList" />>
                        <asp:LinkButton ID="LinkContentList" runat="server"   CommandArgument="0"
                            onclick="ShowBookmarks"><span>所有评论</span></asp:LinkButton>
                    </li>
                    <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteCreated" />> 
                        <asp:LinkButton ID="LinkDraft" runat="server"  CommandArgument="1"
                            onclick="ShowBookmarks"><span>已审核评论</span></asp:LinkButton>  
                    </li>
                    <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteUnCreated" />>    
                        <asp:LinkButton ID="LinkPending" runat="server" CommandArgument="2"
                            onclick="ShowBookmarks"><span>待审核评论</span></asp:LinkButton> 
                    </li>
                    <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteNewContentList" />>    
                        <asp:LinkButton ID="LinkNewContentList" runat="server" CommandArgument="3"
                            onclick="ShowBookmarks"><span>按标题分类显示评论</span></asp:LinkButton> 
                    </li>
                </ul>
            </td>
            <td align="right">
                <asp:DropDownList ID="dropCommentType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dropComment_Changed">
                    <asp:ListItem Text="所有评论" Value="0"></asp:ListItem>
                    <asp:ListItem Text="网站评论" Value="1"></asp:ListItem>
                    <asp:ListItem Text="手机评论" Value="2"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td valign="top" colspan="2" class="tdbg">
                <table cellpadding='0'cellspacing='1' width='100%' class="border">
                            <pe:ExtendedLiteral ID="LblContentHead" HtmlEncode="false" runat="server" Text="" Visible="true" />
                                <asp:Repeater ID="RptCommentList" runat="server" OnItemDataBound="RptCommentManage_ItemDataBound">
                                    <HeaderTemplate>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <pe:ExtendedLabel HtmlEncode="false" ID="LblRestoreBottom" runat="server" Text=""
                                            Visible="false" />
                                        <pe:ExtendedLiteral ID="LblCommentHead" runat="server" Text="" Visible="false" />
                                        <tr class="tdbg" onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
                                            <td style="width: 3%;" align="center">
                                                <input name="CommentID" type="checkbox" onclick="unselectall()" id="CommentID" value='<%#Eval("CommentID")%>'>
                                            </td>
                                            <td  width="10%" align="center">
                                                <pe:DropdownMenu runat="server" ID="ddmenu" ShowShortcut="true">
                                                    <pe:LinkMenuItem ID="LmiCommentReply" runat="server" Enabled="false" />
                                                    <pe:LinkMenuItem ID="LmiCommentModify" SkinID="Edit" runat="server" />
                                                    <pe:LinkMenuItem ID="LmiCommentDel" SkinID="Delete" runat="server" />
                                                    <pe:LinkMenuItem ID="LmiCommentPassed" runat="server" />
                                                </pe:DropdownMenu>
                                            </td>
                                            <td>
                                                <pe:ExtendedLiteral ID="LblContentTitle" runat="server" Text="" />
                                                <pe:ExtendedLiteral ID="LblContent" runat="server" Text="" />
                                            </td>
                                            <pe:ExtendedLabel HtmlEncode="false" ID="LblInfoTitle" runat="server" Text="" Visible="false" />
                                            <pe:ExtendedLabel HtmlEncode="false" ID="LblCommentUpdateTime" runat="server" Text="" Visible="false" />
                                            <pe:ExtendedLabel HtmlEncode="false" ID="LblCommentScore" runat="server" Text="" Visible="false" />
                                            <td style="width: 5%;" align="center"><pe:ExtendedLabel ID="labType" runat="server"></pe:ExtendedLabel></td>
                                            <td style="width: 5%;" align="center">
                                                <pe:ExtendedLabel HtmlEncode="false" ID="LblStatus" runat="server" Text="" />
                                        </tr>
                                        <pe:ExtendedLiteral ID="LblRestoreOperation" HtmlEncode="false" runat="server" Text="" Visible="false" />
                                        <pe:DropdownMenu runat="server" ID="DmRestore" Visible="false">
                                            <pe:LinkMenuItem ID="LmiRestoreModify" SkinID="Edit" runat="server" />
                                            <pe:LinkMenuItem ID="LmiRestoreDel" SkinID="Delete" runat="server" />
                                        </pe:DropdownMenu>
                                        <pe:ExtendedLiteral ID="LblRestoreTitle" HtmlEncode="false" runat="server" Text="" Visible="false" />
                                    </ItemTemplate>
                                    <FooterTemplate>
                                    </FooterTemplate>
                                </asp:Repeater>
                            <pe:ExtendedLiteral ID="LblContentBottom" HtmlEncode="false" runat="server" Text="" Visible="true" />
                    <tr class="tdbg" id="TrPage" runat="server">
                        <td colspan="8">
                        <!-- 显示评论树结束 -->
                        <center>
                            <pe:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged">
                            </pe:AspNetPager>
                        </center>
                        <asp:HiddenField ID="HdnShowType" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <pe:ExtendedLabel HtmlEncode="false" ID="LblCommontBottom2" runat="server" Text="</table></td></tr></table>" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td style="width: 200px; height: 30px;">
                <input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox" />
                选中本页显示的所有评论
            </td>
            <td>
                <asp:Button ID="BtnSubmit1" runat="server" Text="删除选定的评论" OnClick="BtnSubmit1_Click"
                    UseSubmitBehavior="False" OnClientClick="if(!confirm('确定要批量删除评论吗？')){return false;}" />
                <asp:Button ID="BtnSubmit2" runat="server" Text="审核通过选定的评论" OnClick="BtnSubmit2_Click"
                    UseSubmitBehavior="False" />
                <asp:Button ID="BtnSubmit3" runat="server" Text="取消审核选定的评论" OnClick="BtnSubmit3_Click"
                    UseSubmitBehavior="False" />
            </td>
        </tr>
    </table>
    <br />
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td style="width: 80px" align="left" class="tdbg">
                <b>搜索选项：</b>
            </td>
            <td class="tdbg">
                <asp:DropDownList ID="DropSearchType" AutoPostBack="true" OnSelectedIndexChanged="DropSearchType_SelectedIndexChanged" runat="server">
                    <asp:ListItem Value="1" Text="信息标题" />
                    <asp:ListItem Value="2" Text="评论内容" />
                    <asp:ListItem Value="3" Text="评论日期" />
                    <asp:ListItem Value="4" Text="评论人" />
                </asp:DropDownList>
                <asp:TextBox ID="TxtSearchKeyword" runat="server" />
                <pe:DatePicker ID="TxtBeginDate" Visible="false" runat="server"></pe:DatePicker>
                <asp:Label ID="LblTips" Visible="false" runat="server" Text="到"></asp:Label>
                <pe:DatePicker ID="TxtEndDate" Visible="false" runat="server"></pe:DatePicker>
                <asp:Button ID="BtnSearch" runat="server" Text="搜索" OnClick="BtnSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
