<!--#include file="../../conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/const.asp"-->
<!--#include file="../inc/check.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewAsp Content Management System Version 4.0
' 文件名称：admin_makelabel.asp
' 更新日期：2008-05-16
' 官方网站：新云网络(www.newasp.net www.newasp.cn) QQ：94022511
'=====================================================================
' Copyright 2003-2008 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
%>
<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="200" align="left">生成模板标签</td>
		<td class="tableline" width="*" align="right"><a href="admin_template.asp">模板首页</a>
			 - <a href="admin_makelabel.asp">模板标签管理</a>
			 - <a href="?action=label">生成自定义标签</a>
			 - <a href="?action=readme">模板标签说明</a>
			 - <a href="admin_setting.asp">基本设置</a>
			 - <a href="admin_badword.asp">过滤字符管理</a>&lsaquo;&lsaquo;&rsaquo;&rsaquo;
		</td>
	</tr>
</table>
<%
Dim Action
If Not ChkAdmin("Makelabel") Then
	Call Transfer_error()
End If

Action = LCase(Request("action"))
Select Case Trim(Action)
	Case "label"			: Call makeLabel()
	Case "readme"			: Call LabelReadme()
	Case Else
		Call showmain
End Select
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
NewAsp.PageEnd

Sub showmain()
%>
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="3">相关模板通用标签说明</th>
</tr>
<tr>
	<td width="20%" class="tablerow1">{$installdir}</td>
	<td width="1%" class="tablerow1">&nbsp;</td>
	<td width="79%" class="tablerow1">系统安装目录，应该用于所有模板中，主要是用于图片等URL的校正。</td>
</tr>
<tr>
	<td class="tablerow2">{$channeldir}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">频道目录，用于各频道模板中。</td>
</tr>
<tr>
	<td class="tablerow1">{$channelid}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">频道ID标签，用于各频道模板中，用于频道模板中显示频道ID。</td>
</tr>
<tr>
	<td class="tablerow2">{$classid}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">分类ID标签，用于模板中显示分类ID。</td>
</tr>
<tr>
	<td class="tablerow1">{$tag:channelname}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">频道名称标签，用于各频道模板中显示频道名称。</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:sitedomain}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">系统域名标签，用于模板中调用主域名。</td>
</tr>
<tr>
	<td class="tablerow1">{$tag:skinpath}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">皮肤路径标签。</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:sitename}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">网站名称标签，用于模板中显示当前网站名称。</td>
</tr>
<tr>
	<td class="tablerow1">{$tag:email}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">系统管理员邮箱标签。</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:keyword}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">网站关键字标签，用于显示关键字，网站关键字请在基本设置中修改。</td>
</tr>
<tr>
	<td class="tablerow1">{$tag:copyright}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">网站版权信息标签，用于网站底部显示网站版权信息。</td>
</tr>
<tr>
	<td class="tablerow2">{$pagetitle}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">网站标题标签，用于显示网页标题。</td>
</tr>

<tr>
	<td class="tablerow1">{$tag:sitename}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">网站名称标签，用于显示当前网站名称。</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:refreshdate}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">刷新时间标签，用于显示当前时间。</td>
</tr>
<tr>
	<td class="tablerow1">{$tag:modulename}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">频道模块名称，用于模板中显示模块名，相关模块名请在频道设置中修改。</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:codefile}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">验证码文件路径。</td>
</tr>
<tr>
	<td class="tablerow1">{$xml:channelmenu}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">频道菜单标签，使用方法：{$xml:channelmenu file="channelmenu.xslt"}</td>
</tr>
<tr>
	<td class="tablerow2">{$tag:randomcode}</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">16位随机码，{$tag:random} 8位随机码。</td>
</tr>
<tr>
	<td class="tablerow1">{$version}</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">系统版本信息</td>
</tr>
<tr>
	<td colspan="3" class="tablerow2"><ol>
		<li>注意所有标签的大小写，所有标签均为小写。</li>
	</ol>
	</td>
</tr>
</table>
<%
End Sub

Sub makeLabel()
	Dim Rs
	If ChannelID=0 Then ChannelID=1
