<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
Response.Write "<base target=""_self"">" & vbNewLine
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewCloud Site Management System Version 2.0.0
' 文件名称：admin_label.asp
' 更新日期：2004-11-20
' 官方网站：新云网络(www.newasp.net) QQ：94022511
'=====================================================================
' Copyright 2002-2005 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
%>
<script language="javascript">
<!--
function copy() {
	document.myform.SkinCode.focus();
	document.myform.SkinCode.select();
	textRange = document.myform.SkinCode.createTextRange();
	textRange.execCommand("Copy");
}

function selflabel(){
	copy()
	window.close()
}
// -->
</script>
<%
Dim Action,i
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "list"
	Call Label_ContentList
Case "image"
	Call Label_ImageUse
Case "text"
	Call Label_PicAndText
Case Else
	Call showmain
End Select
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
%>
<BR style="OVERFLOW: hidden; LINE-HEIGHT: 5px">
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
	<td class=tablerow1>请将以上标签复制到模板相应的位置</td>
</tr>
</table>
<%
CloseConn
Private Sub showmain()
	%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
	<th>常用模板标签</th>
</tr>
<tr>
	<td class=tablerow1>{$InstallDir}&nbsp;&nbsp;&nbsp;&nbsp;系统安装路径  （系统自动生成）</td>
</tr>
<tr>
	<td class=tablerow2>{$SkinPath}&nbsp;&nbsp;&nbsp;&nbsp;皮肤图片路径</td>
</tr>
<tr>
	<td class=tablerow1>{$ChannelRootDir}&nbsp;&nbsp;&nbsp;&nbsp;频道目录路径</td>
</tr>
<tr>
	<td class=tablerow2>{$Version}&nbsp;&nbsp;&nbsp;&nbsp;下载系统版本信息</td>
</tr>
<tr>
	<td class=tablerow1>{$WebSiteName}&nbsp;&nbsp;&nbsp;&nbsp;网站名称 （在基本设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$WebSiteUrl}&nbsp;&nbsp;&nbsp;&nbsp;网站URL （在基本设置修改）</td>
</tr>
<tr>
	<td class=tablerow1>{$MasterMail}&nbsp;&nbsp;&nbsp;&nbsp;管理员E-Meil（在基本设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$Keyword}&nbsp;&nbsp;&nbsp;&nbsp;网站关键字 （在基本设置修改）</td>
</tr>
<tr>
	<td class=tablerow1>{$Copyright}&nbsp;&nbsp;&nbsp;&nbsp;网站版权信息 （在基本设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$Width}&nbsp;&nbsp;&nbsp;&nbsp;定义主表格宽度 </td>
</tr>
<tr>
	<td class=tablerow1>{$IndexPage}&nbsp;&nbsp;&nbsp;&nbsp;默认首页文件名</td>
</tr>
<tr>
	<td class=tablerow2>{$Style_CSS}&nbsp;&nbsp;&nbsp;&nbsp;CSS样式</td>
</tr>
<tr>
	<td class=tablerow1>{$PageTitle}&nbsp;&nbsp;&nbsp;&nbsp;HTML文件标题</td>
</tr>
<tr>
	<td class=tablerow2>{$TotalStatistics}&nbsp;&nbsp;&nbsp;&nbsp;系统总统计</td>
</tr>
<tr>
	<td class=tablerow1>{$RenewStatistics}&nbsp;&nbsp;&nbsp;&nbsp;更新信息统计</td>
</tr>
<tr>
	<td class=tablerow2>{$ChannelMenu}&nbsp;&nbsp;&nbsp;&nbsp;顶部频道菜单标签</td>
</tr>
<tr>
	<th>函数式标签“()”中间是参数,用“,”分开</th>
