<% Option Explicit %>
<!--#include file="../../Inc/Cls_DB.asp" -->
<!--#include file="../../Inc/Const.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"),"P0802") then Call ReturnError()
Dim Result
Dim ID,AdminGroupObj,AdminObj,Sql
ID = Request("ID")
Result = Request.Form("Result")
%>

<!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="../Inc/ModeWindow.css" rel="stylesheet">
<body topmargin="0" leftmargin="0">
<table width="96%" border="0" align="center">
  <form name="" action="" method="post">
  <tr> 
    <td width="4%" align="center" valign="middle">&nbsp;</td>
    <td width="24%" rowspan="3" align="center" valign="middle"><img src="../Images/Question.gif" width="39" height="37"></td>
    <td width="72%" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
    <td width="72%" align="left" valign="middle">您确定要删除此管理员组<br>
并删除此管理员组下的所有管理员?</td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
    <td width="72%" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3"><div align="center"> 
          <input name="Submit" type="submit" id="Submit" value=" 确 定 ">
        <input name="Result" type="hidden" id="Result" value="Submit">
          <input name="Submit1"  onClick="window.close();"type="reset" id="Submit1" value=" 取 消 ">
      </div></td>
  </tr></form>
</table>
</body>
</html>
<%
if Result= "Submit" then
Sql = "Delete from AdminGroup Where ID="+ID
Set AdminGroupObj = Server.CreateObject("ADODB.RecordSet")
AdminGroupObj.Open Sql,Conn,3,3
Set AdminObj = Server.CreateObject("ADODB.RecordSet")
Sql="Delete from Admin Where GroupID="+ID
AdminObj.Open Sql,Conn,3,3
	if Err.Number = 0 then
%>
<script language="JavaScript">
	alert('删除成功');
	dialogArguments.location.reload();
	window.close();
</script>
<%
	else
%>
<script language="JavaScript">
	alert('删除失败');
	dialogArguments.location.reload();
	window.close();
</script>
<%
	end if
end if
Set AdminObj = Nothing
Set AdminGroupObj = Nothing
Set Conn = Nothing
%>