<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Master/AdminMP.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyCms.Manage.Comments.Default" %>

<%@ MasterType VirtualPath="~/Manage/Master/AdminMP.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="table_normal" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th>编号</th>
                <th>昵称</th>
                <th>时间</th>
                <th>文章</th>
                <th>内容</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <asp:Repeater ID="rpComments" runat="server">
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("CommentID") %></td>
                        <td><%#Eval("NickName") %></td>
                        <td><%#Eval("CreateTime") %></td>
                        <td><%#Eval("Article.Title") %></td>
                        <td><%#Eval("CContent") %></td>
                        <td><a href="javascript:del(<%#Eval("CommentID") %>);">删除</a> <a href="javascript:setStatus(<%#Eval("CommentID") %>,<%#(Eval("Status").ToString()=="2")?"1":"2" %>);"><%#(Eval("Status").ToString()=="2")?"隐藏":"显示" %></a></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </tbody>
    </table>
    <%=pages %>
    <script>
        function del(id) {
            if (confirm('删除后无法恢复，是否继续？')) {
                document.location = '<%=ResolveUrl("~/Handler/Action.ashx?action=del&target=comment&id=") %>' + id;
            }
        }
        function setStatus(id, status) {
            if (confirm('是否继续？')) {
                document.location = '<%=ResolveUrl("~/Handler/Action.ashx?action=status&target=comment&id=") %>' + id+"&status="+status;
            }
        }
    </script>
</asp:Content>