</tr>
<tr>
	<td class=tablerow1>{$CurrentStation( -&gt; )}&nbsp;&nbsp;&nbsp;&nbsp;当前位置“()”中间是分隔符</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadFriendLink(24,8,1,1)}<br>&nbsp;&nbsp;友情连接标签,1、显示最多连接数，2、每行显示连接数，3、连接类型，1=LOGO连接，0=文字连接，4、排序方式，1=是升序，0=降序</td>
</tr>
<tr>
	<td class=tablerow1>{$ReadClassMenu(1,0,8,8,|,navbar)}<br>&nbsp;&nbsp;分类菜单标签，1、频道ID；2、分类ID，0=所有分类；3、显示多少分类名称；4、每行显示多少分类名称；5、每个分类名称中间的分隔符；6、调用样式名</td>
</tr>
<tr>
	<td class=tablerow2>{$AnnounceContent()}<br>&nbsp;&nbsp;内容公告，如果()中间没有参数，就是最新内容公告，中间的参数是指定内容公告的标题。</td>
</tr>
<tr>
	<td class=tablerow1>{$ReadAnnounceList(0,12,22,1,1,2,1)}<br>&nbsp;&nbsp;列表公告标签：参数1、频道ID，0=所有频道，2、显示多少条公告，3、显示公告字符数，4、是否新窗口打开 1=是，0=否，5、是否显示时间 1=是，0=否
                                      6、时间模式，7、是否树型显示，1=是，0=否</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadClassMenubar({$ChannelID},{$ClassID},35,2,· )}<br>&nbsp;&nbsp;列表分类菜单，参数，1、频道ID，2、分类ID，3、最多显示分类数，4、每行显示分类数，5、分类名称前面的符号</td>
</tr>
<tr>
	<td class=tablerow1>{$ReadPopularArticle(1,0,3,24,10,1,_blank,·,showlist)}<br>&nbsp;&nbsp;文章排行函数标签,参数海1、频道ID，2、分类ID，3、调用类型（0=所有热门，1=本日排行，2=本周排行,3=本月排行，4=推荐排行），
							   4、显示字符长度，5、显示多少行，6、是否显示点击数，7、连接目标，8、样式名称</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadPopularSoft(2,0,0,24,10,1,_blank,·,showlist)}<br>&nbsp;&nbsp;软件排行函数标签,参数,1、频道ID，2、分类ID，3、调用类型（0=所有热门，1=本日排行，2=本周排行,3=本月排行，4=推荐排行），
							   4、显示字符长度，5、显示多少行，6、是否显示点击数，7、连接目标，8、样式名称</td>
</tr>
<tr>
	<td class=tablerow1>{$ReadSoftType(2,国产软件,24,10,1,1,5,1,showlist)}<br>&nbsp;&nbsp;软件类型函数标签，参数：1、频道ID，2、软件类型名称，3、显示字符长度，4、显示多少行，5、是否显示分类（1=是，0=否）
						      6、是否显示日期（1=显示，0=不显示） 7、显示日期模式 8、是否新窗口打开连接（1=新窗口，0=本窗口） 9、样式名称</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadGuestList(12,22,1,1,5,showlist)}<br>&nbsp;&nbsp;留言列表标签；参数：1、显示列表数，2、显示字符数，3、是否新窗口打开（1=新窗口打开，0=本窗口打开），4、是否显示日期（1=是，0=否），5、日期格式，6、样式名称</td>
</tr>
</table>
<%
End Sub
Private Sub Label_ContentList()
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
	<th colspan="2">生成<%=sModuleName%>模板标签</th>
</tr>
<form action="?action=list" method="post" name="myform" id="myform">
<tr>
	<td class=tablerow1 align="right">所属频道：</td>
	<td class=tablerow1><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 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>
</tr>
<tr>
	<td class=tablerow2 align="right">所属分类：</td>
	<td class=tablerow2><select name="ClassID" id="ClassID">
          <option value="0">所有<%=sModuleName%>分类</option>