%><form action="" method="get" name="myform" id="myform">
<input type="hidden" name="action" value="label" />
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="5">生成相关模板自定义标签</th>
</tr>
<tr>
	<td width="20%" class="tablerow1">所属频道</td>
	<td width="30%" class="tablerow1" id="ChannelText"><select name="ChannelID" size="1" onchange="javascript:submit()">
<%
Set Rs = NewAsp.Execute("SELECT ChannelID,ChannelName,ModuleName FROM NC_Channel WHERE ChannelType<2 And ChannelID<>4 And ChannelID<>3 ORDER BY ChannelID ASC")
Do While Not Rs.EOF
%>
		<option value="<%=Rs("ChannelID")%>"<%If Rs("ChannelID") = ChannelID Then Response.Write " selected"%>><%=Rs("ChannelName")%></option>
<%
	Rs.movenext
Loop
Set Rs = Nothing
%>
	</select></td>
	<td width="1%" class="tablerow1">&nbsp;</td>
	<td width="20%" class="tablerow1">所属分类</td>
	<td width="29%" class="tablerow1"><%Call selectClass(ChannelID)%></td>
</tr>
<tr>
	<td class="tablerow2">所属专题</td>
	<td class="tablerow2"><select name="specialid">
	<option value="0">不选择专题</option>
<%
If ChannelID > 0 Then
	Set Rs = Newasp.Execute("SELECT SpecialID,SpecialName FROM NC_Special WHERE ChannelID="& ChannelID &" And ChangeLink=0")
	Do While Not Rs.EOF
%>
		<option value="<%=Rs("SpecialID")%>"><%=Rs("SpecialName")%></option>
<%
		Rs.movenext
	Loop
	Set Rs = Nothing
End If
%>
	</select></td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">调用类型</td>
	<td class="tablerow2"><select name="type">
          <option value="0" selected="selected">最新更新</option>
          <option value="1">最新推荐</option>
	      <option value="2">最新热门</option>
		  <option value="3">热门推荐</option>
	      <option value="4">最新置顶</option>
		  <option value="5">图片新闻</option>
	      <option value="6">本日热门</option>
		  <option value="7">本周热门</option>
	      <option value="8">本月热门</option>
		  <option value='9'>随机显示列表</option>
        </select></td>
</tr>
<tr>
	<td class="tablerow1">xslt文件</td>
	<td class="tablerow1"><input type="text" name="file" id="file" size="15" value="newslist.xslt" class="alingmid" />
		<select name="selfile" class="alingmid" onChange="file.value=this.value;">
			<option value="">常用XSLT文件</option>
			<option value="newslist.xslt">文章XSLT</option>
			<option value="softlist.xslt">软件XSLT</option>
			<option value="flashlist.xslt">动画XSLT</option>
			<option value="image.xslt">图片XSLT</option>
			<option value="pixviewer.xslt">幻灯片XSLT一</option>
			<option value="bcastr31.xslt">幻灯片XSLT二</option>
			<option value="toplist.xslt">排行XSLT</option>
		</select>
	</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">标签缓存(不缓存填0)</td>
	<td class="tablerow1"><input type="text" name="setcache" size="15" value="0" /></td>
</tr>
<tr>
	<td class="tablerow2">最多列表数</td>
	<td class="tablerow2"><input type="text" name="maxnum" size="15" value="12" /></td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">标题字符长度</td>
	<td class="tablerow2"><input type="text" name="length" size="15" value="42" /></td>
</tr>
<tr>
	<td class="tablerow1">每 行 数(不设置填0)</td>
	<td class="tablerow1"><input type="text" name="eachline" size="10" value="0" /></td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">省略符号(不设置填0)</td>
	<td class="tablerow1"><input type="text" name="ellipsis" size="10" value="..." /></td>
</tr>
<tr>
	<td class="tablerow2">是否显示日期</td>
	<td class="tablerow2"><select name="showdate">
          <option value="0" selected="selected">不显示</option>
          <option value="1">显示</option>
        </select></td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">是否显示分类</td>
	<td class="tablerow2"><select name="showcate">
          <option value="0" selected="selected">不显示</option>
          <option value="1">显示</option>
        </select></td>
