<%@ page language="C#" autoeventwireup="true" inherits="admin_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="admin.css" rel="stylesheet" type="text/css" />
</head>
<script language="javascript">
function javehf()
{
hfone.style.display="";
hftwo.style.display="";
}
</script>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="all" runat="server" Height="50px" Width="100%" Visible="false">
           <asp:GridView OnPageIndexChanging="GridView1_PageIndexChanging" ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                ForeColor="#333333" GridLines="None" Width="100%" CellPadding="4" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="留言主题">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=edit&id=<%#Eval("id") %>'>
                                <%#Eval("titlel").ToString()%>
                            </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:BoundField DataField="user" HeaderText="留言人" />
                    <asp:TemplateField HeaderText="回复内容">
                        <ItemTemplate>
                            <a style="color: Red">
                                <%#Eval("hfcontent")%>
                            </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:GridView OnPageIndexChanging="GridView2_PageIndexChanging" ID="GridView2" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                ForeColor="#333333" GridLines="None" Width="100%" CellPadding="4" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="留言主题">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=edit&id=<%#Eval("id") %>'>
                                <%#Eval("titlel").ToString()%>
                            </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:BoundField DataField="user" HeaderText="留言人" />
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=del&id=<%#Eval("id") %>' onclick="return confirm('删除将不可恢复，您真的要删除吗？')">
                                删除</a></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审核">
                        <ItemTemplate>
                            <a href='leaveword.aspx?action=sh&id=<%#Eval("id") %>'>
                                通过</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>
        <asp:Panel ID="hf" runat="server" Height="50px" Width="100%" Visible="false">
            <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1">
                <tr>
                    <td  class="bt" style="text-align: center; height: 52px;" colspan="2">
                        回复留言</td>
                </tr>
                <tr>
                    <td style="width: 63px" >
                        留言主题：</td>
                    <td >
                        <asp:Literal ID="titlel" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="width: 63px">
                        留言内容：</td>
                    <td>
                        <asp:Literal ID="lycontent" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="width: 63px">
                        留言时间：</td>
                    <td>
                        <asp:Literal ID="sj" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="width: 63px">
                        留言人：</td>
                    <td>
                        <asp:Literal ID="user" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="width: 63px">
                        回复内容：</td>
                    <td>
                        <FCKeditorV2:FCKeditor ID="content" runat="server" BasePath="~/FCKeditor/" EnableSourceXHTML="true"
                            EnableXHTML="true" Height="300px" ToolbarSet="self">
                        </FCKeditorV2:FCKeditor>
                    </td>
                </tr>
                <tr id="hfone" style="display:none;">
                    <td style="width: 63px">
                        回复时间：</td>
                    <td>
                        <asp:Literal ID="hfsj" runat="server"></asp:Literal></td>
                </tr>
                <tr id="hftwo" style="display:none;">
                    <td style="width: 63px">
                        回复人：</td>
                    <td>
                        <asp:Literal ID="hfr" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="text-align: center" colspan="2">
                        <asp:Literal ID="java" runat="server"></asp:Literal>
                        <asp:Button ID="addhf" runat="server" Text="回复" OnClick="addhf_Click" Width="100px" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pz" runat="server" Height="50px" Width="100%" Visible="false">
            <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1">
                <tr>
                    <td class="bt" style="text-align: center; height: 39px;" colspan="2">
                        留言反馈参数配置</td>
                </tr>
                <tr>
                    <td style="width: 141px">
                        是否开启匿名留言：</td>
                    <td>
                        <asp:DropDownList ID="niming" runat="server">
                            <asp:ListItem Value="yes">开启</asp:ListItem>
                            <asp:ListItem Value="no">关闭</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td style="width: 141px" >
                        每页显示多少条：</td>
                    <td >
                        <asp:TextBox ID="pagesize" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 141px">
                        表格样式：</td>
                    <td>
                        <asp:TextBox ID="lytablestyle" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;">
                        <asp:Button ID="save" runat="server" Text="保存配置" Width="100px" OnClick="save_Click" /></td>
                </tr>               
            </table>
        </asp:Panel>    
    </div>
    </form>
</body>
</html>
