<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Master/AdminMP.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyCms.Manage.Articles.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 style="width:560px;">标题</th>
                <th>分类</th>
                <th>发布日期</th>
                <th>作者</th>
                <th>置顶</th>
                <th>展示次数</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <asp:Repeater ID="rpList" runat="server">
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("ArticleID") %></td>
                        <td style="text-align:left;word-break : break-all;word-wrap: break-word;"><%#Eval("Title") %></td>
                        <td><%#Eval("Category.CategoryName") %></td>
                        <td><%#Eval("CreateTime") %></td>
                        <td><%#Eval("User.LoginID") %></td>
                        <td><%#Eval("IsTop") %></td>
                        <td><%#Eval("ReadCount") %></td>
                        <td><a href="ArticleEdit.aspx?articleid=<%#Eval("ArticleID") %>">编辑</a> <a href="javascript:del(<%#Eval("ArticleID") %>);">删除</a></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </tbody>
    </table>
    <%=pages %>

    <script>
        function del(id){
            if (confirm('删除后无法恢复，是否继续？')) {
                document.location = '<%=ResolveUrl("~/Handler/Action.ashx?action=del&target=article&id=") %>' + id;
            }
        }
    </script>
</asp:Content>
