<?php include 'header.tpl.php';?>
<script>
function meOpendir(msgdir){
	frmSet("folder_path",msgdir);
	frmExecute('');
}
function meInsert(msgx){
	var strx="";
	var arrx=msgx.split(".");
	var stry=arrx[arrx.length-1];
	if(stry=="html"){
		strx="{include(<?php echo $get_folder_path;?>/"+msgx+")}";
	}else if(stry=="js"){
		strx="<script src='<?php echo $get_folder_path;?>/"+msgx+"'><\/script>";
	}else if(stry=="css"){
		strx='<link rel="stylesheet" type="text/css" href="<?php echo $get_folder_path;?>/'+msgx+'"/>';
	}
	parent.textarea_insertstr('file_content',strx);
	parent.div_hide_show('wingetfile');
}
</script>
<div class="pMenu">
<li class="sel"><a href="javascript:frmExecute('');">管理</a></li>
<li class="info"><a href="javascript:inc_show_help(224);" style="color:#ff0000">帮助</a></li>
</div>
<div class="pArticleTopPath">
路径：<?php echo $this_folder_path;?>
</div>
<table class='pTableArticle'>
	<?php foreach($arr_dir as $item){ ?>
<tr class='pTabRow'>
	<td class='pTabCol' width="30"><input type='checkbox' name='dirid[]' value='dir_<?php echo $item['name'];?>'></td><td class='pTabCol' ondblclick="meOpendir('<?php echo $get_folder_path."/".$item['name'];?>');"><img src="../images/folder.gif"> <?php echo $item['name'];?></td>
	<td class='pTabCol' width="150">
	<a href="javascript:meOpendir('<?php echo $get_folder_path."/".$item["name"];?>');">打开</a>&nbsp;
		<?php if($obj_ctl_limit->chk_act("edit")){?><img src="../images/b_edit.png" onclick="javascript:frmExecute('edit_dir');" class="pImgbtn" title="编辑"><?php }?>
		<?php if($obj_ctl_limit->chk_act("del")){?>　<img src="../images/b_drop.png" onclick="javascript:frmExecute('del_dir');" class="pImgbtn" title="删除"><?php }?>
	</td></tr>
	<?php }?>
	<?php foreach($arr_file as $item){ ?>
<tr class='pTabRow' id="id_row_<?php echo $item["app"]?>" onmouseover="admin_row_mouseover('<?php echo $item["app"];?>')" onmouseout="admin_row_mouseout('<?php echo $item["app"];?>');">
	<td class='pTabCol' width="30"><input type='checkbox' name='fileid[]' value='<?php echo $item['app'];?>'></td><td class='pTabCol'ondblclick="window.open('<?echo $item['app']?>','_blank');"><img src="../images/file.jpg" >&nbsp;<a href="<?php echo WEB_URL;?>/index.php?apppath=<?php echo $item['path']?>&app=<?php echo $item['app']?>" target="_blank"><?php echo $item['name'];?></a></td>
	<td class='pTabCol' width="150"><a href="javascript:meInsert('<?echo $item['name']?>');">插入</a></td></tr>
	<?php }?>
</table>
<?php include 'footer.tpl.php';?>