<?php
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
//验证用户
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"group");
$sql=$empire->query("select groupid,groupname from {$dbtbpre}enewsgroup order by groupid desc");
$url="位置：<a href=ListGroup.php>管理用户组</a>&nbsp;&nbsp;(<a href=AddGroup.php?enews=AddGroup>增加用户组</a>)";
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户组</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td><?=$url?></td>
  </tr>
</table>
<br>
<table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  <tr class="header">
    <td width="13%"><div align="center">ID</div></td>
    <td width="63%" height="25"><div align="center">用户组名称</div></td>
    <td width="24%" height="25"><div align="center">操作</div></td>
  </tr>
  <?
  while($r=$empire->fetch($sql))
  {
  ?>
    <tr bgcolor="#FFFFFF">
      <td><div align="center"><?=$r[groupid]?></div></td>
      <td height="25"><div align="center"><?=$r[groupname]?></div></td>
      <td height="25"><div align="center"> [<a href="AddGroup.php?enews=EditGroup&groupid=<?=$r[groupid]?>">修改</a>] 
        [<a href="../enews.php?enews=DelGroup&groupid=<?=$r[groupid]?>" onclick="return confirm('确认要删除此用户组？');">删除</a>]</div></td>
    </tr>
  <?
  }
  db_close();
  $empire=null;
  ?>
</table>
</body>
</html>