</tr>
<tr>
	<td class="tablerow1">日期格式</td>
	<td class="tablerow1"><input type="text" name="datemode" id="datemode" size="15" value="yyyy-MM-dd" class="alingmid" />
		<select name="seldatemode" class="alingmid" onChange="datemode.value=this.value;">
			<option value="yyyy-MM-dd">yyyy-MM-dd</option>
			<option value="MM-dd">MM-dd</option>
			<option value="yyyy">yyyy</option>
			<option value="yyyy-MM-dd hh:mm:ss">yyyy-MM-dd hh:mm:ss</option>
		</select>
	</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">是否显示图片</td>
	<td class="tablerow1"><select name="image">
          <option value="0" selected="selected">不显示</option>
          <option value="1">显示</option>
        </select></td>
</tr>
<tr>
	<td class="tablerow2">图片宽度</td>
	<td class="tablerow2"><input type="text" name="width" size="10" value="135" /></td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">图片高度</td>
	<td class="tablerow2"><input type="text" name="height" size="10" value="100" /></td>
</tr>
<%If NewAsp.modules=2 Then%>
<tr>
	<td class="tablerow1">软件类型</td>
	<td class="tablerow1"><input type="text" name="stype" id="stype" size="15" value="国产软件" class="alingmid" />
		<select name="seldatemode" class="alingmid" onChange="stype.value=this.value;">
			<option value="国产软件">国产软件</option>
			<option value="国外软件">国外软件</option>
			<option value="汉化软件">汉化软件</option>
			<option value="绿色软件">绿色软件</option>
		</select>
	</td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">是否调用软件类型</td>
	<td class="tablerow1"><select name="showtype">
          <option value="0" selected="selected">不调用</option>
          <option value="1">调用</option>
        </select></td>
</tr>
<%End If%>
<tr>
	<td colspan="5" class="tablerow1"><textarea name="customlabel" id="customlabel" style="width:100%" cols="75" rows="3"></textarea><br/>
	<input type="button" name="make_button" onclick="makeTagCode()" value="生成自定义标签" class="button">
	<input type="button" name="copy_button" onclick="doCopy('customlabel')" value="复制" class="button">
	<input type="button" name="make2_button" onclick="makeTagCode(true)" value="生成自定义标签" class="button"></td>
</tr>
</table>
</form>
<form action="" method="get" name="myform1" id="myform1">
<input type="hidden" name="action" value="label" />
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="5">生成分类菜单标签</th>
</tr>
<tr>
	<td width="20%" class="tablerow1">所属频道</td>
	<td width="30%" class="tablerow1" id="showChannel1"></td>
	<td width="1%" class="tablerow1">&nbsp;</td>
	<td width="20%" class="tablerow1">分类ID（0=所有分类）</td>
	<td width="29%" class="tablerow1"><input type="text" name="classid" size="25" value="0" /></td>
</tr>
<tr>
	<td class="tablerow2">xslt文件</td>
	<td class="tablerow2"><input type="text" name="file" id="file" size="25" value="classmenu.xslt" />
	</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">设置标签缓存(不缓存填0)</td>
	<td class="tablerow2"><input type="text" name="setcache" size="25" value="0" /></td>
</tr>
<tr>
	<td class="tablerow1">最 多 数（不限制填0）</td>
	<td class="tablerow1"><input type="text" name="maxnum" size="10" value="12" /></td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">默认频道</td>
	<td class="tablerow1"><input type="text" name="defaults" size="10" value="0" /></td>
</tr>
<tr>
	<td colspan="5" class="tablerow2"><input type="text" name="classmenulabel" id="classmenulabel" size="70" />
	<input type="button" name="make_button" onclick="makeClassMenuCode()" value="生成标签" class="button">
	<input type="button" name="copy_button" onclick="doCopy('classmenulabel')" value="复制" class="button">
	<input type="button" name="make2_button" onclick="makeClassMenuCode(true)" value="生成标签" class="button"></td>
</tr>
</table>
</form>
<form action="" method="get" name="myform2" id="myform2">
<input type="hidden" name="action" value="label" />
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="5">生成专题菜单标签</th>
</tr>
<tr>
	<td width="20%" class="tablerow1">所属频道</td>
	<td width="30%" class="tablerow1" id="showChannel2"></td>
	<td width="1%" class="tablerow1">&nbsp;</td>
	<td width="20%" class="tablerow1">调用类型</td>
	<td width="29%" class="tablerow1"><select name="type">
          <option value="0">不显示其它菜单</option>
          <option value="1" selected="selected">显示其它菜单</option>
        </select></td>