<%
	Dim strSelectClass,re
	strSelectClass = Newasp.LoadSelectClass(ChannelID)
	Set re = New RegExp
        re.IgnoreCase = True
        re.Global = True
	Re.Pattern="(value=)(.*)("" )"
	strSelectClass = Re.Replace(strSelectClass,"")
	Re.Pattern="({ClassID=)(.*)(}>)"
	strSelectClass = Re.Replace(strSelectClass,"value=""$2"">")
	Response.Write strSelectClass
	Set Re = Nothing
%>
        </select><font color="#0066CC">&nbsp;&nbsp;如指定了分类,请选择类型分类</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">所属专题：</td>
	<td class=tablerow1><select name=SpecialID>
	<option value="0">不选择专题</option>
<%
If ChannelID <> 0 And ChannelID <> "" 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>
</tr>
<tr>
	<td class=tablerow2 align="right">调用类型：</td>
	<td class=tablerow2><select name="ShowType" id="ShowType">
          <option value="0">所有最新<%=sModuleName%></option>
          <option value='1'>所有推荐<%=sModuleName%></option>
	  <option value='2'>所有热门<%=sModuleName%></option>
<%
If CInt(Newasp.modules) = 1 Then
%>
	  <option value='3'>所有图文<%=sModuleName%></option>
	  <option value='4'>分类最新<%=sModuleName%></option>
	  <option value='5'>分类推荐<%=sModuleName%></option>
	  <option value='6'>分类热门<%=sModuleName%></option>
	  <option value='7'>分类图文<%=sModuleName%></option>
<%
Else
%>
	  <option value='3'>分类最新<%=sModuleName%></option>
	  <option value='4'>分类推荐<%=sModuleName%></option>
	  <option value='5'>分类热门<%=sModuleName%></option>
<%
End If
%>
        </select><font color="#0066CC">&nbsp;&nbsp;如选择了所有,分类选择无效</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">显示<%=sModuleName%>列表数：</td>
	<td class=tablerow1><input name="MaxListNum" type="text" id="MaxListNum" value="12" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow2 align="right">标题名称最多字符数：</td>
	<td class=tablerow2><input name="TitleMaxLen" type="text" id="TitleMaxLen" value="26" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否显示分类名称：</td>
	<td class=tablerow1><select name="ShowClass" id="ShowClass">
          <option value='0'>不显示分类名称</option>
	  <option value='1'>显示分类名称</option>
        </select></td>
</tr>
<%
If CInt(Newasp.modules) = 1 Then
%>
<tr>
	<td class=tablerow2 align="right">是否显示图文标题：</td>
	<td class=tablerow2><select name="ShowPic" id="ShowPic">
          <option value='1'>显示图文标题</option>
	  <option value='0'>不显示图文标题</option>
        </select></td>
</tr>
<%
End If
%>
<tr>
	<td class=tablerow1 align="right">是否显示日期：</td>
	<td class=tablerow1><select name="ShowDate" id="ShowDate">
          <option value='1'>显示日期</option>
	  <option value='0'>不显示日期</option>
        </select></td>
</tr>
<tr>
	<td class=tablerow2 align="right">显示日期的格式：</td>
	<td class=tablerow2><select name="DateMode" id="DateMode">
<%
For i = 1 To 9
	Response.Write "<option value='" & i & "'"
	If i = 5 Then Response.Write " selected"
	Response.Write ">"
	Response.Write Newasp.FormatDate(Now(),i)
	Response.Write "</option>" & vbCrLf
Next

%>
          
        </select></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否新窗口打开连接：</td>
	<td class=tablerow1><select name="newindow" id="newindow">
          <option value='0' selected>本窗口打开</option>
	  <option value='1'>新窗口打开</option>
        </select></td>
</tr>
<tr>
	<td class=tablerow2 align="right">列表调用样式名称：</td>
	<td class=tablerow2><input name="StyleName" type="text" id="StyleName" value="showlist" size="15" maxlength="20"></td>
