📄 addjstemp.php
字号:
<?php
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"template");
$gid=(int)$_GET['gid'];
$gname=CheckTempGroup($gid);
$urlgname=$gname." -> ";
$cid=$_GET['cid'];
$enews=$_GET['enews'];
$r[showdate]="[m-d]";
$url=$urlgname."<a href=ListJstemp.php?gid=$gid>管理JS模板</a> -> 增加JS模板";
//复制
if($enews=="AddJstemp"&&$_GET['docopy'])
{
$tempid=(int)$_GET['tempid'];
$r=$empire->fetch1("select tempid,tempname,temptext,classid,showdate from ".GetDoTemptb("enewsjstemp",$gid)." where tempid=$tempid");
$url=$urlgname."<a href=ListJstemp.php?gid=$gid>管理JS模板</a> -> 复制JS模板: ".$r[tempname];
}
//修改
if($enews=="EditJstemp")
{
$tempid=(int)$_GET['tempid'];
$r=$empire->fetch1("select tempid,tempname,temptext,classid,showdate from ".GetDoTemptb("enewsjstemp",$gid)." where tempid=$tempid");
$url=$urlgname."<a href=ListJstemp.php?gid=$gid>管理JS模板</a> -> 修改JS模板: ".$r[tempname];
}
//分类
$cstr="";
$csql=$empire->query("select classid,classname from {$dbtbpre}enewsjstempclass order by classid");
while($cr=$empire->fetch($csql))
{
$select="";
if($cr[classid]==$r[classid])
{
$select=" selected";
}
$cstr.="<option value='".$cr[classid]."'".$select.">".$cr[classname]."</option>";
}
db_close();
$empire=null;
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加JS模板</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
<SCRIPT lanuage="JScript">
<!--
function tempturnit(ss)
{
if (ss.style.display=="")
ss.style.display="none";
else
ss.style.display="";
}
-->
</SCRIPT>
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td height="25">位置:<?=$url?></td>
</tr>
</table>
<form name="form1" method="post" action="ListJstemp.php">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr class="header">
<td height="25" colspan="2">增加JS模板
<input name="enews" type="hidden" id="enews" value="<?=$enews?>"> <input name="tempid" type="hidden" id="tempid" value="<?=$tempid?>">
<input name="cid" type="hidden" id="cid" value="<?=$cid?>"> <input name="gid" type="hidden" id="gid" value="<?=$gid?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">模板名称(*)</td>
<td width="81%" height="25"> <input name="tempname" type="text" id="tempname" value="<?=$r[tempname]?>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">所属分类</td>
<td height="25"><select name="classid" id="classid">
<option value="0">不隶属于任何类别</option>
<?=$cstr?>
</select> <input type="button" name="Submit6222322" value="管理分类" onclick="window.open('JsTempClass.php');"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">时间显示格式</td>
<td height="25"><input name="showdate" type="text" id="showdate" value="<?=$r[showdate]?>" size="20">
<select name="select4" onchange="document.form1.showdate.value=this.value">
<option value="Y-m-d H:i:s">选择</option>
<option value="Y-m-d H:i:s">2005-01-27 11:04:27</option>
<option value="Y-m-d">2005-01-27</option>
<option value="m-d">01-27</option>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"><strong>模板内容</strong>(*)</td>
<td height="25">请将模板内容<a href="#ecms" onclick="window.clipboardData.setData('Text',document.form1.temptext.value);document.form1.temptext.select()" title="点击复制模板内容"><strong>复制到Dreamweaver(推荐)</strong></a>或者使用<a href="#ecms" onclick="window.open('editor.php?getvar=opener.document.form1.temptext.value&returnvar=opener.document.form1.temptext.value&fun=ReturnHtml¬fullpage=1','edittemp','width=880,height=600,scrollbars=auto,resizable=yes');"><strong>模板在线编辑</strong></a>进行可视化编辑</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"><div align="center">
<textarea name="temptext" cols="90" rows="18" id="temptext" wrap="OFF" style="WIDTH: 100%"><?=htmlspecialchars(stripSlashes($r[temptext]))?></textarea>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"> [<a href="#ecms" onclick="tempturnit(showtempvar);">显示模板变量说明</a>]</td>
</tr>
<tr bgcolor="#FFFFFF" id="showtempvar" style="display:none">
<td height="25" colspan="2"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td width="34%" height="23">
<input name="textfield" type="text" value="[!--title--]">
:标题</td>
<td width="33%" height="23">
<input name="textfield2" type="text" value="[!--titleurl--]">
:标题链接</td>
<td width="33%">
<input name="textfield3" type="text" value="[!--writer--]">
:作者</td>
</tr>
<tr>
<td height="23"><input name="textfield9" type="text" value="[!--oldtitle--]">
:标题alt</td>
<td height="23"><input name="textfield4" type="text" value="[!--newstime--]">
:发布时间</td>
<td><input name="textfield22" type="text" value="[!--titlepic--]">
:标题图片</td>
</tr>
<tr>
<td height="23"> <p>
<input name="textfield6" type="text" value="[!--id--]">
:信息ID</p></td>
<td height="23"><input name="textfield5" type="text" value="[!--classid--]">
:栏目ID</td>
<td><input name="textfield8" type="text" value="[!--classurl--]">
:栏目链接</td>
</tr>
<tr>
<td height="23"><input name="textfield7" type="text" value="[!--classname--]">
:栏目名称</td>
<td height="23"> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> </td>
<td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">模板格式:</td>
<td height="25">列表头[!--empirenews.listtemp--]列表内容[!--empirenews.listtemp--]列表尾</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -