<?php
if (!defined('USING_SYSTEM')) exit;
?>
<!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" />
<link type="text/css" rel="stylesheet" href="admin/images/page.css" />
<script type="text/javascript" src="skins/common/images/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="admin/images/page.js"></script>
<title>Filiant Control Panel</title>
</head>
<body>
<div class="bigTips"<?php echo ($tips=='')?'':' style="display:block;"' ?>><?php echo $tips ?></div>
<form id="mainForm" action="" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3">添加用户组</th>
  </tr>
  <tr>
    <td class="title" width="150">组名</td>
    <td width="400"><input name="nameTxt" id="nameTxt" type="text" class="textbox" /></td>
    <td class="tips">用户组的名字</td>
  </tr>
</table>
<div class="controls">
  <a class="button" href="javascript:void(0);" onclick="$('#mainForm').trigger('submit');return false;">添加<i></i></a>
</div>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th colspan="3">用户组列表</th>
  </tr>
  <tr>
    <th>组名</th>
    <th width="100">操作</th>
  </tr>
<?php
if($groups = xGroup::getAll()) {
	foreach($groups as $group) {
?>
  <tr>
    <td><?php echo $group['name'] ?></td>
    <td align="center"><a class="button" href="?ac=p202edit&id=<?php echo $group['id'] ?>">编辑<i></i></a></td>
  </tr>
<?php
	}
}
?>
</table>
</body>
</html>