</tr>
<tr align=center>
	<td class=tablerow1 colspan="2"><input type=text name=SkinCode size=65 id="SkinCode"></td>
</tr>
<tr align=center>
	<td class=tablerow2 colspan="2">
		<input name="MakeJS" type="button" id="MakeJS" onclick="MakeCode();" value="&nbsp;生成<%=sModuleName%>模板标签&nbsp;" class=button> 
		<input name="Copy" type="button" id="Copy" value="&nbsp;复制到剪贴板&nbsp;" onclick="copy();" class=button>
		<input type="button" value="&nbsp;关闭窗口&nbsp;" onclick="selflabel();" class=button> 
		</td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/JavaScript">
function MakeCode()
{
if(document.myform.ClassID.value=="")
{
	alert("<%=sModuleName%>分类不能指定外部栏目！");
	document.myform.ClassID.focus();
	return false;
}
if(document.myform.MaxListNum.value=="")
{
	alert("显示<%=sModuleName%>列表数不能为空！");
	document.myform.MaxListNum.focus();
	return false;
}
if(document.myform.TitleMaxLen.value=="")
{
	alert("标题名称最多字符数不能为空！");
	document.myform.TitleMaxLen.focus();
	return false;
}
if(document.myform.StyleName.value=="")
{
	alert("列表样式名称不能为空！");
	document.myform.StyleName.focus();
	return false;
}
var strCode;
<%
Select Case CInt(Newasp.modules)
	Case 1
		Response.Write "strCode=""{$ReadArticleList("";"
	Case 2
		Response.Write "strCode=""{$ReadSoftList("";"
	Case 3
		Response.Write "strCode=""{$ReadShopList("";"
	Case 5
		Response.Write "strCode=""{$ReadFlashList("";"
	Case Else
		Response.Write "strCode=""{$ReadArticleList("";"
End Select
%>
strCode+=document.myform.ChannelID.value+","
strCode+=document.myform.ClassID.value+","
strCode+=document.myform.SpecialID.value+","
strCode+=document.myform.ShowType.value+","
strCode+=document.myform.MaxListNum.value+","
strCode+=document.myform.TitleMaxLen.value+","
strCode+=document.myform.ShowClass.value+","
<%
If CInt(Newasp.modules) = 1 Then
%>
strCode+=document.myform.ShowPic.value+","
<%
End If
%>
strCode+=document.myform.ShowDate.value+","
strCode+=document.myform.DateMode.value+","
strCode+=document.myform.newindow.value+","
strCode+=document.myform.StyleName.value
strCode+=")}";
document.myform.SkinCode.value=strCode;
}
</script>

<%
End Sub

Private Sub Label_ImageUse()
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
	<th colspan="2">生成<%=sModuleName%>模板图片调用标签</th>
</tr>
<form action="?action=image" method="post" name="myform" id="myform">

<tr>
	<td class=tablerow1 align="right">所属频道：</td>
	<td class=tablerow1><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 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>
</tr>
<tr>
	<td class=tablerow2 align="right">所属分类：</td>
	<td class=tablerow2><select name="ClassID" id="ClassID">
          <option value="0">所有<%=sModuleName%>分类</option>
<%
	Dim strSelectClass,re
	strSelectClass = Newasp.LoadSelectClass(ChannelID)
	Set re = New RegExp
        re.IgnoreCase = True
        re.Global = True
	Re.Pattern="(value=)(.*)("" )"
	strSelectClass = Re.Replace(strSelectClass,"")
	Re.Pattern="({ClassID=)(.*)(}>)"
	strSelectClass = Re.Replace(strSelectClass,"value=""$2"">")
	Response.Write strSelectClass
	Set Re = Nothing
%>
        </select><font color="#0066CC">&nbsp;&nbsp;如指定了分类,请选择类型分类</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">所属专题：</td>
	<td class=tablerow1><select name=SpecialID>
	<option value="0">不选择专题</option>
