<?php $this->display(tpl('head')); ?>
<style>
	.layui-table{
		margin: 2%;
		width: 96%;
	}
	.edit a{
		background-color: #007DDB;
		padding: 5px 10px;
		border-radius: 5px;
		color: #fff;
	}
	.edit a:hover{
		background-color: initial;
		border: 1px solid #007DDB;
		color: #000;
	}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  	<legend>用户组权限管理</legend>
</fieldset>

<table class="layui-table">
	  <thead>
		    <tr>
			    <th width="100">GROUPID</th>
			    <th>用户组名称</th>
			    <th>用户组类别</th>
			    <th style="text-align: center; width: 100px;">用户组成员</th>
			    <th  style="text-align: center; ">操作</th>
		    </tr>
	  </thead>
	  <tbody>
			<?php
			foreach((array)$user_groupDB AS $row){
				if($row[type]=='1'){
					$type="普通会员组";
				}else{
					$type="高级系统组";
				}
			?>
		    <tr>
			    <td><?php echo $row[id] ?></td>
			    <td ><?php echo $row[name] ?></td>
			    <td><?php echo $type ?></td>
			    <td align="center"><a href="" ><img width="20" src="/public/admin/images/users.png"></a></td>
			    <td align="center" class="edit">
			    	<a href="/admin/group/edit/id_<?php echo $row[id] ?>">编辑权限</a>
					<?php if($row[id]>'3'){ ?>
			    	<a href="/admin/group/del/id_<?php echo $row[id] ?>" ><i class="del"></i>删除用户组</a>
					<?php } ?>
			    </td>
		    </tr>
		    <?php } ?>
	  </tbody>
</table>
<script>
layui.use('table', function(){
  var table = layui.table;
});
</script>

<?php $this->display(tpl('foot')); ?>
