<% Option Explicit %>
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<!--#include file="../Inc/Cls_Admin.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P0801") then Call ReturnError1()
Dim AdminID,Result,OperateType,PromptText
PromptText = ""
OperateType = Request("OperateType")
Result = Request("Result")
AdminID = Replace(Replace(Request("AdminID"),"'",""),"""","")

if OperateType = "DelAdmin" then
	PromptText = "确定要删除此管理员吗？"
elseif OperateType = "LockAdmin" then
	PromptText = "确定要锁定此管理员吗？"
elseif OperateType = "UNLockAdmin" then
	PromptText = "确定要解锁此管理员吗？"
else
	PromptText = ""
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>删除或者锁定管理员</title>
</head>
<link href="System.css" rel="stylesheet">
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <form name="OperateForm" action="" method="post">
  <tr> 
      <td width="7%" height="20">&nbsp;</td>
      <td width="27%" rowspan="3"><div align="center"><img src="../Images/Question.gif" width="39" height="37"></div></td>
      <td width="66%">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><% = PromptText %></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="20">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3"><div align="center"><input type="submit" name="Submit" value=" 确 定 ">
          <input name="OperateType" value="<% = OperateType %>" type="hidden" id="OperateType">
          <input name="AdminID" value="<% = AdminID %>" type="hidden" id="AdminID">
          <input name="Result" type="hidden" id="Result" value="Submit">
          <input type="button" name="Submit2" onClick="dialogArguments.location.reload();window.close();" value=" 取 消 ">
      </div></td>
    </tr>
 </form>
</table>
</body>
</html>
<%
if Result = "Submit" then
	Dim AClass,ReturnCheckInfo
	Set AClass = New AdminClass
	AClass.TForm = Request.Form
	if OperateType = "DelAdmin" then
		ReturnCheckInfo = AClass.DelAdmin()
	elseif OperateType = "LockAdmin" then
		ReturnCheckInfo = AClass.LockAdmin()
	elseif OperateType = "UNLockAdmin" then
		ReturnCheckInfo = AClass.UNLockAdmin()
	end if
	Set AClass = Nothing
%>
<script language="JavaScript">
dialogArguments.location.reload();
window.close();
</script>
<%
	Response.End
end if
%>