<%
If ChannelID <> 0 And ChannelID <> "" 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>
</tr>
<tr>
	<td class=tablerow2 align="right">调用类型：</td>
	<td class=tablerow2><select name="ShowType" id="ShowType">
          <option value="0">所有最新<%=sModuleName%>图片</option>
          <option value='1'>所有推荐<%=sModuleName%>图片</option>
	  <option value='2'>所有热门<%=sModuleName%>图片</option>
	  <option value='3'>分类最新<%=sModuleName%>图片</option>
	  <option value='4'>分类推荐<%=sModuleName%>图片</option>
	  <option value='5'>分类热门<%=sModuleName%>图片</option>
        </select><font color="#0066CC">&nbsp;&nbsp;如选择了所有,分类选择无效</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">最多显示多少张<%=sModuleName%>图片：</td>
	<td class=tablerow1><input name="MaxPicNum" type="text" id="MaxPicNum" value="12" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow2 align="right">每行显示多少张<%=sModuleName%>图片：</td>
	<td class=tablerow2><input name="PerRowNum" type="text" id="PerRowNum" value="26" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow1 align="right">标题名称最多字符数：</td>
	<td class=tablerow1><input name="TitleMaxLen" type="text" id="TitleMaxLen" value="26" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow2 align="right">是否新窗口打开连接：</td>
	<td class=tablerow2><select name="newindow" id="newindow">
          <option value='0' selected>本窗口打开</option>
	  <option value='1'>新窗口打开</option>
        </select></td>
</tr>
<tr>
	<td class=tablerow1 align="right">图片的宽度：</td>
	<td class=tablerow1><input name="picwidth" type="text" id="picwidth" value="120" size="5" maxlength="3"> 像素</td>
</tr>
<tr>
	<td class=tablerow2 align="right">图片的高度：</td>
	<td class=tablerow2><input name="picheight" type="text" id="picheight" value="100" size="5" maxlength="3"> 像素</td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否显示<%=sModuleName%>标题名称：</td>
	<td class=tablerow1><select name="showtopic" id="showtopic">
          <option value='1'>显示</option>
	  <option value='0'>不显示</option>
        </select></td>
</tr>
<tr align=center>
	<td class=tablerow2 colspan="2"><input type=text name=SkinCode size=65 id="SkinCode"></td>
</tr>
<tr align=center>
	<td class=tablerow1 colspan="2">
		<input name="MakeJS" type="button" id="MakeJS" onclick="MakeCode();" value="&nbsp;生成<%=sModuleName%>模板标签&nbsp;" class=button> 
		<input name="Copy" type="button" id="Copy" value="&nbsp;复制到剪贴板&nbsp;" onclick="copy();" class=button>
		<input type="reset" name="button" value="&nbsp;关闭窗口&nbsp;" onclick="copy(); window.close()" class=button></td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/JavaScript">
function MakeCode()
{
if(document.myform.ClassID.value=="")
{
	alert("<%=sModuleName%>分类不能指定外部栏目！");
	document.myform.ClassID.focus();
	return false;
}
if(document.myform.MaxPicNum.value=="")
{
	alert("显示<%=sModuleName%>图片数不能为空！");
	document.myform.MaxPicNum.focus();
	return false;
}
if(document.myform.TitleMaxLen.value=="")
{
	alert("标题名称最多字符数不能为空！");
	document.myform.TitleMaxLen.focus();
	return false;
}
var strCode;
<%
Select Case CInt(Newasp.modules)
	Case 1
		Response.Write "strCode=""{$ReadArticlePic("";"
	Case 2
		Response.Write "strCode=""{$ReadSoftPic("";"
	Case 3
		Response.Write "strCode=""{$ReadShopPic("";"
	Case 5
		Response.Write "strCode=""{$ReadFlashPic("";"
	Case Else
		Response.Write "strCode=""{$ReadArticlePic("";"
End Select
%>
strCode+=document.myform.ChannelID.value+","
strCode+=document.myform.ClassID.value+","
strCode+=document.myform.SpecialID.value+","
strCode+=document.myform.ShowType.value+","
strCode+=document.myform.MaxPicNum.value+","
strCode+=document.myform.PerRowNum.value+","
strCode+=document.myform.TitleMaxLen.value+","
strCode+=document.myform.newindow.value+","
strCode+=document.myform.picwidth.value+","
strCode+=document.myform.picheight.value+","
strCode+=document.myform.showtopic.value
strCode+=")}";
document.myform.SkinCode.value=strCode;
}
</script>

