<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CommentManage.ascx.cs"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Controls.Common.CommentManage" %>
<!-- 显示评论树开始 -->
<script src="<%=Path%>/JS/jsPopup.js" type="text/javascript"></script>

<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='1' 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><asp:Literal ID="Literal1" Text="所有评论" runat="server"></asp:Literal></span></asp:LinkButton>
                </li>
                <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteCreated" />> 
                    <asp:LinkButton ID="LinkDraft" runat="server"  CommandArgument="1"
                        onclick="ShowBookmarks"><span><asp:Literal ID="Literal2" Text="已审核评论" runat="server"></asp:Literal></span></asp:LinkButton>  
                </li>
                <li <pe:ExtendedLiteral HtmlEncode="false" runat="server" ID="EliteUnCreated" />>    
                    <asp:LinkButton ID="LinkPending" runat="server" CommandArgument="2"
                        onclick="ShowBookmarks"><span><asp:Literal ID="Literal3" Text="待审核评论" runat="server"></asp:Literal></span></asp:LinkButton> 
                </li>
            </ul>
        </td>
    </tr>
    <tr>
        <td valign="top" class="tdbg">
            <table border='0' cellpadding='0' cellspacing='1' width='100%' class="border">
                <tr >
                    <td class="tdbg">
                        <div style="text-align: left">
                            <div id="bbs_title">
                                <input name="chkAll1" type="checkbox" id="chkAll1" onclick="CheckAll1(this.form)"
                                    value="checkbox" />
                                <asp:Literal ID="Literal4" Text="标题："
                                    runat="server"></asp:Literal><asp:Label ID="LblTitle" runat="server" Text="Label"></asp:Label>
                            </div>
                            <asp:Repeater ID="RptCommentList" runat="server" OnItemDataBound="RptCommentContent_ItemDataBound">
                                <HeaderTemplate>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <!--中部详细内容-->
                                    <table id="bbs_Main_Center" cellpadding="0" cellspacing="0" width='100%'>
                                        <tr style="min-height:auto !important;height:180px;min-height:180px;">
                                            <!--左侧头像部分-->
                                            <td id="bbs_Main_Center_Face" style="width: 15px;">
                                                <input name="CommentID" type="checkbox" onclick="unselectall()" id="CommentID" value='<%#Eval("CommentID")%>'>
                                            </td>
                                            <td style="width: 150px;">
                                                <table cellpadding="0" cellspacing="3" width="100%">
                                                    <tr align="center" valign="middle">
                                                        <td>
                                                            <asp:Image ID="ImgUserFace" runat="server" /><br />
                                                            <strong>
                                                                <asp:Label ID="LblUserName" runat="server" Text='<%#Eval("UserName") %>'></asp:Label>
                                                            </strong>
                                                        </td>
                                                    </tr>
                                                    <tr align="left">
                                                        <td>
                                                            <asp:Label ID="LblCommentContent" runat="server" Text=""></asp:Label><br />
                                                            <pe:ExtendedLabel ID="LblUserExp" runat="server"></pe:ExtendedLabel>
                                                            <asp:Label ID="LblUserRegTime" runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <!--内容部分部分-->
                                            <td valign="top" id="bbs_Main_Center_Content">
                                                <table cellpadding="0" cellspacing="3" width="100%">
                                                    <tr style="height: 20px">
                                                        <td>
                                                            <table border='0' id="bbs_Main_Cneter_Content_Top" cellpadding='0' cellspacing='3'
                                                                width='100%'>
                                                                <tr>
                                                                    <td>
                                                                        <a href='../Accessories/MessageSend.aspx?UserName=<%#Server.UrlEncode(Eval("UserName").ToString())%>'>
                                                                            <img alt="发送短信" src='<%=Path%>/Images/Comment/message.gif'
                                                                                align="Absmiddle" style="border: 0px;" /></a> <a href='../User/UserShow.aspx?UserId=<%#Eval("UserID")%>'>
                                                                                    <img alt="用户信息" src='<%=Path%>/Images/Comment/profile.gif'
                                                                                        align="Absmiddle" style="border: 0px;" /></a> <a href='mailto:<%#Eval("Email")%>'>
                                                                                            <img alt="邮箱" src='<%=Path%>/Images/Comment/email.gif'
                                                                                                align="Absmiddle" style="border: 0px;" /></a> &nbsp;&nbsp;<asp:Literal ID="Literal15"
                                                                                                    Text="[支持：" runat="server"></asp:Literal><asp:Label
                                                                                                        ID="LblSustain" runat="server" Text="Label" />人
                                                                        反对：<asp:Label ID="LblOppose" runat="server" Text="Label" /><asp:Literal ID="Literal5"
                                                                            Text="人 中立：" runat="server"></asp:Literal><asp:Label
                                                                                ID="LblNeutralismNetizen" runat="server" Text="Label" /><asp:Literal ID="Literal6"
                                                                                    Text="人]" runat="server"></asp:Literal>
                                                                    </td>
                                                                    <td align='right'>
                                                                        <pe:ExtendedLabel HtmlEncode="false" ID="LblNum" runat="server"></pe:ExtendedLabel>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label ID="LblContent" runat="server"></asp:Label>
                                                            <pe:ExtendedLabel ID="LblReply" runat="server"></pe:ExtendedLabel>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td id="bbs_Main_Bottom_Left" colspan="2">
                                                <img src='<%=Path%>/Images/Comment/ip.gif' alt="评论发布时间"
                                                    align="Absmiddle" />
                                                <%#Eval("UpdateTime")%>
                                            </td>
                                            <td id="bbs_Main_Bottom_Center" >
                                                <div style="padding-right: 4px; float: right;">
                                                    <asp:Literal ID="Literal7" Text="操作："
                                                        runat="server"></asp:Literal>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblPKZone" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblPKAgree" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblPKOppose" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblExcerpt" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblRestore" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblDelete" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblAuditing" runat="server" Text=""></pe:ExtendedLabel>
                                                    <pe:ExtendedLabel HtmlEncode="false" ID="LblIsElite" runat="server" Text=""></pe:ExtendedLabel>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                    <div id="Agree<%#Eval("CommentID")%>" style="position: absolute; width: 200px; border: solid 1px black;
                                        background-color: white; display: none;">
                                        <table border='0' cellpadding='0' cellspacing='1' width='100%'>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=1&ItemContent=<%# Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal8Encode)%>"><asp:Literal
                                                        ID="Literal8" Text="精彩一针见血" runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal9Encode)%>"><asp:Literal
                                                        ID="Literal9" Text="观点独到" runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal10Encode)%>"><asp:Literal
                                                        ID="Literal10" Text="说的很对" runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal11Encode)%>"><asp:Literal
                                                        ID="Literal11" Text="你说的有道理"
                                                        runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div id="Oppose<%#Eval("CommentID")%>" style="position: absolute; width: 200px; border: solid 1px black;
                                        background-color: white; display: none;">
                                        <table border='0' cellpadding='0' cellspacing='1' width='100%'>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=-1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal12Encode)%>"><asp:Literal
                                                        ID="Literal12" Text="乱七八糟说什么"
                                                        runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=-1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal13Encode)%>"><asp:Literal
                                                        ID="Literal13" Text="你说的没道理"
                                                        runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    &nbsp;&nbsp;<a href="<%=m_ViewFile%>?Action=AddPKZone&CommentID=<%#Eval("CommentID")%>&GeneralId=<%#Eval("GeneralId")%>&Title=<%#Server.UrlEncode(Request["Title"])%>&RadlPosition=-1&ItemContent=<%#Server.UrlEncode(Resources.DynamicPageResources.Controls_CommentManage_Literal14Encode)%>"><asp:Literal
                                                        ID="Literal14" Text="简直是胡说八道"
                                                        runat="server"></asp:Literal></a>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                                <FooterTemplate>
                                </FooterTemplate>
                            </asp:Repeater>
                        </div>
                    </td>
                </tr>
            </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>
<center>
    <pe:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged">
    </pe:AspNetPager>
</center>
<asp:HiddenField ID="HdnSearchType" runat="server" Value="0" />

<script type="text/javascript">
function addFavorite()
{
    if (document.all)
    {
       window.external.addFavorite(document.location.href,document.title);
    }
    else 
    {
        try
        {
            if (window.sidebar)
            {
                if(!window.sidebar.addPanel(document.location.href,document.title, ""))
                {
                    alert("对不起，您的浏览器不支持收藏此链接！");
                }
            }
        }
        catch(err)
        {
            alert("对不起，您的浏览器不支持收藏此链接！");
        }
    }
}
</script>

