<?php
/**
 * 管理员管理
 * $Id: account_list.inc,v 1.1 2015/10/08 11:18:50 wanggb Exp $
 * @author netvillage
 * @access public
 * @package manager.templates
 */

global $account_list;

?>
<div class="page_title">账号管理-账号分配</div>

<div class="page_buttons">
	<a class="flatbutton" href="account_new_input.php">新建账号</a>
</div>


<br />
<div id="result_list">
<table>
<tr>
<th class="contents_title">角色名称</th>
<th class="contents_title">账号</th>
<th class="contents_title">原始密码</th>
<th class="contents_title">账号备注</th>
<th class="contents_title">创建日期</th>
<th class="contents_title">操作</th>
<?
	foreach ($account_list as $account_mst) {
		
?>
<tr>
	<td align="center"><?=AccountRole::getTitleById($account_mst->role) ?></td>
	<td align="center"><?=htmlspecialchars($account_mst->login) ?></td>
	<td align="center"><?=htmlspecialchars($account_mst->password) ?></td>
	<td align="center"><?=htmlspecialchars($account_mst->comment) ?></td>
	<td align="center"><?=htmlspecialchars($account_mst->registration_date) ?></td>
	<td align="center">
		<a class="flatbutton" href="account_edit_input.php?id=<?=$account_mst->id ?>">编辑</a>
		<?
		if ($account_mst->id == 1) {
			?><span class="flatbutton_disabled">删除</span><?
		} else {
			?><a class="flatbutton" href="javascript:void(0);if (confirm('确定要删除吗？')) location.href='account_delete_result.php?id=<?=$account_mst->id ?>';">删除</a><?
		}
		?>
	</td>
</tr>
<?
}
?>
</table>
</div>
