<?php 
require_once("module/module.role.php");
$roles = new CModuleRole();
$roles->Init();
?>
<span class="big"><?php echo $ln["user_mgr"]["role"]?></span> 
<span class="link" id="add_role"><img src="imgs/b_bookmark.png" class="icon">新增角色</span>
<hr size=1 width=80% align=left color=#CCCCCC>
<table border=0 cellspacing='1' cellpadding='0' bgcolor='#cccccc'>
	<tr bgcolor="#efefef" height=24>
		<td width=120 align=center><b>角色名称</td>
		<td width=240 align=center><b>角色权限</td>
		<td width=200 align=center><b>角色描述</td>
		<td width=80 colspan=2 align=center><b>操作</td>
	</tr>
	<?php for($i=0;$i<$roles->GetSize();$i++){?>
		<tr bgcolor="#ffffff" height=24 onmouseover="setPointer(this, 'over', '#D0DCE0', '#ffffff');" onmouseout="setPointer(this, 'out', '#D0DCE0', '#ffffff');">
			<td align=center><?php echo $roles->modules[$i]->role_name?></td>
			<td align=center>
				<?php
					for($n=0;$n<sizeof($Config["sys_grade"]);$n++){
						if($Config["sys_grade"][$n]&$roles->modules[$i]->role_grade)
							echo $Config["sys_grade_name"][$n]."&nbsp;&nbsp;";
					}
				?>
			</td>
			<td align=center><?php echo $roles->modules[$i]->role_desc?></td>
			<td align=center><img src="imgs/b_edit.png" alt="编辑" id="edit_dept" class="link" onclick="ClickEditRole(<?php echo $roles->modules[$i]->role_id?>)"></td>
			<td align=center><img src="imgs/b_drop.png" alt="删除" id="del_dept" class="link" onclick="ClickDelRole(<?php echo $roles->modules[$i]->role_id?>, '<?php echo $roles->modules[$i]->role_name?>')"></td>
		</tr>
	<?php }?>
</table>