<%	
End Sub
Private Sub Label_PicAndText()
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
	<th colspan="2">生成<%=sModuleName%>模板图文混排标签</th>
</tr>
<form action="?action=list" method="post" name="myform" id="myform">
<tr>
	<td class=tablerow1 align="right">所属频道：</td>
	<td class=tablerow1><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 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>
</tr>
<tr>
	<td class=tablerow2 align="right">所属分类：</td>
	<td class=tablerow2><select name="ClassID" id="ClassID">
          <option value="0">所有<%=sModuleName%>分类</option>
<%
	Dim strSelectClass,re
	strSelectClass = Newasp.LoadSelectClass(ChannelID)
	Set re = New RegExp
        re.IgnoreCase = True
        re.Global = True
	Re.Pattern="(value=)(.*)("" )"
	strSelectClass = Re.Replace(strSelectClass,"")
	Re.Pattern="({ClassID=)(.*)(}>)"
	strSelectClass = Re.Replace(strSelectClass,"value=""$2"">")
	Response.Write strSelectClass
	Set Re = Nothing
%>
        </select><font color="#0066CC">&nbsp;&nbsp;如指定了分类,请选择类型分类</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">所属专题：</td>
	<td class=tablerow1><select name=SpecialID>
	<option value="0">不选择专题</option>
<%
If ChannelID <> 0 And ChannelID <> "" 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>
</tr>
<tr>
	<td class=tablerow2 align="right">调用类型：</td>
	<td class=tablerow2><select name="ShowType" id="ShowType">
          <option value="0">所有最新<%=sModuleName%></option>
          <option value='1'>所有推荐<%=sModuleName%></option>
	  <option value='2'>所有热门<%=sModuleName%></option>
<%
If CInt(Newasp.modules) = 1 Then
%>
	  <option value='3'>所有图文<%=sModuleName%></option>
	  <option value='4'>分类最新<%=sModuleName%></option>
	  <option value='5'>分类推荐<%=sModuleName%></option>
	  <option value='6'>分类热门<%=sModuleName%></option>
	  <option value='7'>分类图文<%=sModuleName%></option>
<%
Else
%>
	  <option value='3'>分类最新<%=sModuleName%></option>
	  <option value='4'>分类推荐<%=sModuleName%></option>
	  <option value='5'>分类热门<%=sModuleName%></option>
<%
End If
%>
        </select><font color="#0066CC">&nbsp;&nbsp;如选择了所有,分类选择无效</font></td>
</tr>
<tr>
	<td class=tablerow1 align="right">显示<%=sModuleName%>列表数：</td>
	<td class=tablerow1><input name="MaxListNum" type="text" id="MaxListNum" value="12" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow2 align="right">标题名称最多字符数：</td>
	<td class=tablerow2><input name="TitleMaxLen" type="text" id="TitleMaxLen" value="26" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否显示分类名称：</td>
	<td class=tablerow1><select name="ShowClass" id="ShowClass">
          <option value='0'>不显示分类名称</option>
	  <option value='1'>显示分类名称</option>
        </select></td>
</tr>
<%
If CInt(Newasp.modules) = 1 Then
%>
<tr>
	<td class=tablerow2 align="right">是否显示图文标题：</td>
	<td class=tablerow2><select name="ShowPic" id="ShowPic">
          <option value='1'>显示图文标题</option>
	  <option value='0'>不显示图文标题</option>
        </select></td>
