<!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>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>标签源码碎片管理</title>
<link rel="stylesheet" type="text/css" href="css/base.css">
<link rel="stylesheet" type="text/css" href="css/codemirror.css">
<style type="text/css">
.selbt {
	width:80px;
	float:left;
	margin:2px 0px 2px 3px;
	text-align:center;
}
.helpdiv {
 	display:none;
	border:2px solid #000000;
	background:#fff;
	width:500px;
	padding:4px;
	position:absolute;
}
</style>
<script  language="javascript">
function Post()
{
	if (document.form1.filename.value=="")
	{
		alert("文件名不能为空。");
		document.form1.filename.focus();
		return false;
	}
}
</script>
<script type="text/javascript" src="js/codemirror.js"></script>
<script type="text/javascript" src="js/mode/xml/xml.js"></script>
<script type="text/javascript" src="js/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="js/mode/css/css.js"></script>
<script type="text/javascript" src="js/mode/php/php.js"></script>
<script type="text/javascript" src="js/mode/clike/clike.js"></script>
<script type="text/javascript" src="js/mode/htmlmixed/htmlmixed.js"></script>
</head>
<body bgcolor="#F2F4F3" leftmargin="8">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ECFAD3" style="margin-bottom:8px;">
  <tr> 
    <td height="28" style="border:1px dotted #BFD67C" background="images/wbg.gif" >&nbsp;&nbsp;◇<a href='templets_tagsource.php'><b>标签源码碎片管理</b></a> &gt;&gt; <b><?php echo $title; ?></b>
	  </td>
  </tr>
</table>
<form method="POST" action="tpl.php" name=form1 onSubmit="return Post()">
<input type="hidden" name="actiondo" value="<?php echo $action; ?>" />
<input type="hidden" name="action" value="savetagfile" />
<input type="hidden" name="<?php echo $_csrf['name'];?>" value="<?php echo $_csrf['hash'];?>" />
	<table width="100%"  border='0' cellpadding='3' cellspacing='1' bgcolor='#cfcfcf' align="center">
		<tr bgcolor='#EEF4EA'>
			<td colspan='2' background='images/wbg.gif' height='26' style="padding-left:10px;">
					<font color='#666600'><b><?php echo $title; ?></b>(修改源码如果出现语法错误，可能导致标签无法使用，请修改前先作好数据备份)</font>
			</td>
		</tr>
		<tr bgcolor='#FFFFFF'>
  		<td>文件名称</td>
  		<td>
  			<input name=filename size=40 value="<?php echo $filename; ?>" class="alltxt"/>
    		（不允许用 “..” 形式的路径）
  		</td>
		</tr>
		<tr bgcolor='#FFFFFF'>
  		<td> 标签格式说明 </td>
  		<td>
  			标签文件名为：标签名.lib.php <br />
  			接口函数定义为：function lib_标签名(&$ctag,&$refObj)，返回值是结果字符串<br />
  			修改标签时为了防止出错，您也可以修改它的名称(同时修改文件名和函数名)，这样等同继承了原来标签的代码建立一个新的标签。
  		</td>
		</tr>
    <tr bgcolor='#FFFFFF'>
      <td colspan='2' >
	  <textarea id="content" name="content" cols="150" rows="24" style="width:99%;height:450px"><?php echo $democode; ?></textarea>
	  </td>
    </tr>
    <tr>
      <td height="42" colspan='2'  bgcolor="#F2F2F2">
          <input type="submit" value="  保 存  " name='B1' class="coolbg np" />
          &nbsp;
          <input type="reset" value="取消修改" name='B2' class="coolbg np" />
          &nbsp;
          <input type="button" value="不理返回" name='B4' class="coolbg np" onClick="javascript:history.go(-1);" />
      </td>
    </tr>
</table> 
 </form>
 <script type="text/javascript">
    var editor = CodeMirror.fromTextArea(document.getElementById('content'), {
        lineNumbers: true,
        lineWrapping: true,
        mode: 'text/x-php'
    });
</script>
</body>
</html>
