<%@ page language="C#" autoeventwireup="true" inherits="Admin_Message_main, App_Web_xrwqa2ul" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>后台留言管理</title>
<script src="../js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/ui/js/ligerBuild.min.js" type="text/javascript"></script>
<link href="../ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="../images/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    //全选取消按钮函数，调用样式如：
    function checkAll(chkobj) {
        if ($(chkobj).find("span b").text() == "全选") {
            $(chkobj).find("span b").text("取消");
            $(".checkall input").attr("checked", true);
        } else {
            $(chkobj).find("span b").text("全选");
            $(".checkall input").attr("checked", false);
        }
    }



    //执行回传函数
    function ExePostBack(objId, objmsg) {
        if ($(".checkall input:checked").size() < 1) {
            $.ligerDialog.warn("对不起，请选中您要操作的记录！");
            return false;
        }
        var msg = "删除记录后不可恢复，您确定吗？";
        if (arguments.length == 2) {
            msg = objmsg;
        }

        $.ligerDialog.confirm(msg, "提示信息", function (result) {
            if (result) {
                __doPostBack(objId, '');
            }
        });
        return false;
    }

</script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MessageBody">
    <!--列表展示.开始-->


    <div class="tools_box">
	    <div class="tools_bar">
            <div class="search_box">
			    <asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="btnSearch" onclick="btnSearch_Click" />
		    </div>
        <%// <asp:LinkButton ID="btnSave" runat="server" CssClass="tools_btn" onclick="btnSave_Click"><span><b class="send">保存排序</b></span></asp:LinkButton> %>
		    <a href="javascript:void(0);" onclick="checkAll(this);" class="tools_btn"><span><b class="all">全选</b></span></a>
    <asp:LinkButton ID="btnDelete" runat="server" CssClass="tools_btn"  OnClientClick="return ExePostBack('btnDelete');" onclick="btnDelete_Click"><span><b class="delete">批量删除</b></span></asp:LinkButton>
        </div>

    </div>


    <asp:Repeater ID="RepeterList" runat="server" onitemcommand="RepeterList_ItemCommand">
    <HeaderTemplate>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
      <tr>
        <th width="6%">选择</th>
        <th align="left"  width="10%">标题</th>
        <th width="6%" align="left">留言人</th>
        <th width="5%" align="left">留言IP</th>
        <th width="10%" align="left">留言时间</th>
        <th width="10%" align="left">回复时间</th>
        <th width="8%">操作</th>
      </tr>
    </HeaderTemplate>
    <ItemTemplate>
      <tr>
        <td align="center">
            <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" />
            <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
        </td>
        <td align="left"><a href="EditMessage.aspx?id=<%#Eval("id")%>"><%#Eval("title")%></a></td>
        <td align="left"><%#Eval("M_user")%></td>
        <td align="left"><%#Eval("M_Ip")%></td>
        <td align="left"><%#Eval("AddTime")%></td>
        <td align="left"><%#Eval("ReyTime")%></td>

        <td align="center"><a href="EditMessage.aspx?id=<%#Eval("id")%>">管理回复</a></td>
      </tr>
    </ItemTemplate>
    <FooterTemplate>
      <%#RepeterList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"7\">暂无记录</td></tr>" : ""%>
      </table>
    </FooterTemplate>
    </asp:Repeater>
    <!--列表展示.结束-->

<table class="pagelist" width="100%" border="0">
     <tbody>
    <tr>
     <td>
     <asp:hyperlink id="lnkPrev" runat="server">上页</asp:hyperlink>
    <asp:hyperlink id="lnkNext" runat="server">下页</asp:hyperlink>
     第<asp:label id="lblCurrentPage" runat="server"></asp:label>页
     共<asp:label id="lblTotalPage" runat="server"></asp:label>页
    </td>
    </tr>
     </tbody>
     </table>

    </div>
    </form>
</body>
</html>
