<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Page CodeBehind="admin_log.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.admin_log" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>共享管理</title>
		
		<link href="img/main.css" rel="stylesheet" type="text/css">
			<style type="text/css">
.style1 { FONT-WEIGHT: bold; COLOR: #ffffff }
.style2 { FONT-WEIGHT: bold; COLOR: #ffffff }
		</style>
			<script language="JAVASCRIPT">
function checkAll()
{
	var objID=document.getElementsByTagName("input");
	for (var i=0 ;i<objID.length;i++)
	{
		if (objID[i].type=="checkbox")
		{
			if(objID[i].checked)
			{
				objID[i].checked=false;
				document.all.CheckBox2.checked=false;
				AddRemoveValues(objID[i]); 
				
			}
			else
			{
				objID[i].checked=true;
				document.all.CheckBox2.checked=true;
				AddRemoveValues(objID[i]);
			}
		}
	}
}
function AddRemoveValues(oChk) { 
if(oChk.checked)
Form1.HdnSelectedValues.value += "," + oChk.value; 
else
Form1.HdnSelectedValues.value = Form1.HdnSelectedValues.value.replace("," + oChk.value,""); 
}
			</script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb"
				height="27">
				<tr>
					<td colSpan="3" class="td_title">搜索日志
					</td>
				</tr>
				<tr class="tableTd">
					<td>关键字：<input name="username" type="text" size="20" id="key" class="tableTdtext" runat="server">
						关键字匹配：
						<select name="type" id="type" runat="server">
							<option value="0" selected>全部列</option>
							<option value="1">栏目</option>
							<option value="2">事件</option>
							<option value="3">IP</option>
							<option value="4">操作人</option>
						</select>
						<asp:Button ID="Submit1" runat="server" Width="70px" class="formbutton" Text=" 搜 索 " onclick="Submit1_Click"></asp:Button></td>
				</tr>
			</table>
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb"
				height="27">
				<tr>
					<td colSpan="3" class="td_title">管理日志（点击表头可升降排序）
					</td>
				</tr>
			</table>
			<div align="center">
				<asp:datagrid id="DataGrid" runat="server" CssClass="GridBody" GridLines="None" AutoGenerateColumns="False"
					Width="100%" PageSize="20" AllowSorting="True">
					<AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
					<ItemStyle CssClass="GridItem"></ItemStyle>
					<HeaderStyle CssClass="GridHead"></HeaderStyle>
					<Columns>
						<asp:TemplateColumn HeaderText="选择">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<HeaderTemplate>
								<INPUT type="checkbox" id="CheckBox2" onClick="checkAll()">
							</HeaderTemplate>
							<ItemTemplate>
								<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=chkSelect runat="server">
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
						<asp:BoundColumn DataField="ActionPostion" SortExpression="ActionPostion" HeaderText="栏目">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="Action" SortExpression="Action" HeaderText="事件">
							<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="ActionTime" SortExpression="ActionTime" HeaderText="操作时间">
							<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="IP" SortExpression="IP" HeaderText="IP">
							<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="ActionUser" SortExpression="ActionUser" HeaderText="操作人">
							<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
					</Columns>
					<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
				</asp:datagrid>
				<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
					<tr>
						<td height="25"><webdiyer:AspNetPager id="Pager" runat="server" PageSize="20" AlwaysShow="True" ShowCustomInfoSection="Left"
								NumericButtonCount="15" HorizontalAlign="Right" ShowBoxThreshold="21" FirstPageText="<font face=webdings>9</font>"
								PrevPageText="<font face=webdings>3</font>" NextPageText="<font face=webdings>4</font>" LastPageText="<font face=webdings>:</font>"
								Height="20px" CssClass="page" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
					</tr>
					<tr>
						<th height="25">
							操作区</th>
					</tr>
					<tr>
						<td align="center">勾选记录：
							<asp:Button ID="btndel" runat="server" Width="50px" CssClass="formbutton" Text="删除" onclick="btndel_Click"></asp:Button>
							&nbsp;&nbsp;
							<asp:Button ID="btndelete" runat="server" Width="70px" CssClass="formbutton" Text="清空日志" onclick="btndelete_Click"></asp:Button>
							<input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server"></td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</HTML>
