<%@ page language="C#" autoeventwireup="true" inherits="user_leaveword, aoshuosoft" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!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 href="user.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="addedit" runat="server" Height="50px" Width="100%" Visible="false">
            <table class="usertable" border="0" cellpadding="3" cellspacing="1" >
                <tr class="bt">
                    <td colspan="2" style="height: 35px; text-align: center">
                        发表留言</td>
                </tr>
                <tr>
                    <td style="width: 66px" >
                        主题：</td>
                    <td>
                        <asp:TextBox ID="titlel" runat="server" Width="309px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 66px" >
                        内容：</td>
                    <td >
                        <FCKeditorV2:FCKeditor ID="content" runat="server" BasePath="~/FCKeditor/" EnableSourceXHTML="true"
                            EnableXHTML="true" Height="300px" ToolbarSet="self">
                        </FCKeditorV2:FCKeditor>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                        <asp:Button ID="add" runat="server" Text="提交" Width="100px" OnClick="add_Click" />
                        <asp:Button ID="edit" runat="server" Text="修改" Width="101px" OnClick="edit_Click" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel OnPageIndexChanging="GridView1_PageIndexChanging" ID="allleaveword" runat="server" Height="50px" Width="100%" Visible="false">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ForeColor="#333333"
                GridLines="None" Width="100%" AllowPaging="True" CellPadding="4" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="留言主题">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=edit&id=<%#Eval("id") %>'>
                                <%#Eval("titlel")%>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="留言内容">
                        <ItemTemplate>
                            <a>
                                <%#Eval("content").ToString()%>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="留言时间">
                        <ItemTemplate>
                            <a>
                                <%#Eval("sj") %>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="回复内容">
                        <ItemTemplate>
                            <a style="color: Red">
                                <%#Eval("hfcontent").ToString()%>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="查看修改">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=edit&id=<%#Eval("id") %>'>查看修改</a></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=del&id=<%#Eval("id") %>' onclick="return confirm('删除将不可恢复，您真的要删除吗？')">
                                删除</a></ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:Literal ID="tj" runat="server"></asp:Literal></asp:Panel>
        </div>
    </form>
</body>
</html>
