<?php include 'header.tpl.php';?>
<script>
function meSetFunpid(msgid){
	frmSet('funfolder_pid',msgid);
	frmExecute('funfolder');
}
function meSelFolder(msgtit,msgid){
	parent.document.getElementById("id_funfolder").innerHTML=msgtit;
	parent.document.getElementById("id_funfolderid").value=msgid;
	parent.div_hide_show("winfundir");
}
</script>
<div class="pMenu">
<li><a href="javascript:frmExecute('default');">数据生成</a></li>
<li class="sel"><a href="javascript:frmExecute('funfolder');">函数库</a></li>
<?php if($obj_ctl_limit->chk_act("add_folder")){?><li><a href="javascript:frmExecute('add_folder');">添加目录</a></li><?php }?>
<li class="info"><a href="javascript:inc_show_help(223);" style="color:#ff0000">帮助</a></li>
</div>
<div class="pArticleTopPath">
路径：<?php echo $this_folder_path;?>
</div>
<table class='pTableArticle'>
	<?php foreach($arr_folder as $item){ ?>
<tr class='pTabRow'>
	<td class='pTabCol' width="30"><input type='checkbox' name='folderid[]' value='folder_<?php echo $item['folder_id'];?>'></td><td class='pTabCol' ondblclick="meSetFunpid('<?php echo $item['folder_id'];?>');"><img src="../images/folder.gif"> <?php echo $item['folder_name'];?></td>
	<td class='pTabCol' width="150" onmousedown="frmSet('id','<?php echo $item['folder_id'];?>')">
	<a href="javascript:meSetFunpid('<?php echo $item["folder_id"];?>');">打开</a>&nbsp;
		<?php if($obj_ctl_limit->chk_act("edit")){?><img src="../images/b_edit.png" onclick="javascript:frmExecute('edit_folder');" class="pImgbtn" title="编辑"><?php }?>
		<?php if($obj_ctl_limit->chk_act("del")){?>　<img src="../images/b_drop.png" onclick="javascript:frmExecute('del_folder');" class="pImgbtn" title="删除"><?php }?>
		<?php if($get_isselfolder==1){?>&nbsp;&nbsp;<a href="javascript:meSelFolder('<?php echo $item["folder_name"];?>',<?php echo $item["folder_id"];?>);">选择</a><?php }?>
	</td></tr>
	<?php }?>
	<?php foreach($arr_file as $item){ ?>
<tr class='pTabRow' id="id_row_<?php echo $item["fun_id"]?>" onmouseover="admin_row_mouseover('<?php echo $item["fun_id"];?>')" onmouseout="admin_row_mouseout('<?php echo $item["fun_id"];?>');">
	<td class='pTabCol' width="30"><input type='checkbox' name='funid[]' value='<?php echo $item['fun_id'];?>'></td><td class='pTabCol'><img src="../images/file.jpg" >&nbsp;<a href="" target="_blank"><?php echo $item['fun_name'];?></a></td>
	<td class='pTabCol' width="150" onmousedown="frmSet('funid','<?php echo $item['fun_id'];?>')">
		<?php if($obj_ctl_limit->chk_act("edit")){?><img src="../images/b_edit.png" onclick="javascript:frmExecute('');" class="pImgbtn" title="编辑"><?php }?>
		<?php if($obj_ctl_limit->chk_act("del")){?>　<img src="../images/b_drop.png" onclick="javascript:frmExecute('del_fun');" class="pImgbtn" title="删除"><?php }?>
		&nbsp;&nbsp;<a href="javascript:parent.textarea_insertstr('file_content','{fun(<?php echo $item["fun_path"];?>)}');parent.div_hide_show('wingetsql');">插入</a>
	</td></tr>
	<?php }?>
</table>
<?php include 'footer.tpl.php';?>		
