<?php include 'header.tpl.php';?>
<div class="pMenu">
<li><a href="javascript:frmExecute('');">管理</a></li>
<?php if($get_filename!=""):?>
<li><a href="javascript:frmSet('filename','');frmExecute('edit');">添加模板</a></li>
<li class="sel"><a href="javascript:frmExecute('edit');">编辑模板</a></li>
<?php else:?>
<li class="sel"><a href="javascript:frmSet('filename','');frmExecute('edit');">添加</a></li>
<?php endif;?>
<li class="info"><a href="javascript:inc_show_help(222);" style="color:#ff0000">帮助</a></li>
</div>
<div id="id_label_1">
	<table class='pEditTable'>
	<tr class='pTabTitRow'><td class='pTabTitCol' colspan="2">&nbsp;&nbsp;<a href="javascript:meGetConfig();">系统变量</a>&nbsp;<a href="javascript:meGetSql();">数据调用</a>&nbsp;<a href="javascript:meGetFile();">文件引用</a></td></tr>
	<tr><td class="pTabColName">内容：</td><td class="pTabColVal"><textarea name='file_content' id="file_content" style='width:800px;height:120px' onpropertychange='this.style.posHeight=this.scrollHeight+2'><?php echo $file_content;?></textarea></td></tr>
	<tr><td class="pTabColName">&nbsp;</td><td class="pTabSubmit">
	<?php if($obj_ctl_limit->chk_act("save")){?><input type="button" name="subok" value="保 存" class="pSubmit" onclick="meSave();"><?php }else{?>
	<font color="red">没有保存权限！</font>
	<?php }?>
	　<input type="button" name="subok" value="取　消" class="pCancel" onclick="frmExecute('')">&nbsp;&nbsp;<a href="<?php echo WEB_URL;?>/index.php?app=<?php echo $get_filename;?>" target="_blank">预览</a></td></tr>
	</table>
</div>
<script>
function meSave(){
	frmSet('act','save');
	yj_ajax_post(document.frmMain,function(data){
		alert('保存成功');
	});
}
function meGetFile(){
	dialog_show("getfile","文件引用","getfile.php");
}
function meGetConfig(){
	dialog_show("getconfig","系统变量","getconfig.php");
}
function meGetSql(){
	dialog_show("getsql","数据调用","getsql.php",0,0,350);
}
areabox_autoheight("file_content");
</script>
<?php include 'footer.tpl.php';?>		