<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.ConsoleLog" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<%@ Register TagPrefix="user" Namespace="UserCenter.Controls" Assembly="UserCenter.Pages" %>
<%@ Register TagPrefix="site" Namespace="SiteServer.Controls" Assembly="SiteServer.Controls" %>

<html>
<head>
<!--#include file="../inc/html_head.inc"-->
<user:custom type="style" runat="server"></user:custom>

<bairong:Code type="Prototype" runat="server" />
<bairong:Code type="Scriptaculous" runat="server" />

<meta http-equiv="content-type" content="text/html;charset=gb2312">
</head>
<body>

<form id="myForm" style="margin:0" runat="server">
<bairong:Message runat="server"></bairong:Message>
<DIV class="column">
<div class="columntitle">管理系统日志</div>

		<ASP:DataGrid id="MyDataGrid" runat="server"
			Width="100%"
			Align="center"
			ShowHeader="true"
			ShowFooter="false"
			CellPadding="2"
			AllowPaging="true"
			BorderWidth="0"
AutoGenerateColumns="false"
			DataKeyField="LogID"
			OnPageIndexChanged="MyDataGrid_Page"
			OnItemDataBound="MyDataGrid_ItemBound"
			HeaderStyle-CssClass="summary-title"
			ItemStyle-CssClass="tdbg"
			CellSpacing="2" >
		<HeaderStyle HorizontalAlign="center" Height="25" />
		<EditItemStyle CssClass="tdbg-dark" />
		<ItemStyle Height="25"/>
		<PagerStyle Mode="NumericPages" PageButtonCount="10" HorizontalAlign="Right" />
	
		<Columns>
			<asp:TemplateColumn
				HeaderText="用户登录名">
				<ItemTemplate>
					<font color="<%#GetForeColor((string)DataBinder.Eval(Container.DataItem, "IsSuccessed"))%>"><%#DataBinder.Eval(Container.DataItem, "LogUserName")%></font>
				</ItemTemplate>
				<ItemStyle Width="250" HorizontalAlign="left"/>
			</asp:TemplateColumn>
			<asp:TemplateColumn
				HeaderText="用户登录IP">
				<ItemTemplate>
					<font color="<%#GetForeColor((string)DataBinder.Eval(Container.DataItem, "IsSuccessed"))%>"><%#DataBinder.Eval(Container.DataItem, "LogIP")%></font>
				</ItemTemplate>
				<ItemStyle Width="150" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn
				HeaderText="操作系统">
				<ItemTemplate>
					<font color="<%#GetForeColor((string)DataBinder.Eval(Container.DataItem, "IsSuccessed"))%>"><%#DataBinder.Eval(Container.DataItem, "OS")%></font>
				</ItemTemplate>
				<ItemStyle Width="150" HorizontalAlign="center" />
			</asp:TemplateColumn>
			
			<asp:TemplateColumn HeaderText="成功登录">
				<ItemTemplate>
				<font color="<%#GetForeColor((string)DataBinder.Eval(Container.DataItem, "IsSuccessed"))%>">
					<%#GetTrueOrFalseImageHtml((string)DataBinder.Eval(Container.DataItem,"IsSuccessed"))%>
				</ItemTemplate>
				<ItemStyle Width="100" HorizontalAlign="center" />
			</asp:TemplateColumn>
		
			<asp:TemplateColumn
				HeaderText="登录时间">
				<ItemTemplate>
					<font color="<%#GetForeColor((string)DataBinder.Eval(Container.DataItem, "IsSuccessed"))%>"><%#DataBinder.Eval(Container.DataItem, "LoginDate")%></font>
				</ItemTemplate>
				<ItemStyle Width="200" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn
				HeaderText="<input type=&quot;checkbox&quot; onclick=&quot;_checkFormAll(this.checked)&quot;>">
				<ItemTemplate>
				<input type="checkbox" name="LogIDCollection" value='<%#DataBinder.Eval(Container.DataItem, "LogID")%>' />
				</ItemTemplate>
				<ItemStyle Width="20" HorizontalAlign="center"/>
			</asp:TemplateColumn>
		</Columns>
	</ASP:DataGrid>

	
</DIV>

<table width="95%" align="center">
	<tr>
		<td align="right">
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td>
							<asp:LinkButton ID="pageFirst" OnClick="NavigationButtonClick" CommandName="FIRST" Runat="server">首页</asp:LinkButton>
							| 
							<asp:LinkButton ID="pagePrevious" OnClick="NavigationButtonClick" CommandName="PREVIOUS" Runat="server">前页</asp:LinkButton>
							| 
							<asp:LinkButton ID="pageNext" OnClick="NavigationButtonClick" CommandName="NEXT" Runat="server">后页</asp:LinkButton>
							| 
							<asp:LinkButton ID="pageLast" OnClick="NavigationButtonClick" CommandName="LAST" Runat="server">尾页</asp:LinkButton>
						</td>
						<td align="right">
							分页 <asp:Label Enabled=False Runat=server ID="currentPage" />
						</td>
					</tr>
					<tr><td>
						<br>
						<asp:Button class="button" id="Delete" OnClick="Delete_OnClick" Text="删除" runat="server" />						&nbsp;
						<asp:Button class="button" id="DeleteAll" OnClick="DeleteAll_OnClick" Text="删除全部" runat="server" />
					</td></tr>
				</table>
		</td>
	</tr>
</table>

</form>

</body>
</html>