<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>

</head>

<body>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">管理员管理</div>
			如有使用上的疑问，请点此<a href="<?php echo IN_SYS;?>" target="_blank" style="color:#FF0000">获取帮助</a>
		</div>
	</div>
	<?php if($_roleid==1){?>
	<div class="manage-tips">
	<a href="?mod=adminer&file=adminer&action=manage&job=add" class="add">添加管理员</a>
	&nbsp;
	</div>
	<?php }?>
	<table class="table-list" cellpadding="1" cellspacing="1">
		<tr>
			<th>ID</th>
			<th>管理员账号</th>
			<th>所属角色</th>
			<th>状态</th>
			<th>所属站点</th>
			<th>操作</th>
		</tr>
		<?php if($result){?>
		<?php foreach($result as $no => $r){?>
		<tr id="tr_<?php echo $r['userid'];?>" <?php echo ($no%2)?'':'class="light"';?>>
			<td><?php echo $r['userid'];?></td>
			<td><?php echo $r['username'];?></td>
			<td><?php echo $adminobj->getrolename($r['roleid']);?></td>
			<td><?php echo $r['status']?'已启用':'<font style="color:#ff0000">已禁用</font>';?></td>
			<td><?php echo $r['siteid']?$siteidobj->sitename($r['siteid']):'总站';?></td>
			<td><u title="演示站点，禁止编辑">编辑</u> |<u title="演示站点，禁止删除"> 删除</u> |</td>
		</tr>
		<?php }?>
		<tr class="page">
			<td colspan="6">
			<?php echo $adminobj->pagestring;?>
			</td>
		</tr>
		<?php }else{echo '<tr class="light"><td colspan="6">暂无数据</td></tr>';}?>
	</table>
</body>
</html>
