
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="../inc/Conn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理员</title>
<link href="css/adminstyle.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--

function ConfirmDel()
{
   if(confirm("确定要删除选中的项目吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;	 
}

function form_onsubmit()
{
if (document.form_admin.Password.value!=document.form_admin.ConPassword.value)
{
alert ("新密码和确认密码不一致。");
document.form_admin.Password.value='';
document.form_admin.ConPassword.value='';
document.form_admin.Password.focus();
return false;
}
}
//-->
</SCRIPT>
</head>

<body>
<div class="container">
	<div class="local"><h3>您现在的位置：<a href="admin_Index_Main.asp">管理首页</a> >> 用户管理</h3></div>
	<table width="100%" border="0" cellpadding="10" cellspacing="0" class="border" style="margin-top:10px;">
		<tr>
			<td>
			<div class="page_content">
				<div class="r_title"><h3><img src="images/xiao.jpg" /> 用户管理</h3></div>
				<div class="contents">
	<%
	
	if Request.QueryString("mark")="operate" then
	dim sql,rs,ID
	ID=request("ID")
	set rs=server.createobject("adodb.recordset")
	sql="delete from admin where Id="& ID
	rs.open sql,conn,1,3
	set rs=nothing
	conn.close
	response.redirect "Admin_Manage.asp"
	end if
	%>
    <form name="form_admin" method="post"  onsubmit="return form_onsubmit()" action="Admin_ManageSave.asp" ><br />
		<table  width="100%" border="0" cellpadding="0" cellspacing="1" style="border:1px solid #F9EFF0" align="center">
			<tr> 
				<td height="40" bgcolor="#F9EFF0" class="Title">
&nbsp;管理员帐号：
<input name="UserName" type="text" id="UserName" size="16">
&nbsp;管理员密码：
<input name="Password" type="password" size="16" maxlength="20">
&nbsp;密码确认：<input name="ConPassword" type="password" size="16" maxlength="20">&nbsp;<input type=submit value='确认' name=Submit2>
				</td>
            </tr>
		</table>
	</form>
	<table width="100%" cellpadding="1" cellspacing="1" style="border-collapse: collapse; margin-top:10px;" bordercolor="#F9EFF0" border="1" align="center">
        <tr>          
			<td width="28%" height="25" align="center" bgcolor="#FBF4F5" class="Title"><strong>管理员帐号</strong></td>
			<td width="28%" align="center" bgcolor="#FBF4F5" class="Title"><strong>管理员密码</strong></td>
			<td width="24%" align="center" bgcolor="#FBF4F5" class="Title"><strong>操作</strong></td>
			<td width="20%" align="center" bgcolor="#FBF4F5" class="Title"><strong>删除</strong></td>
        </tr>
		<%				
			set rs=server.createobject("adodb.recordset")
			sql="select * from admin"
			rs.open sql,conn,1,1
			do while not rs.eof
		%>
		<tr> 
			<td height="22" align="center"><%=rs("UserName")%></td>
			<td align="center"><%=rs("PassWord")%></td>
			<td align="center"><a href="Admin_ManageEdit.asp?ID=<%=rs("Id")%>">修改密码</a></td>
			<td align="center"><%if rs("id")<>1 and rs("UserName")<>"admin" then%><a href="Admin_Manage.asp?id=<%=rs("id")%>&mark=operate" onClick="return ConfirmDel();">删除</a><%end if%></td>
		</tr>
		<%
			rs.movenext
			loop
			rs.close
		%>
	</table>
	</div>
			</div>
			</td>
		</tr>
	</table>
</div>
</body>
</html>