<?php include 'header.tpl.php';?>
<style>
.metit{float:left;width:99%;text-align:left}
.meadminpage{float:left;width:100%;text-align:left;padding-left:20px}
.meadminpageact{float:left;padding-left:35px;text-align:left;width:100%}
</style>
<div class="pMenu">
<li><a href="javascript:frmExecute('');">管理</a></li>
<?php if($obj_ctl_limit->chk_act("add")){?><li class="sel"><a href="javascript:frmExecute('add');">添加</a></li><?php }?>
<li class="info"><a href="javascript:inc_show_help(195);" style="color:#ff0000">帮助</a></li>
</div>
<div>
<table class='pEditTable'>
<tr class='pTabTitRow'>
	<td class='pTabTitCol' colspan="2"></td></tr>
<tr><td class="pTabColName">组　名：</td><td class="pTabColVal"><input type="input" name="group_name" value=""></td>
	</tr>
<tr><td class="pTabColName">向下继承：</td><td class="pTabColVal"><input type="checkbox" name="group_down" value="1"></td>
	</tr>
<tr><td class="pTabColName">系统权限：</td><td class="pTabColVal">
	<?php foreach($arr_model as $item){?>
		<div class="metit">
			<input type="hidden" name="model_regkey_<?php echo $item["model_id"];?>" value="<?php echo $item["model_regkey"];?>">
			<input type="checkbox" name="model_id[]" value="<?php echo $item["model_id"];?>" onclick="me_adminpage_click(this.checked,'id_<?php echo $item["model_id"]?>');">
			<?php echo $item["model_name"];?>
		</div>
		<div class="megroup" id="id_<?php echo $item["model_id"]?>" style="display:none">
			<?php foreach($item["page"] as $item_next){?>
				<div class="meadminpage">
				<input type="hidden" name="page_url_<?php echo $item_next["page_id"]?>" value="<?php echo $item_next["page_url"]?>">
				<input type="checkbox" name="page_<?php echo $item["model_id"];?>[]" value="<?php echo $item_next["page_id"]?>" onclick="me_adminpage_click(this.checked,'obj_<?php echo $item_next["page_id"]?>');"><?php echo $item_next["page_url"]?>　［<?php echo $item_next["page_name"]?>］</div>
				<div class="meadminpageact" id="obj_<?php echo $item_next["page_id"]?>" style="display:none"><input type="checkbox" name="page_act_<?php echo $item_next["page_id"]?>[]" value="" disabled checked>查看
				<?php foreach($item_next["page_act"] as $act=>$key){?>
					<input type="checkbox" name="page_act_<?php echo $item_next["page_id"]?>[]" value="<?php echo $act?>"><?php echo $key?>
				<?php }?>
				</div>
			<?php }?>
		</div>
	<?php }?>
</td>
	</tr>
<tr><td colspan=2 class="pTabSubmit">
<?php if($obj_ctl_limit->chk_act("save")){?>
<input type="button" name="subok" value="保存" class="pSubmit" onclick="frmExecute('save')">
<?php }else{?>
<font color=red>您没有保存权限！</font>
<?php }?>
</td></tr>
</table>
</div>
<script>
areabox_autoheight("admingroup_act");
function me_adminpage_click(msgx,msgy)
{
	obj=document.getElementById(msgy);
	if(msgx){
		obj.style.display="";
	}else{
		obj.style.display="none";
	}
}

</script>

<?php include 'footer.tpl.php';?>		