</tr>
<%
End If
%>
<tr>
	<td class=tablerow1 align="right">是否显示日期：</td>
	<td class=tablerow1><select name="ShowDate" id="ShowDate">
          <option value='1'>显示日期</option>
	  <option value='0'>不显示日期</option>
        </select></td>
</tr>
<tr>
	<td class=tablerow2 align="right">显示日期的格式：</td>
	<td class=tablerow2><select name="DateMode" id="DateMode">
<%
For i = 1 To 9
	Response.Write "<option value='" & i & "'"
	If i = 5 Then Response.Write " selected"
	Response.Write ">"
	Response.Write Newasp.FormatDate(Now(),i)
	Response.Write "</option>" & vbCrLf
Next

%>
          
        </select></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否新窗口打开连接：</td>
	<td class=tablerow1><select name="newindow" id="newindow">
          <option value='0' selected>本窗口打开</option>
	  <option value='1'>新窗口打开</option>
        </select></td>
</tr>
<tr>
	<td class=tablerow2 align="right">列表调用样式名称：</td>
	<td class=tablerow2><input name="StyleName" type="text" id="StyleName" value="showlist" size="15" maxlength="20"></td>
</tr>
<tr align=center>
	<td class=tablerow1 colspan="2"><input type=text name=SkinCode size=65 id="SkinCode"></td>
</tr>
<tr align=center>
	<td class=tablerow2 colspan="2">
		<input name="MakeJS" type="button" id="MakeJS" onclick="MakeCode();" value="&nbsp;生成<%=sModuleName%>模板标签&nbsp;" class=button> 
		<input name="Copy" type="button" id="Copy" value="&nbsp;复制到剪贴板&nbsp;" onclick="copy();" class=button>
		<input type="button" value="&nbsp;关闭窗口&nbsp;" onclick="selflabel();" class=button> 
		</td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/JavaScript">
function MakeCode()
{
if(document.myform.ClassID.value=="")
{
	alert("<%=sModuleName%>分类不能指定外部栏目！");
	document.myform.ClassID.focus();
	return false;
}
if(document.myform.MaxListNum.value=="")
{
	alert("显示<%=sModuleName%>列表数不能为空！");
	document.myform.MaxListNum.focus();
	return false;
}
if(document.myform.TitleMaxLen.value=="")
{
	alert("标题名称最多字符数不能为空！");
	document.myform.TitleMaxLen.focus();
	return false;
}
if(document.myform.StyleName.value=="")
{
	alert("列表样式名称不能为空！");
	document.myform.StyleName.focus();
	return false;
}
var strCode;
<%
Select Case CInt(Newasp.modules)
	Case 1
		Response.Write "strCode=""{$ReadArticleList("";"
	Case 2
		Response.Write "strCode=""{$ReadSoftList("";"
	Case 3
		Response.Write "strCode=""{$ReadShopList("";"
	Case 5
		Response.Write "strCode=""{$ReadFlashList("";"
	Case Else
		Response.Write "strCode=""{$ReadArticleList("";"
End Select
%>
strCode+=document.myform.ChannelID.value+","
strCode+=document.myform.ClassID.value+","
strCode+=document.myform.SpecialID.value+","
strCode+=document.myform.ShowType.value+","
strCode+=document.myform.MaxListNum.value+","
strCode+=document.myform.TitleMaxLen.value+","
strCode+=document.myform.ShowClass.value+","
<%
If CInt(Newasp.modules) = 1 Then
%>
strCode+=document.myform.ShowPic.value+","
<%
End If
%>
strCode+=document.myform.ShowDate.value+","
strCode+=document.myform.DateMode.value+","
strCode+=document.myform.newindow.value+","
strCode+=document.myform.StyleName.value
strCode+=")}";
document.myform.SkinCode.value=strCode;
}
</script>

<%
End Sub
%>