<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageAdmin.aspx.cs" Inherits="Oykx.admin.MessageAdmin" %>

<!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 id="Head1" runat="server">
    <title>留言管理 -
        <%=Resources.zhouxiang.adminTitle %></title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    留言管理
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    <asp:GridView ID="GridView_Message" runat="server" Width="100%" AllowPaging="True"
                        AutoGenerateColumns="False" DataSourceID="ObjectData_Message" SkinID="MID" OnRowCommand="GridView_Message_RowCommand"
                        OnRowDataBound="GridView_Message_RowDataBound">
                        <Columns>
                            <asp:TemplateField HeaderText="留言ID" SortExpression="MID">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("MID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="IP地址" SortExpression="IP">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("IP") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="留言内容" SortExpression="MContent">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("MContent") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="留言时间" SortExpression="MTime">
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("MTime") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否回复" SortExpression="RVisble">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# visble(Eval("RVisble").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="回复内容" SortExpression="RContent">
                                <ItemTemplate>
                                    <asp:Label ID="Label6" title='<%# Eval("RContent") %>' runat="server" Text='<%# strsub(Eval("RContent").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="留言回复" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="huifu"
                                        Text="点击回复" CommandArgument='<%# Bind("MID") %>' ></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" CommandName="del"
                                        ImageUrl="~/admin/image/del.png" Text="删除" CommandArgument='<%# Bind("MID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <asp:Panel ID="Panel" runat="server" Visible="false" >
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td class="td_title">
                        回复留言
                    </td>
                </tr>
                <tr>
                    <td class="tableTd">
                        
                        留言ID:<asp:Label ID="lblliuyanid" runat="server" 
                            style="font-weight: 700; color: #FF0000" Text=""></asp:Label>
                        &nbsp;<asp:TextBox ID="txthuifu" runat="server"></asp:TextBox>
                        &nbsp;<asp:Button ID="Button1" runat="server" Text="提交" 
                            onclick="Button1_Click" />
                        
                        &nbsp;<asp:Label ID="lbltishi" runat="server" style="font-weight: 700; color: #0000FF" 
                            Text=""></asp:Label>
                        
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    友情提示
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp; 1.留言管理里可以看到用户所在位置的IP,可以根据IP得到所在地址.
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp; 2.留言删除后,回复内容也会跟着删除,请谨慎操作.
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp; 3.点击左下角,可以进行分页查看留言.
                </td>
            </tr>
        </table>
    </div>
    <asp:ObjectDataSource ID="ObjectData_Message" runat="server" DeleteMethod="delete"
        SelectMethod="select" TypeName="OykxBLL.MessageManager">
        <DeleteParameters>
            <asp:Parameter Name="MID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