</tr>
<tr>
	<td class="tablerow2">xslt文件</td>
	<td class="tablerow2"><input type="text" name="file" id="file" size="25" value="specialmenu.xslt" />
	</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">设置标签缓存(不缓存填0)</td>
	<td class="tablerow2"><input type="text" name="setcache" size="25" value="0" /></td>
</tr>
<tr>
	<td class="tablerow1">最 多 数（不限制填0）</td>
	<td class="tablerow1"><input type="text" name="maxnum" size="10" value="0" /></td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">默认频道</td>
	<td class="tablerow1"><input type="text" name="defaults" size="10" value="0" /></td>
</tr>
<tr>
	<td colspan="5" class="tablerow2"><input type="text" name="speciallabel" id="speciallabel" size="70" />
	<input type="button" name="make_button" onclick="makeSpecialCode()" value="生成标签" class="button">
	<input type="button" name="copy_button" onclick="doCopy('speciallabel')" value="复制" class="button">
	<input type="button" name="make2_button" onclick="makeSpecialCode(true)" value="生成标签" class="button"></td>
</tr>
</table>
</form>
<form action="" method="get" name="myform3" id="myform3">
<input type="hidden" name="action" value="label" />
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="5">生成友情链接标签</th>
</tr>
<tr>
	<td width="20%" class="tablerow1">链接类型</td>
	<td width="30%" class="tablerow1"><select name="islogo">
          <option value="0">文字链接</option>
          <option value="1" selected="selected">LOGO链接</option>
        </select></td>
	<td width="1%" class="tablerow1">&nbsp;</td>
	<td width="20%" class="tablerow1">排序方式</td>
	<td width="29%" class="tablerow1"><select name="type">
          <option value="0" selected="selected">按时间降序排列</option>
          <option value="1">按时间升序排列</option>
		  <option value="2">按点击数升序排列</option>
		  <option value="3">按点击数降序排列</option>
		  <option value="4">按升序排列</option>
		  <option value="5">按降序排列</option>
		  <option value="6">按点击数升序排列</option>
		  <option value="7">按点击数降序排列</option>
		  <option value="8">按名称升序排列</option>
		  <option value="8">按名称降序排列</option>
        </select></td>
</tr>
<tr>
	<td class="tablerow2">xslt文件</td>
	<td class="tablerow2"><input type="text" name="file" id="file" size="25" value="friendlink.xslt" />
	</td>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2">设置标签缓存(不缓存填0)</td>
	<td class="tablerow2"><input type="text" name="setcache" size="25" value="0" /></td>
</tr>
<tr>
	<td class="tablerow1">最 多 数</td>
	<td class="tablerow1"><input type="text" name="maxnum" size="10" value="20" /></td>
	<td class="tablerow1">&nbsp;</td>
	<td class="tablerow1">每 行 数</td>
	<td class="tablerow1"><input type="text" name="eachline" size="10" value="10" /></td>
</tr>
<tr>
	<td colspan="5" class="tablerow2"><input type="text" name="friendlinklabel" id="friendlinklabel" size="70" />
	<input type="button" name="make_button" onclick="makeLinksCode()" value="生成标签" class="button">
	<input type="button" name="copy_button" onclick="doCopy('friendlinklabel')" value="复制" class="button">
	<input type="button" name="make2_button" onclick="makeLinksCode(true)" value="生成标签" class="button"></td>
</tr>
</table>
</form>
<script type="text/javascript">
<!--
document.getElementById("showChannel1").innerHTML = document.getElementById("ChannelText").innerHTML;
document.getElementById("showChannel2").innerHTML = document.getElementById("ChannelText").innerHTML;

