edit_variable.tpl
来自「企业易站官方网站 下面是相关帮助信息: 1.企业易站官方网站 http://ww」· TPL 代码 · 共 165 行
TPL
165 行
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站发布-编辑变量</title>
<link href="main.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
{literal}
<script language="javascript">
<!--
function display_page(id)
{
if(id==1)
{
page_id.style.display = 'none';
}
else{
page_id.style.display = '';
}
}
function init_page()
{
if(document.listmenu.var_type.value==0)
{
page_id.style.display = '';
}
else{
page_id.style.display = 'none';
}
if(document.listmenu.data_type.value==3)
{
db_auto.style.display = '';
}
else if(document.listmenu.data_type.value==4)
{
db_hand.style.display = '';
}
else{
db_auto.style.display = 'none';
db_hand.style.display = 'none';
}
}
function display_data_set(id)
{
if(id==3 || id ==4)
{
if(id==3) //db auto
{
db_auto.style.display = '';
db_hand.style.display = 'none';
}
if(id==4) //db hand
{
db_auto.style.display = 'none';
db_hand.style.display = '';
}
}
else{
db_auto.style.display = 'none';
db_hand.style.display = 'none';
}
}
//-->
</script>
{/literal}
</head>
<body onLoad="javascript:init_page()" leftmargin="0" topmargin="0" rightmargin="0" marginheight="0" bgcolor="ffffee">
<br>
<form name="listmenu" action="add_variable.php" method="post">
{section name=layers loop=$item_array step=1}
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#f2f2f2" class=p9 >
<tr bgcolor="#7596E2">
<td colspan="2">
<div align="left"><strong><font color="#FFFFFF">编辑变量</font></strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap>名称</td>
<td>
<input name="var_name" type="text" size="30" value="{$item_array[layers].var_name}">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap>变量类型</td>
<td>
<select name="var_type" onChange="javascript:display_page(document.listmenu.var_type.value)">
<option value="0" {if $item_array[layers].var_type eq 0}selected{/if}>模板域变量</option>
<option value="1" {if $item_array[layers].var_type eq 1}selected{/if}>全局变量</option>
</select>
</td>
</tr>
<tr id="page_id" bgcolor="#FFFFFF" style="display:yes">
<td nowrap>所属模板</td>
<td>
<select name="page_id">
<option value="0" selected>选择模板</option>
{$page_option}
</select>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap>数据类型</td>
<td>
<select name="data_type" onChange="javascript:display_data_set(document.listmenu.data_type.value)">
<option value="0" {if $item_array[layers].data_type eq 0}selected{/if}>HTML文本</option>
<option value="1" {if $item_array[layers].data_type eq 1}selected{/if}>标题</option>
<option value="2" {if $item_array[layers].data_type eq 2}selected{/if}>图片</option>
<option value="3" {if $item_array[layers].data_type eq 3}selected{/if}>数据库自动</option>
<option value="4" {if $item_array[layers].data_type eq 4}selected{/if}>数据库手动</option>
<option value="5" {if $item_array[layers].data_type eq 5}selected{/if}>正文内嵌广告</option>
</select>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap>变量内容</td>
<td>
<textarea name="var_content" cols="80" rows="20">{$var_content}</textarea>
</td>
</tr>
<tr id="db_auto" bgcolor="#FFFFFF" style="display:none">
<td nowrap>数据设置</td>
<td>
<select name="type_id">
<option value="0">选择新闻类型</option>
新闻条数<input type="page_size" size="2">
<br>
更多页每页<input type="more_page_size" size="2">条
<br>
<input name="news_format" size="50" value='<a href=$href target="blank">$title</a>'>
</select>
</td>
</tr>
<tr id="db_hand" bgcolor="#FFFFFF" style="display:none">
<td nowrap>数据设置</td>
<td>
新闻条数<input type="page_size" size="2">
更多页每页<input type="more_page_size" size="2">条
<br>
<input name="news_format" size="50" value='<a href=$href target="blank">$title</a>'>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td nowrap>更新模板</td>
<td>
<input name="update_plt" type="radio" value=1 {if $item_array[layers].update_tpl eq 1}checked{/if}>更新模板
<input name="update_plt" type="radio" value=0 {if $item_array[layers].update_tpl eq 0}checked{/if}>>不更新模板
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2">
<div align="center">
<input name="var_id" type="hidden" id="var_id" value="{$item_array[layers].var_id}">
<input name="s_action" type="hidden" id="s_action" value="edit">
<input type="button" name="btn_back" value=" 返回 " onClick="javascript:history.back();">
<input name="btn_submit" type="submit" id="btn_submit" value=" 提交 ">
</div></td>
</tr>
</table>
<br>
{/section}
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?