<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Admin_Admin.aspx.vb" Inherits="LuckBetBBS.Forum.Web.Admin_Admin" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>Admin_Admin</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="JavaScript">
<!--
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall'&&e.type=="checkbox")
	  e.checked = form.chkall.checked; 
   }
  }
//-->
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
		</FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
		</FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
		</FONT><FONT face="宋体"></FONT>
		<br>
		<%If Request("Action")<>"Authority" Then%>
		<form id="Form1" method="post" runat="server">
			<%Select Case Request("Action")%>
			<%Case "Add","Edit"%>
			<%Dim St As string
			
			If Request("Action")="Add" Then
			St="添加"
		    Else
		    St="编辑"
		    End if
			 %>
			<table class="tableBorder" cellSpacing="1" cellPadding="3" width="95%" align="center" border="0">
				<tr>
					<th align="left" colSpan="2" height="23">
						&nbsp;管理员管理－－<%=St%>
						管理员</th></tr>
				<tr align="left">
					<td class="Forumrow" align="right" height="23">后台登录名称：</td>
					<td class="Forumrow" height="23"><input id="Admin_Name" type="text" size="30" name="textfield" runat="server"><INPUT id="Admin_ID" type="hidden" name="Hidden1" runat="server"></td>
				</tr>
				<tr align="left">
					<td class="Forumrow" align="right" height="23">后台登录密码：</td>
					<td class="Forumrow" height="23"><input id="Admin_Pass" type="password" size="30" name="textfield" runat="server"><INPUT id="Bak_Admin_Pass" type="hidden" name="Hidden2" runat="server">
						<asp:label id="TS" runat="server">(不更改，请留空)</asp:label></td>
				</tr>
				<tr align="left">
					<td class="Forumrow" align="right" height="23">前台用户名称：</td>
					<td class="Forumrow" height="23"><input id="User_Name" type="text" size="30" name="textfield1" runat="server">
						<asp:label id="TUser_Name" runat="server"></asp:label></td>
				</tr>
				<tr align="left">
					<td class="Forumrow" align="center" colSpan="2" height="23"><input id="Submit1" type="submit" value="添 加" name="Submit" runat="server">
						<input id="Submit2" type="submit" value="修 改" name="Submit" runat="server">
					</td>
				</tr>
			</table>
			<br>
			<%Case Else%>
			<asp:repeater id="AdminInfo" runat="server">
				<ItemTemplate>
					<tr>
						<td class="forumrow" align="center">
							<asp:HyperLink id="AdminName" runat="server" /></td>
						<td class="forumrow" align="center">
							<asp:label id="LastLoginTime" runat='server' /></td>
						<td class="forumrow" align="center">
							<asp:label id="LastLoginIP" runat='server' /></td>
						<td class="forumrow" align="center">
							<asp:HyperLink id="DelLink" runat="server" text="删除" style="CURSOR: hand" onclick="{if(confirm('删除后该管理员将不可进入后台！\n\n确定删除吗？')){return true;}return false;}" />
							|
							<asp:HyperLink id="EditQS" runat="server" text="编辑权限" />
					</tr>
				</ItemTemplate>
				<HeaderTemplate>
					<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align="center">
						<tr>
							<th height="22" colspan="5">
								管理员管理(点击用户名进行操作)</th>
						</tr>
						<tr align="center">
							<td width="30%" height="22" class="forumHeaderBackgroundAlternate" align="center"><B>用户名</B></td>
							<td width="25%" class="forumHeaderBackgroundAlternate" align="center"><B>上次登录时间</B></td>
							<td width="15%" class="forumHeaderBackgroundAlternate" align="center"><B>上次登陆IP</B></td>
							<td width="15%" class="forumHeaderBackgroundAlternate" align="center"><B>操作</B></td>
						</tr>
				</HeaderTemplate>
				<FooterTemplate>
					</table>
				</FooterTemplate>
			</asp:repeater>
			<%End Select%>
		</form>
		<%Else%>
		<form action="Admin_Admin.aspx?Action=SaveAuthority" method="post" name="adminflag">
			<table class="tableBorder" cellSpacing="1" cellPadding="2" width="95%" align="center" border="0">
				<tr>
					<th height="25">
						<b>管理员权限管理</b>(请选择相应的权限分配给管理员
						<asp:Label id="AuAdmin_Name" runat="server"></asp:Label>)
					</th>
				</tr>
				<tr>
					<td class="forumHeaderBackgroundAlternate" height="25"><b>&gt;&gt;全局权限</b></td>
				</tr>
				<tr>
					<td class="forumrow">
						<%=MakeAuth%>
						<input type="submit" value="更新" name="Submit"> <input onclick="CheckAll(this.form)" type="checkbox" value="on" name="chkall">选择所有权限
						<INPUT id="Au_ID" type="hidden" name="Au_ID" runat="server"> <INPUT id="Au_Name" type="hidden" name="Au_Name" runat="server">
					</td>
				</tr>
			</table>
		</form>
		<%End if%>
		<%BBS.Footer()%>
	</body>
</HTML>