function makeClassMenuCode(e) {
	var form1=document.myform1;
	var strCode;
	strCode='{$xml:classmenu';
	strCode+=' file="'+form1.file.value+'"'
	strCode+=' channelid="'+form1.ChannelID.value+'"'
	if(form1.classid.value!="" && form1.classid.value!=0){
		strCode+=' classid="'+form1.classid.value+'"'
	}
	if(form1.setcache.value!="" && form1.setcache.value!=0){
		strCode+=' setcache="'+form1.setcache.value+'"'
	}
	if(form1.maxnum.value!="" && form1.maxnum.value!=0){
		strCode+=' maxnum="'+form1.maxnum.value+'"'
	}
	if(form1.defaults.value!="" && form1.defaults.value!=0){
		strCode+=' default="'+form1.defaults.value+'"'
	}
	strCode+='}';
	if(e!=null){
		strCode = strCode.replace(/"/ig,"'");
	}
	form1.classmenulabel.value=strCode;
}
function makeSpecialCode(e) {
	var form1=document.myform2;
	var strCode;
	strCode='{$xml:specialmenu';
	strCode+=' file="'+form1.file.value+'"'
	strCode+=' channelid="'+form1.ChannelID.value+'"'
	if(form1.type.value!="" && form1.type.value!=0){
		strCode+=' type="'+form1.type.value+'"'
	}
	if(form1.setcache.value!="" && form1.setcache.value!=0){
		strCode+=' setcache="'+form1.setcache.value+'"'
	}
	if(form1.maxnum.value!="" && form1.maxnum.value!=0){
		strCode+=' maxnum="'+form1.maxnum.value+'"'
	}
	if(form1.defaults.value!="" && form1.defaults.value!=0){
		strCode+=' default="'+form1.defaults.value+'"'
	}
	strCode+='}';
	if(e!=null){
		strCode = strCode.replace(/"/ig,"'");
	}
	form1.speciallabel.value=strCode;
}
function makeLinksCode(e) {
	var form1=document.myform3;
	var strCode;
	strCode='{$xml:friendlink';
	strCode+=' file="'+form1.file.value+'"'
	strCode+=' islogo="'+form1.islogo.value+'"'
	if(form1.type.value!="" && form1.type.value!=0){
		strCode+=' type="'+form1.type.value+'"'
	}
	if(form1.setcache.value!="" && form1.setcache.value!=0){
		strCode+=' setcache="'+form1.setcache.value+'"'
	}
	if(form1.maxnum.value!="" && form1.maxnum.value!=0){
		strCode+=' maxnum="'+form1.maxnum.value+'"'
	}
	if(form1.eachline.value!="" && form1.eachline.value!=0){
		strCode+=' eachline="'+form1.eachline.value+'"'
	}
	strCode+=' linkmode="1"}';
	if(e!=null){
		strCode = strCode.replace(/"/ig,"'");
	}
	form1.friendlinklabel.value=strCode;
}
function makeTagCode(e) {
	var form1=document.myform;
	var strCode;
<%
	Select Case NewAsp.ChkNumeric(NewAsp.modules)
	Case 1
		Response.Write "strCode='{$xml:newslist';"
	Case 2
		Response.Write "strCode='{$xml:softlist';"
	Case 5
		Response.Write "strCode='{$xml:flashlist';"
	Case Else
		Response.Write "strCode='{$xml:newslist';"
	End Select
%>
	strCode+=' file="'+form1.file.value+'"'
	strCode+=' channelid="'+form1.ChannelID.value+'"'
	if(form1.classid.value!="" && form1.classid.value!=0){
		strCode+=' classid="'+form1.classid.value+'"'
	}
	if(form1.specialid.value!="" && form1.specialid.value!=0){
		strCode+=' specialid="'+form1.specialid.value+'"'
	}
	if(form1.type.value!="" && form1.type.value!=0){
		strCode+=' type="'+form1.type.value+'"'
	}
	if(form1.setcache.value!="" && form1.setcache.value!=0){
		strCode+=' setcache="'+form1.setcache.value+'"'
	}
	strCode+=' maxnum="'+form1.maxnum.value+'"'
	if(form1.length.value!="" && form1.length.value!=0){
		strCode+=' length="'+form1.length.value+'"'
	}
	if(form1.eachline.value!="" && form1.eachline.value!=0){
		strCode+=' eachline="'+form1.eachline.value+'"'
	}
	if(form1.ellipsis.value!="..."){
		strCode+=' ellipsis="'+form1.ellipsis.value+'"'
	}
	if(form1.showdate.value!="" && form1.showdate.value!=0){
		strCode+=' showdate="'+form1.showdate.value+'"'
		strCode+=' datemode="'+form1.datemode.value+'"'
	}
	if(form1.showcate.value!="" && form1.showcate.value!=0){
		strCode+=' showcate="'+form1.showcate.value+'"'
	}
	if(form1.image.value!="" && form1.image.value!=0){
		strCode+=' image="'+form1.image.value+'"'
		strCode+=' width="'+form1.width.value+'"'
		strCode+=' height="'+form1.height.value+'"'
	}
	<%If NewAsp.modules=2 Then%>
	if(form1.showtype.value!="" && form1.showtype.value!=0){
		strCode+=' showtype="'+form1.showtype.value+'"'
		strCode+=' stype="'+form1.stype.value+'"'
	}
	<%End If%>
	strCode+='}';
	if(e!=null){
		strCode = strCode.replace(/"/ig,"'");
	}
	form1.customlabel.value=strCode;
}
//-->
</script>
<%
End Sub

Sub LabelReadme()
%>
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th>模板标签说明</th>
</tr>
<tr>
	<td class="tablerow1"><p>模板以HTML等文本方式保存在“_template”目录中，你可以对此目录中模板文件用网页设计软件直接编辑。默认模板的选用请在基本设置中修改。<br/>
	<b>模板结构说明</b>：打开模板目录（如：default目录），你会看到相关模板文件和目录。
	<ol>
	<li><b>include</b> -- 包含文件目录，模板中的通用代码可以放在这里，标签调用方式&lt;!--$include file="<font color="red">header.html</font>"--&gt;；红色部分为包含的文件名。</li>
	<li><b>xslt</b> -- 自定义标签的xslt文件。如：{$xml:softlist file="<font color="red">softlist.xslt</font>"}；如果红色部分就是调用的xslt文件，你可以对此文件进行修改，但必需对XML有一定的了解。</li>
	<li><b>users</b> -- 用户管理中心模板目录。</li>
	<li><b>link</b> -- 友情链接模板目录</li>
	<li><b>Channel_1</b> -- 默认文章频道模块的模板目录，目录名中的数字为频道ID，如果你克隆了其它频道，并且此频道要使用不同的模板，你可以将此目录拷贝一份，然后修改文件夹中数字为你的频道ID。</li>
	<li><b>Channel_2</b> -- 默认下载频道模块的模板目录。</li>
	<li><b>Channel_3</b> -- 默认动画频道模块的模板目录。</li>
	<li>如果你克隆的频道找不到相对应的模板目录，程序会自动使用相对应的默认模板。</li>
	</ol>
	<b>部分模板文件说明</b>：
	<ol>
	<li><b>index.html</b> -- 系统首页或者频道首页模板。</li>
	<li><b>search.html</b> -- 搜索模板，其它模板的作用，可以打开模板管理看到中文说明</li>
	<li><b>config.xml</b> -- 模板配置文件，每一个模板目录都针对一个配置文件，请在后台模板管理中点击“<font color="red">编辑模板配置文件(config.xml)</font>”进行修改。</li>
	<li><b>list.html</b> -- 分类列表模板，为不同的分类列表设置不同的模板方法（list<font color="red">_1</font>.html），数字部分为分类ID；（list<font color="red">-1</font>.html），数字部分为父分类ID</li>
	<li><b>list1.html</b> -- 父分类列表模板</li>
	<li><b>show.html</b> -- 文章内容或者软件信息页模板，此模板其它使用方法：（show<font color="red">_123</font>.html）,数字部分为软件或者文章ID；（show<font color="red">-1</font>.html），数字部分为父分类ID</li>
	</ol>
	<b>自定义标签说明</b>：<br/>
	{$xml:<font color="red">softlist</font> file="softlist.xslt" setcache="softlistnew0" type="0" classid="0" maxnum="12" length="42" showcate="1" showdate="1" datemode="yyyy-MM-dd" image="1" width="277" height="268"}
	<ol>
	<li>标签类型为红色部分来区分，newslist-文章标签；softlist-软件标签；flashlist-动画标签；channelmenu-频道菜单标签；classmenu-分类标签；userlist-用户标签；announcements-公告标签；friendlink-友情链接标签；taglist-标签列表；abcsearch-字母检索标签；specialmenu-专题菜单标签；statistic-统计标签。</li>
	<li>中间部分为标签属性，属性值请用双引号或者单引号引起来；所有标签的属性设置相同，不需要的属性可以不使用，因为这些属性都有它的默认值。</li>
	<li>file-文件属性；调用标签的xslt文件；此属性为必需。</li>
	<li>setcache-缓存属性；设置标签的缓存名，不设置缓存请设为“0”，缓存名请不要和其它标签的缓存相同。默认不缓存。</li>
	<li>type-类型标签；0=调用最新，1=调用推荐，2=调用热门；默认为最新。</li>
	<li>classid-分类ID属性；用于调用分类列表。</li>
	<li>channelid-频道ID属性，默认ID为0</li>
	<li>maxnum-最多数属性；限制调用列表的数量。默认为10。</li>
	<li>length-长度属性；限制标题的字符长度。默认为不限制</li>
	<li>showcate-显示分类属性；1=显示分类，0=不显示分类；默认为不显示。</li>
	<li>showdate-显示日期属性；1=显示日期，0=不显示；默认为不显示。</li>
	<li>datemode-日期格式属性，默认为“yyyy-MM-dd”。</li>
	<li>image-显示图片属性；1=显示图片，0=不显示；默认为不显示。</li>
	<li>width-宽度属性；用于设置图片的宽度。</li>
	<li>height-高度属性；用于设置图片的高度。</li>
	<li>说明：标签属性可以根据自己的要求添加删除，可以增加自定的属性。</li>
	</ol>
	<b>循环标签说明</b>：<br/>
	<ol>
	<li>{$topiclist:begin}-循环开始标签</li>
	<li>{$topiclist:end}-循环结束标签</li>
	</ol>
	<b>统计标签说明</b>：<br/>{$xml:statistic channel="news" channelid="0" type="0" classid="0" setcache="0"}
	<ol>
	<li>channel频道属性-news=文章；soft=软件；flash=动画；user=用户</li>
	<li>channelid频道ID属性-不指定频道ID请填“0”；默认=0。</li>
	<li>type类型属性-0=总统计，1=今日更新，2=总点击数，3=软件大小统计；默认=0。</li>
	<li>classid分类ID属性-不指定分类请填“0”；默认=0。</li>
	<li>setcache缓存属性-不缓存请填“0”；默认=0，缓存名不能相同。</li>
	<li>stype软件类型属性-如stype='国产软件'。</li>
	</ol>
	<b>tag 标签</b>：{$xml:taglist file="taglist.xslt" channelid="1" type="1" maxnum="7"}<br/>
	<b>字母检索标签</b>：{$xml:abcsearch file="abc.xslt" channelid="2" forced="0"}<br/>
	<b>其它菜单标签</b>：{$newasp:moremenu(- )}；括号中间是菜单分隔符。<br/>
	<b>当前位置标签</b>：{$newasp:positions ( → )}；括号中间是分隔符，此标签只能用于列表模板。<br/>
	<b>系统公告标签</b>：{$xml:announcements file="announcements.xslt" maxnum="20" length="0" target="_blank" showdate="1" action="1" datemode="yyyy-MM-dd hh:mm:ss"}<br/>
	</p></td>
</tr>
</table>
<%
End Sub

Sub selectClass(chanid)
	Dim XMLDom,Node,i
	Response.Write "<select name=""classid"">" &  vbCrLf
	Response.Write "<option value=""0"">≡选择详细分类≡</option>" & vbCrLf
	On Error Resume Next

	If Not IsObject(Application(NewAsp.CacheName &"_classlist_" & chanid)) Then NewAsp.LoadClassList(chanid)
	Set XMLDom=Application(NewAsp.CacheName &"_classlist_" & chanid)
	If Not XMLDom is Nothing Then
		For Each Node In XMLDom.documentElement.selectNodes("row")
			Response.Write "<option value="""&Node.selectSingleNode("@classid").text&""">"
			If CLng(Node.selectSingleNode("@depth").text)=1 Then Response.Write "　├ "
			If CLng(Node.selectSingleNode("@depth").text)>1 Then
				For i=2 To CLng(Node.selectSingleNode("@depth").text)
					Response.Write "　"
				Next
				Response.Write "　├ "
			End If
			Response.Write Trim(Node.selectSingleNode("@classname").text)
			Response.Write "</option>" & vbCrLf
		Next
	End If
	Response.Write "</select>" & vbCrLf
	Set XMLDom = Nothing
End Sub

%>