<?php
	!defined('DIRCMS_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>
<title>模块配置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script type="text/javascript" src="admin/template/js/admin.js"></script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="javascript:void(0);" class="on">网站后台</a></li>
			<li><a href="?file=module&action=member">会员中心</a></li>	
		</ul>
	</div>
	<div class="main">
		<fieldset>
		<legend>操作提示</legend>
		您可以通过模块配置完成后台以及会员中心的各种组合。
		</fieldset>
		<table cellspacing="0" class="datalist" id="list">
		<tr>
			<th width="91" class="firstcol">模块名称</th>
			<th width="95">顶部菜单</th>
			<th width="80">模块状态</th>
			<th width="447">管理权限配置</th>
			<th width="78">管理</th>
		</tr>
		<form action="" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<?php if($r){foreach($r as $_r){?>
		<tr>
		  <td width="91" align="center"><input type="hidden" name="key[]" value="<?php echo $_r['modulemurl'];?>" /><input type="text" size="13" name="modulename[<?php echo $_r['modulemurl'];?>]" value="<?php echo $_r['modulename'];?>" /></td>
			<td width="95" align="center"><?php echo $_r['istop']?'√ <a href="'.ADMIN_FILE.'?file=module&action=settop&istop=0&modelurl='.$_r['modulemurl'].'"><u>取消</u></a>':'×  <a href="'.ADMIN_FILE.'?file=module&action=settop&istop=1&modelurl='.$_r['modulemurl'].'"><u>设置</u></a>';?></td>
			<td width="80" align="center"><?php echo $_r['disabled']?'<font color="#999999">已卸载</font> <a href="'.ADMIN_FILE.'?file=module&action=install&isinstall=0&modelurl='.$_r['modulemurl'].'"><u>安装</u></a>':'已安装 <a href="'.ADMIN_FILE.'?file=module&action=install&isinstall=1&modelurl='.$_r['modulemurl'].'"><u>卸载</u></a>';?></td>
			<td width="447" align="center">
			<?php if($adminrole)foreach($adminrole as $_adminrole){?>
			<input type="checkbox" class="checkbox" align="middle" name="moduleroleid[<?php echo $_r['modulemurl'];?>][]" value="<?php echo $_adminrole['id'];?>" <?php echo in_array($_adminrole['id'],$_r['roleid'])?' checked="checked"':'';?> /> <?php echo $_adminrole['name'];?>&nbsp;
			<?php }?>
		  </td>
			<td width="78" align="center"><a href="<?php echo ADMIN_FILE;?>?file=left&module=<?php echo $_r['modulemurl'];?>" target='leftFrame'>访问</a></td>
		</tr>
		<?php }?>
		<tr>
			<td colspan="5" align="left">
			<input type="button" onclick="this.form.submit();" class="submit" value="提交配置" />
			</td>
		</tr>
		</form>
		<?php }else{?>
		<tr><td colspan="5">目前尚未安装任何模块...</td></tr>	
		<?php }?>
		</table>
	</div>
</div>
</body>
</html>