<!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=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="../Css/style.css" />
<script language="javascript" type="text/javascript" src="../jQuery/lib/jquery.js"></script>
<script language="javascript" type="text/javascript" src="../js/WebSite.js"></script>
<script language="javascript" type="text/javascript" src="../js/ChkForm.js"></script>

</head>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<body>
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)
%>
<form action="submit.asp" name="frm" method="post" onsubmit="return ChkAddAdmin()">
<input type="hidden" name="Action" value="AddAdmin" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    用户名：<input type="text" name="UserName" id="UserName" class="txt" value="" />
    密码：<input type="password" name="UserPwd" id="UserPwd" class="txt" value="" />
    <input type="submit" name="btnAdd" value="提交" class="btn">
    </td>  
  </tr>
</table>
</form>
<form action="Delete.asp" method="post" name="frm" onsubmit="return Confirm('确定要执行此操作吗?')">
<input type="hidden" name="Action" value="DelAdmin">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th width="5%">序号</th>
    <th width="35%">用户名</th>
    <th width="20%">状态</th>
    <th width="20%">添加日期</th>
    <th width="20%">操作</th>
  </tr>
  <%
	Sql = "SELECT * FROM T_Admins ORDER BY Locked ASC,ID DESC"
	SetRs Rs,Sql,conn,1,1
	IF Rs.eof And Rs.bof Then
		Response.write "<tr><td colspan='5'>&nbsp;没有相关记录!</td></tr>"
	Else
		do while not Rs.eof	
  %>
  <tr>
    <td align="center"><%=n+1%></td>
    <td><%=Rs("UserName")%></td>
    <td align="center"><%IF Rs("Locked") Then: Response.write "锁定": Else:Response.write "正常": End IF%></td>
    <td align="center"><%=Formatdatetime(Rs("AddTime"),2)%></td>
    <td align="center">
    <input type="button" value="修改" class="btn1" onclick="window.parent.ShowModiPwd('<%=Rs("UserName")%>')" />
    <input name="ChkBox" type="checkbox" value="<%=Rs("ID")%>" />
    </td>
  </tr>
  <%
		n=n+1     
		Rs.movenext
		Loop
    End IF
	DisRs Rs
	Call CloseDataBase
  %>
  <tr>
	<th colspan="5" align="right">
    <input type="submit" name="btnSubmit" value="锁定" class="btn">
    <input type="submit" name="btnSubmit" value="开启" class="btn">
    <input type="submit" name="btnSubmit" value="删除" class="btn">
    <input name="" type="checkbox" value="" style="margin-left:10px" onclick="CheckAll(this.checked);"/>全选/反选
    </th>
  </tr>
</table>

</form>
</body>
</html>
