<%@ Page Language="C#" MasterPageFile="../BloggerAdmin.master" AutoEventWireup="true" CodeBehind="GuestBookManage.aspx.cs" Inherits="Ruiao.WebSite.Blogger.Admin.GuestBook.GuestBookManage" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMainAdmin" Runat="Server">
<form id="MainForm" runat="server">
<div id="ContentTitle"><%=MyTitle %></div>
<div id="ContentBody">
    
    <fieldset class="ContentBox">
    <div class="ContentBox_Head" onclick="BoxSwitch('mcBody','siBody','/Blogger/Admin/Images/Box_')"><div style="float:left;">留言筛选：</div><div id="siBody" class="SwitchIcon_Down"></div></div> 
    <div class="ContentBox_ContentBox" id="mcBody" style="display:none;">
        <div class="ContentBox_ContentItem">
        状态：<asp:DropDownList ID="ddlState" runat="server">
        <asp:ListItem Value="-1">全部</asp:ListItem>
        <asp:ListItem Value="1">公开留言</asp:ListItem>
        <asp:ListItem Value="2">私人留言</asp:ListItem>
        </asp:DropDownList>
        作者：<asp:TextBox ID="tbAuthorName" runat="server" Width="60px"></asp:TextBox>&nbsp;
        <asp:Button ID="btSelectData" runat="server" Text="筛选留言" OnClick="btSelectData_Click" CssClass="LinkButton" />
        </div>
    </div>
	</fieldset>
    <br />	
	
    <asp:Repeater ID="rpGuestBook" runat="server">
    <HeaderTemplate>
    <table id="GuestBookList" class="MainContentTable" cellpadding="3" cellspacing="1">
	<tr class="MainContentList_HeadTR">
		<td class="MainContentList_HeadTD" style="width:30px;">ID</td>
		<td class="MainContentList_HeadTD" style="width:auto;">标题</td>
		<td class="MainContentList_HeadTD" style="width:60px;">状态</td>
		<td class="MainContentList_HeadTD" style="width:120px;">作者</td>
		<td class="MainContentList_HeadTD" style="width:120px;">IP地址</td>
		<td class="MainContentList_HeadTD" style="width:120px;">留言时间</td>
		<td class="MainContentList_HeadTD" style="width:60px;">编辑</td>
		<td class="MainContentList_HeadTD" style="width:60px;">选择</td>
	</tr>
    </HeaderTemplate>
    <ItemTemplate>
    	<tr class="MainContentList_ItemTR">
		<td class="MainContentList_ItemTD"><asp:Label ID="lbID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' /></td>
		<td class="MainContentList_ItemTD" style="text-align:left;">
		<a onclick="Hide('GuestBookBody_<%# DataBinder.Eval(Container, "DataItem.ID")%>')" href="#" title="点击查看该留言"><%# DataBinder.Eval(Container, "DataItem.Title")%></a>
		</td>
		<td class="MainContentList_ItemTD"><%# (DataBinder.Eval(Container, "DataItem.State").ToString() == "2") ? "私人留言" : "公开留言"%></td>
		<td class="MainContentList_ItemTD"><%# DataBinder.Eval(Container, "DataItem.AuthorName")%></td>
		<td class="MainContentList_ItemTD"><%# DataBinder.Eval(Container, "DataItem.AuthorIP")%></td>
		<td class="MainContentList_ItemTD"><%# DataBinder.Eval(Container, "DataItem.AddTime") %></td>
		<td class="MainContentList_ItemTD"><a href="GuestBookEdit<%=ExtensionName %>?GuestBookID=<%# DataBinder.Eval(Container, "DataItem.ID")%>">编辑</a></td>
		<td class="MainContentList_ItemTD"><asp:CheckBox ID="cbxSelect" runat="server" /></td>
	</tr>
	<tr class="MainContentList_ItemTR" id="GuestBookBody_<%# DataBinder.Eval(Container, "DataItem.ID")%>" style="border:1px; display:none;">
	<td colspan="7">
	<div>留言内容: <%# DataBinder.Eval(Container, "DataItem.Body")%></div>
	</td>
	</tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </asp:Repeater>
    
    <div>
    <div style="float:left;">
    <cc1:aspnetpager id="Pager" PageSize="20" runat="server" AlwaysShow='true' OnPageChanged="Pager_PageChanged"></cc1:aspnetpager>
    </div>
    <div style="float:right; padding:5px">
    <asp:Button ID="btDelete" runat="server" OnClick="btDelete_Click" Text="删除所选留言" CssClass="SubmitButton" />
    </div>
    </div>
</div>
<div id="ContentBottom"></div>
</form>
</asp:Content>