<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeepSoonPWD.aspx.cs" Inherits="Security.DeepSoonPWD" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link rel="stylesheet" href="css/common.css" type="text/css" />
		<title>管理员设置</title>
	</head>

	<body style="padding-right:30px;overflow:hidden;">
		<form runat="server" style="margin:0px;padding:0px;">
		<div id="man_zone">
			<span class="adminTitle">账户列表</span><br>
			<span class="adminGuid">
				[操作说明] 显示当前系统已存在的管理员账户。
			</span>
			<asp:GridView ID="myGridView"  DataKeyNames="ID" PageSize="4" OnPageIndexChanging="myGridView_PageIndexChanging" OnRowDeleting="myGridView_RowDeleting" runat="server" AutoGenerateColumns="false" AllowPaging="true" CellPadding="4" GridLines="None" BackColor="#DBE6E3" CellSpacing="1" Font-Bold="false"> 
				<FooterStyle BackColor="#FFFFFF" ForeColor="Black" />
				<RowStyle BackColor="#FFFFFF" ForeColor="Black" />
				<PagerStyle HorizontalAlign="Left"/>
				<HeaderStyle BackColor="#F7F7F7" Font-Bold="True" ForeColor="#404040" BorderColor="#A6CBEF" />
				<Columns> 
					<asp:TemplateField HeaderText=""> 
						<ItemTemplate> 
							<asp:CheckBox id="cbxId" runat="Server" /> 
						</ItemTemplate> 
					</asp:TemplateField> 			
					<asp:BoundField DataField="ID" HeaderText="ID" />
					<asp:BoundField DataField="Name" HeaderText="用户名"/>
					<asp:BoundField DataField="PWD" HeaderText="保密码" />
					<asp:TemplateField HeaderText="权限">
						<ItemTemplate> 
							<asp:Label ID="linkButtonIndexPic" runat="server" Text='<%# GetM(Eval("Class").ToString())%>'/>
						</ItemTemplate> 
					</asp:TemplateField>
					<asp:TemplateField HeaderText="操作">
						<ItemTemplate> 
							<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" Text="[删除]" OnClientClick='<%#  "if (!confirm(\"一旦删除无法恢复，您确定删除吗？\")) return false;"%>'></asp:LinkButton> 
						</ItemTemplate> 
					</asp:TemplateField> 
				</Columns>		
				<PagerTemplate>
					<asp:LinkButton ID="cmdFirstPage" runat="server" CommandName="Page" CommandArgument="First" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>">首页</asp:LinkButton>
					<asp:LinkButton ID="cmdPreview" runat="server" CommandArgument="Prev" CommandName="Page" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>">上页</asp:LinkButton>
					第<asp:Label ID="lblcurPage" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1  %>'></asp:Label>页/共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount %>'></asp:Label>页
					<asp:LinkButton ID="cmdNext" runat="server" CommandName="Page" CommandArgument="Next" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>">下页</asp:LinkButton>
					<asp:LinkButton ID="cmdLastPage" runat="server" CommandArgument="Last" CommandName="Page" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>">尾页</asp:LinkButton>&nbsp;			
					<asp:TextBox ID="txtGoPage" runat="server"  Width="40" value="1" MaxLength="6" onkeyup="value=value.replace(/[^\d]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));"></asp:TextBox>
					<asp:Button ID="btnGo" runat="server" Text="GO"  onclick="btnGo_Click"></asp:Button>			
				</PagerTemplate>
			</asp:GridView>	
			<asp:LinkButton ID="btnDelAll" runat="server" Text="删除选中" OnClick="btnDelAll_Click"/><br><br>
	
			<span class="adminTitle">添加账户</span> <asp:Label ID="labelAddInfor" runat="server" Text="" class="labelInforStyle"/></asp:Label>
			<br>
			<div class="adminGuid">
				[操作说明] 添加新账户用于网站管理，新账户名必须是列表中不存在的。
			</div>
			<table cellpadding=0 cellspacing=1>
				<tr><td class="colorTd">用户名</td>
					<td><asp:TextBox ID="txtLoginName" runat="server" MaxLength="20"></asp:TextBox> <span class="adminHelp">必填项，汉字或字母，不超过20个字符</span></td>
				</tr>
				<tr><td class="colorTd">保密码</td>
					<td><asp:TextBox ID="txtLoginPWD" runat="server" TextMode="Password"  MaxLength="8" class="pwdStyle"></asp:TextBox> <span class="adminHelp">必填项，不超过8个字符</span></td>
				</tr>
				<tr><td class="colorTd">确认</td>
					<td><asp:TextBox ID="txtLoginPWDAgain" runat="server" TextMode="Password"  MaxLength="8" class="pwdStyle"></asp:TextBox> <span class="adminHelp">必填项，请再输入一遍</span></td>
				</tr>
				<tr><td class="colorTd">权限</td>
					<td>
					<asp:DropDownList ID="dropListClass" runat="server"> 
						<asp:ListItem Value="super">超级用户</asp:ListItem>
						<asp:ListItem Value="normal">普通用户</asp:ListItem>
					</asp:DropDownList>
					<span class="adminHelp">必填项，分配用户角色，只有[超级用户]才能登陆后台管理网站</span>
					</td>
				</tr>
				<tr><td class="colorTd">操作</td>
					<td><asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="添加新账户" class="adminButton"/></td>
				</tr>
			</table><br>

	
			<span class="adminTitle">修改账户</span> <asp:Label ID="labelUpdateInfor" runat="server" Text="" class="labelInforStyle"/></asp:Label>
			<br>
			<div class="adminGuid">
				[操作说明] 修改账户基本信息。
			</div>
			<table cellpadding=0 cellspacing=1>
				<tr><td class="colorTd">用户名</td>
					<td><asp:TextBox ID="txtUpdateLoginName" runat="server"  MaxLength="20"></asp:TextBox> <span class="adminHelp">只允许修改当前登录的账户</span></td>
				</tr>
				<tr><td class="colorTd">原密码</td>
					<td><asp:TextBox ID="txtUpdateLoginPWD" runat="server"  MaxLength="8" TextMode="Password" class="pwdStyle"></asp:TextBox> <span class="adminHelp">必填项</span></td>
				</tr>
				<tr><td class="colorTd">新密码</td>
					<td><asp:TextBox ID="txtUpdateLoginPWDAgain" runat="server"  MaxLength="8" TextMode="Password" class="pwdStyle"></asp:TextBox> <span class="adminHelp">必填项，不超过8个字符</span></td>
				</tr>
				<tr><td class="colorTd">权限</td>
					<td>
					<asp:DropDownList ID="dropListUpdateClass" runat="server"> 
						<asp:ListItem Value="super">超级用户</asp:ListItem>
						<asp:ListItem Value="normal">普通用户</asp:ListItem>
					</asp:DropDownList>
					<span class="adminHelp">必填项，分配用户角色，只有[超级用户]才能登陆后台管理网站</span>
					</td>
				</tr>
				<tr><td class="colorTd">操 作</td>
					<td><asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="修改旧账户" class="adminButton"/></td>
				</tr>
			</table>
		</div>
		</form>
	</body>
</html>