<%@ page language="C#" autoeventwireup="true" inherits="admin_info_CommentList, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.BLL" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script src="../../js/Common.js" type="text/javascript"></script>

    <script src="../../js/<%=B_Lang.getLang() %>/SelectCheckBox.js" type="text/javascript"></script>

    <script type="text/javascript">
        function url(id) {
            switch (id) {
                case 0:
                    window.location.href = "CommentList.aspx";
                    break;
                case 2:
                case 1:
                    window.location.href = "CommentList.aspx?TypeId=" + id + "";
                    break;
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> 用户评论列表
            </td>
        </tr>
    </table>
    <table class="tabs" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td id="TabTitle0" class="title6" runat="server" onclick="url(0)">
                所有评论
            </td>
            <td id="TabTitle1" class="title5" runat="server" onclick="url(1)">
                已审核评论
            </td>
            <td id="TabTitle2" class="title5" runat="server" onclick="url(2)">
                未审核评论
            </td>
            <td class="titleline">
                &nbsp;
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table align="center" cellpadding="2" cellspacing="1" width="99%" class="border">
                <asp:Repeater ID="RepCommentList" runat="server" OnItemCommand="RepCommentList_Delete"
                    OnItemDataBound="RepCommentList_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <table width="99%" cellpadding="2" cellspacing="0" class="dh" style="margin-bottom: 10px;"
                                    align="center">
                                    <tr>
                                        <td class="comment1">
                                            <asp:CheckBox ID="CheckBox1" runat="server" /><asp:TextBox ID="TextBox1" runat="server"
                                                Text='<%# Eval("Id","{0}") %>' Style="display: none"></asp:TextBox>
                                        </td>
                                        <td class="comment1">
                                            <div style="float: left"><span style="padding-left: 5px;"><asp:Literal ID="LitInfo" runat="server"></asp:Literal></span>
                                                <span style="padding-left: 10px;">用户昵称：<asp:Literal ID="LitNickName" runat="server"></asp:Literal></span><span style="padding-left: 10px;">
                                                    IP：<%# Eval("ip","{0}") %></span><span style="padding-left: 10px;">发表于：<%#Eval("AddTime","{0:yyyy-MM-dd}") %></span></div>
                                            <div style="text-align: right; margin-right: 10px; float: right">
                                                <span>
                                                    <asp:Literal ID="LitAllInfoComment" runat="server"></asp:Literal>
                                                    <asp:LinkButton ID="lnkAuditing" runat="server" Text="审核" CommandName="auditing"
                                                        CommandArgument='<%#Eval("Id") %>'></asp:LinkButton> <asp:LinkButton ID="lnkCommend" runat="server" Text="推荐" CommandName="commend" CommandArgument='<%#Eval("Id") %>'></asp:LinkButton><asp:LinkButton ID="lnkCommend2" runat="server" Text="不推荐" CommandName="commend2" CommandArgument='<%#Eval("Id") %>'></asp:LinkButton></span><span style="padding-left: 10px;"><asp:LinkButton
                                                            ID="lnkDelete" runat="server" Text="移除" CommandName="delete" CommandArgument='<%#Eval("Id") %>'
                                                            OnClientClick="return confirm('确定移除该条记录吗?')"></asp:LinkButton></span></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="comment2" colspan="2">
                                            <%#Eval("Content") %>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <table cellpadding="0" cellspacing="1" class="dh2" align="center">
                <tr>
                    <td>
                        <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页"
                            LastPageText="尾页" NextPageText="下一页" PageSize="10" HorizontalAlign="Right" PrevPageText="上一页"
                            showinputbox="Never" UrlPageIndexName="p" UrlPaging="True" ShowCustomInfoSection="Left"
                            Width="99%">
                        </webdiyer:AspNetPager>
                    </td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="1" class="dh2" align="center">
                <tr>
                    <td height="30">
                        <input id="checkDel" onclick="CheckDelBox(this)" type="checkbox"><span id="ShowA">选择全部</span>
                        <asp:Button ID="Button2" runat="server" Text="删除选中记录" CssClass="btn" Style="margin-left: 10px"
                            OnClick="Button2_Click" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
