<!-- #Include File="../Include/Skin.asp" -->
<!-- #Include File="include/AdminCheck.asp" -->
<HTML>
<head>
<title>AsaiMH - 标签管理</title>
<meta http-equiv=Content-Type content=text/html; charset=gb2312>
<link type=text/css href='Images/admin.Css' rel=stylesheet>
<base target='_self'>
<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>
</head>
<body>
<%

Action = LCase(Request("action"))
ChannelIDS = Cint(Request("ChannelIDS"))
If ChannelIDS=0 Then ChannelIDS=1
if action<>"" then Call Channel_Loader()
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

%>
<BR style="OVERFLOW: hidden; LINE-HEIGHT: 5px">
<table border=0 align=center cellpadding=3 cellspacing=1 class=table>
<tr>
	<td  class=tr1 height=30>请将以上标签复制到模板相应的位置</td>
</tr>
</table>
</body>
<%
'CloseConn
Private Sub showmain()
	%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=table>
<tr>
	<th class=td>常用模板标签(注意大小写)</th>
</tr>
<tr>
	<td class=tablerow1>{$web_dir}&nbsp;&nbsp;&nbsp;&nbsp;系统路径 </td>
</tr>
<tr>
	<td class=tablerow2>{$skin_dir}&nbsp;&nbsp;&nbsp;&nbsp;皮肤图片路径</td>
</tr>
<tr>
	<td class=tablerow1>{$channel_dir}&nbsp;&nbsp;&nbsp;&nbsp;频道目录路径</td>
</tr>
<tr>
	<td class=tablerow1>{$upload_Dir}&nbsp;&nbsp;&nbsp;&nbsp;系统上传路径</td>
</tr>
<tr>
	<td class=tablerow1>{$download_dir}&nbsp;&nbsp;&nbsp;&nbsp;系统下载路径</td>
</tr>
<tr>
	<td class=tablerow2>{$skin_css}&nbsp;&nbsp;&nbsp;&nbsp;CSS路径</td>
</tr>
<tr>
	<td class=tablerow1>{$AMH_dir}&nbsp;&nbsp;&nbsp;&nbsp;后台管理路径</td>
</tr>
<tr>
	<td class=tablerow2>{$pro_edtion}&nbsp;&nbsp;&nbsp;&nbsp;系统版本信息</td>
</tr>
<tr>
	<td class=tablerow1>{$web_name}&nbsp;&nbsp;&nbsp;&nbsp;网站名称 （在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$web_url}&nbsp;&nbsp;&nbsp;&nbsp;网站URL （在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow1>{$web_email}&nbsp;&nbsp;&nbsp;&nbsp;管理员E-Meil（在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$web_unit}&nbsp;&nbsp;&nbsp;&nbsp;系统货币名称 （在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$web_keywords}&nbsp;&nbsp;&nbsp;&nbsp;网站关键字 （在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow1>{$web_copyright}&nbsp;&nbsp;&nbsp;&nbsp;网站版权信息 （在网站设置修改）</td>
</tr>
<tr>
	<td class=tablerow2>{$ukong}&nbsp;&nbsp;&nbsp;&nbsp;高度为三的间隙（透明表格） </td>
</tr>
<tr>
	<td class=tablerow2>{$width}&nbsp;&nbsp;&nbsp;&nbsp;主表格宽度 </td>
</tr>
<tr>
	<td class=tablerow2>{$left_width}&nbsp;&nbsp;&nbsp;&nbsp;侧表格宽度 </td>
</tr>
<tr>
	<td class=tablerow2>{$web_center}&nbsp;&nbsp;&nbsp;&nbsp;插入中缝 </td>
</tr>
<tr>
	<td class=tablerow1>{$IndexPage}&nbsp;&nbsp;&nbsp;&nbsp;默认首页文件名</td>
</tr>

<tr>
	<td class=tablerow1>{$web_tit}&nbsp;&nbsp;&nbsp;&nbsp;文件标题</td>
</tr>
<tr>
	<th class=td>函数式标签“()”中间是参数,用“,”分开</th>
</tr>
<tr>
	<td class=tablerow2>{$ReadWebHead(0)}<br />&nbsp;&nbsp;显示头部信息:<br />
               0，表示输出页头JS和头部信息；<br />
               1，表示只输出页头JS，不包含头部信息<br />
               2以上，表示只进行权限处理，不输信息</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadWebEnd(0)}<br />&nbsp;&nbsp;显示底部信息:<br />
               0，表示输出尾部信息；<br />
               1，表示只输出页尾结束代码，不包含头尾部信息<br />
               2以上，表示只进行权限处理，不输信息
</tr>

<tr>
	<td class=tablerow2>{$ReadFlashPic(1,0,0,3,5,20,200,180,20)}<br />&nbsp;&nbsp;显示FLASH
       1,调用频道 2,分类 3,专题 4,数量 5,长度 6,FLASH宽度 7,FLASH高度 8,显示文本的高度</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadVote(1)}<br />&nbsp;&nbsp;显示调查信息（填ID）</td>
</tr>
<tr>
	<td class=tablerow2>{$ReadCast(1,5,20)}<br />&nbsp;&nbsp;显示公告（频道ID，获取公告数量，公告标题长度）</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>
<tr>
	<td class=tablerow2>博客数据调用<br />&nbsp;&nbsp;示例:{$ReadBlogData(1,0,12,26,0,1,5,0,showlist)}<br />&nbsp;&nbsp;说明:1,调用类别(0:所有,1:日志,2:相片)
     <br />&nbsp;&nbsp;2,调用类型(0:最新,1:热门,2:最新评论,3:最多评论)
     <br />&nbsp;&nbsp;3,调用数量
     <br />&nbsp;&nbsp;4,调用名称的长度(字节)
     <br />&nbsp;&nbsp;5,是否显示类别名称
     <br />&nbsp;&nbsp;6,是否显示时间
     <br />&nbsp;&nbsp;7,时间格式
     <br />&nbsp;&nbsp;8,打开方式
     <br />&nbsp;&nbsp;9,样式</td>
</tr>
<tr>
	<td class=tablerow2>博客用户标签调用<br />&nbsp;&nbsp;示例:{$ReadBlogTags(1,100,1,12,24)}<br />&nbsp;&nbsp;type,num,target,smallfont,largefont <br />&nbsp;&nbsp;说明:1,调用类型(0:最新,1:热门)
     <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2,调用数量
     <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3,打开方式
     <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4,显示的最小字体
     <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5,显示的最大字体</td>
</tr>
<tr>
	<td class=tablerow2>
	<br />//以下为博客用户模板调用标签
<br />-------------------------------------
<br />$show_log$ 重要，此标记显示日志主体部分，包括评论等信息。
<br />$show_placard$ 此标记显示用户公告。 
<br />$show_calendar$ 此标记显示日历。 
<br />$show_newblog$ 此标记显示最新日志列表。 
<br />$show_comment$ 此标记显示最新回复列表。
<br />$show_subject$ 此标记显示专题分类。 
<br />$show_subject_l$ 此标记横向显示专题分类。
<br />$show_newblog$ 此标记显示最新日志列表。
<br />$show_newmessage$ 此标记显示最新留言列表。
<br />$show_info$ 此标记显示Blog名称，统计信息等。 
<br />$show_login$ 此标记显示登录窗口 
<br />$show_links$ 此标记显示链接信息。
<br />$show_blogname$ 此标记显示用户blog名称，若名称为空则显示用户id。
<br />$show_search$ 此标记显示搜索表单。
<br />$show_xml$ 此标记显示rss连接标志。
<br />-------------------------------------
<br />//以下为新增的标签(相对Oblog)
<br />-------------------------------------
<br />$show_hotblog$ 此标记为热门博客调用
<br />$show_newphoto$ 此标记为最新相片调用
<br />$show_hotphoto$ 此标记为热门相片调用
<br />-------------------------------------
<br />//以下标签暂时无效
<br />-------------------------------------
<br />$show_blogurl$ 此标记显示博客链接。
<br />$show_myfriend$ 此标签显示我的好友。
<br />$show_mygroups$ 此标签显示我加入的群组。
<br />$show_photo$ 此标签调用相册。  
	</td>
</tr>
</table>
<%
End Sub
Private Sub Label_ContentList()
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=table>
<tr>
	<th colspan="2" class=td>生成<%=Cls.ChannelTit%>模板标签</th>
</tr>
<form action="?action=list" method="post" name="myform" id="myform">
<tr>
	<td class=tablerow1 align="right">所属频道：</td>
	<td class=tablerow1><select name=ChannelIDs size=1 onChange="javascript:submit()">
<%
Set Rs = Cls.Exec("Select ChannelIDs,ChannelName,ModuleType from AsaiMHChannel where ModuleType in (1,2,3,4,5,6,7,8,9,10,11,12) And ChannelType <> 2 Order By ChannelIDs Asc",1)
Do While Not Rs.EOF
%>
		<option value='<%=Rs("ChannelIDs")%>'<%If Rs("ChannelIDs") = ChannelIDs 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">所有<%=Cls.ChannelTit%>分类</option>
<%
Dim sql3,rs3,n_id,chi,sTmp
If ChannelIDS=4 then
	sql3="Select bbs_ID,bbs_Name,bbs_Parent,Class_ID,bbs_F from AsaiMHBbsClass  Order By bbs_ID,bbs_Order,bbs_F"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		n_id=Int(Rs3(0))
		'If Int(Rs3(5)<>0) then  n_id=-1
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&n_id&"' class=bg_2"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&n_id&"'"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	Response.Write stmp

	Else
	

	sql3="Select C_ID,ClassName,ClassParent,ClassParentStr,ClassDepth,ClassChild,ClassID from AsaiMHClass Where ChannelIDs="&ChannelIDs&"  Order By ClassID,ClassOrder,ClassDepth"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		n_id=Int(Rs3(0))
		'If Int(Rs3(5)<>0) then  n_id=-1
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&n_id&"' class=bg_2"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&n_id&"'"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	Response.Write stmp

	End if

%>
        </select><font color="#0066CC">&nbsp;&nbsp;若不指定了分类,意为调用全部</font></td>
</tr>
<%if ChannelIDs <> 10 then %>
<tr>
	<td class=tablerow1 align="right">所属专题：</td>
	<td class=tablerow1><select name=SpecialID>
	<option value="0">不选择专题</option>
<%
If ChannelIDs <> 0 And ChannelIDs <> "" Then
	Set Rs = Cls.Exec("Select ID,Topic from AsaiMHSpecial where ChannelIDs="& ChannelIDs,1)
	Do While Not Rs.EOF
%>
		<option value='<%=Rs("ID")%>'><%=Rs("Topic")%></option>
<%
		Rs.movenext
	Loop
	Set Rs = Nothing
End If

%>
	</select></td>
</tr>
<% end if%>
<tr>
	<td class=tablerow2 align="right">调用类型：</td>
	<td class=tablerow2><select name="ShowType" id="ShowType">
          <option value="0">最新<%=Cls.ChannelTit%></option>
          <option value='1'>推荐<%=Cls.ChannelTit%></option>
	      <option value='2'>热门<%=Cls.ChannelTit%></option>
<%
If CInt(Cls.ChannelModuleType) = 1 or CInt(Cls.ChannelModuleType) = 8 Then
%>
	      <option value='3'>图文<%=Cls.ChannelTit%></option>
<%
End If
%>
        </select></td>
</tr>
<%
If CInt(Cls.ChannelModuleType) = 7 Then %>
<tr>
	<td class=tablerow1 align="right">供求类别：</td>
	<td class=tablerow1><select name="Types" id="Types">
          <option value="0">所有信息</option>
          <option value='1'>供应信息</option>
	  <option value='2'>求购信息</option></select></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否显示供求字样：</td>
	<td class=tablerow1><select name="ShowTypes" id="ShowTypes">
          <option value="1">显示供求字样</option>
          <option value='0'>不显示供求字样</option></select></td>
</tr>
<%
End If
%>

<tr>
	<td class=tablerow1 align="right">显示<%=Cls.ChannelTit%>列表数：</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(Cls.ChannelModuleType) = 1  or CInt(Cls.ChannelModuleType) = 8 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
If CInt(Cls.ChannelModuleType) = 9 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 8
	Response.Write "<option value='" & i & "'"
	If i = 6 Then Response.Write " selected"
	Response.Write ">"
	Response.Write Cls.Time_Type(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;生成<%=Cls.ChannelTit%>模板标签&nbsp;" class=btn> 
		<input name="Copy" type="button" id="Copy" value="&nbsp;复制到剪贴板&nbsp;" onClick="copy();" class=btn>
		<input type="button" value="&nbsp;关闭窗口&nbsp;" onClick="selflabel();" class=btn> 
		</td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/JavaScript">
function MakeCode()
{
if(document.myform.ClassID.value=="")
{
	alert("<%=Cls.ChannelTit%>分类不能指定外部栏目！");
	document.myform.ClassID.focus();
	return false;
}
if(document.myform.MaxListNum.value=="")
{
	alert("显示<%=Cls.ChannelTit%>列表数不能为空！");
	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(Cls.ChannelModuleType)
	Case 1
		Response.Write "strCode=""{$ReadArticleList("";"
	Case 2
		Response.Write "strCode=""{$ReadSoftList("";"
	Case 3
		Response.Write "strCode=""{$ReadShopList("";"
	Case 4
		Response.Write "strCode=""{$ReadBBSList("";"
	Case 5
		Response.Write "strCode=""{$ReadPhotoList("";"
	Case 6
		Response.Write "strCode=""{$ReadMovieList("";"
	Case 7
		Response.Write "strCode=""{$ReadFleaList("";"
	Case 8
		Response.Write "strCode=""{$ReadNewsList("";"
	Case 9
		Response.Write "strCode=""{$ReadOkList("";"
	Case 10
		Response.Write "strCode=""{$ReadBloger("";"
	Case 11
		Response.Write "strCode=""{$ReadMusicList("";"
	Case 12
		Response.Write "strCode=""{$ReadPagesList("";"
	Case Else
		Response.Write "strCode=""{$ReadArticleList("";"
End Select
%>
<%
If CInt(Cls.ChannelModuleType) <> 10  Then
%>
strCode+=document.myform.ChannelIDs.value+","
<%
End If
%>
strCode+=document.myform.ClassID.value+","
<%
If CInt(Cls.ChannelModuleType) <> 10  Then
%>
strCode+=document.myform.SpecialID.value+","
<%
End If
%>
strCode+=document.myform.ShowType.value+","
<%
If CInt(Cls.ChannelModuleType) = 7  Then
%>
strCode+=document.myform.Types.value+","
strCode+=document.myform.ShowTypes.value+","
<%
End If
%>
strCode+=document.myform.MaxListNum.value+","
strCode+=document.myform.TitleMaxLen.value+","
strCode+=document.myform.ShowClass.value+","
<%
If CInt(Cls.ChannelModuleType) = 1 or CInt(Cls.ChannelModuleType) = 9  or CInt(Cls.ChannelModuleType) = 8 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=table>
<tr>
	<th colspan="2" class=td>生成<%=Cls.ChannelTit%>模板图片调用标签</th>
</tr>
<form action="?action=image" method="post" name="myform" id="myform">

<tr>
	<td class=tablerow1 align="right">所属频道：</td>
	<td class=tablerow1><select  name=ChannelIDs size=1 onChange="javascript:submit()">
<%
Set Rs = Cls.Exec("Select ChannelIDs,ChannelName,ModuleType from AsaiMHChannel where ModuleType in (1,2,3,5,6,7,8,10,11,12) And ChannelType <> 2 Order By ChannelIDs Asc",1)
Do While Not Rs.EOF
%>
		<option value='<%=Rs("ChannelIDs")%>'<%If Rs("ChannelIDs") = ChannelIDs 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">所有<%=Cls.ChannelTit%>分类</option>
<%
	Dim sql3,rs3,n_id,chi,sTmp

	sql3="Select C_ID,ClassName,ClassParent,ClassParentStr,ClassDepth,ClassChild,ClassID from AsaiMHClass Where ChannelIDs="&ChannelIDs&"  Order By ClassID,ClassOrder,ClassDepth"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		n_id=Int(Rs3(0))
		'If Int(Rs3(5)<>0) then  n_id=-1
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&n_id&"' class=bg_2"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&n_id&"'"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	Response.Write stmp

%>
        </select><font color="#0066CC">&nbsp;&nbsp;若不指定了分类,意为调用全部</font></td>
</tr>
<%If CInt(Cls.ChannelModuleType) <>10 Then %>
<tr>
	<td class=tablerow1 align="right">所属专题：</td>
	<td class=tablerow1><select name=SpecialID>
	<option value="0">不选择专题</option>
<%
If ChannelIDs <> 0 And ChannelIDs <> "" Then
	Set Rs = Cls.Exec("Select ID,Topic from AsaiMHSpecial where ChannelIDs="& ChannelIDs,1)
	Do While Not Rs.EOF
%>
		<option value='<%=Rs("ID")%>'><%=Rs("Topic")%></option>
<%
		Rs.movenext
	Loop
	Set Rs = Nothing
End If

%>
	</select></td>
</tr>
<%end if%>
<tr>
	<td class=tablerow2 align="right">调用类型：</td>
	<td class=tablerow2><select name="ShowType" id="ShowType">
	<%If CInt(Cls.ChannelModuleType) =10 Then %>
          <option value="0">最新<%=Cls.ChannelTit%>图片</option>
          <option value='1'>热门<%=Cls.ChannelTit%>图片</option>
	      <option value="2">最新<%=Cls.ChannelTit%>最新</option>
          <option value='3'>最多<%=Cls.ChannelTit%>评论</option>
          <%else%>
          <option value="0">最新<%=Cls.ChannelTit%>图片</option>
          <option value='1'>推荐<%=Cls.ChannelTit%>图片</option>
	  <option value='2'>热门<%=Cls.ChannelTit%>图片</option>
	  <%end if%>
        </select></td>
</tr>
<%
If CInt(Cls.ChannelModuleType) = 7 Then %>
<tr>
	<td class=tablerow1 align="right">供求类别：</td>
	<td class=tablerow1><select name="Types" id="Types">
          <option value="0">所有信息</option>
          <option value='1'>供应信息</option>
	  <option value='2'>求购信息</option></select></td>
</tr>
<tr>
	<td class=tablerow1 align="right">是否显示供求字样：</td>
	<td class=tablerow1><select name="ShowTypes" id="ShowTypes">
          <option value="0">显示供求字样</option>
          <option value='1'>不显示供求字样</option></select></td>
</tr>
<%
End If
%>

<tr>
	<td class=tablerow1 align="right">最多显示多少张<%=Cls.ChannelTit%>图片：</td>
	<td class=tablerow1><input name="MaxPicNum" type="text" id="MaxPicNum" value="8" size="5" maxlength="3"></td>
</tr>
<tr>
	<td class=tablerow2 align="right">每行显示多少张<%=Cls.ChannelTit%>图片：</td>
	<td class=tablerow2><input name="PerRowNum" type="text" id="PerRowNum" value="4" 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">是否显示<%=Cls.ChannelTit%>标题名称：</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;生成<%=Cls.ChannelTit%>模板标签&nbsp;" class=btn> 
		<input name="Copy" type="button" id="Copy" value="&nbsp;复制到剪贴板&nbsp;" onClick="copy();" class=btn>
		<input type="reset" name="button" value="&nbsp;关闭窗口&nbsp;" onClick="copy(); window.close()" class=btn></td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/JavaScript">
function MakeCode()
{
if(document.myform.ClassID.value=="")
{
	alert("<%=Cls.ChannelTit%>分类不能指定外部栏目！");
	document.myform.ClassID.focus();
	return false;
}
if(document.myform.MaxPicNum.value=="")
{
	alert("显示<%=Cls.ChannelTit%>图片数不能为空！");
	document.myform.MaxPicNum.focus();
	return false;
}
if(document.myform.TitleMaxLen.value=="")
{
	alert("标题名称最多字符数不能为空！");
	document.myform.TitleMaxLen.focus();
	return false;
}
var strCode;
<%
Select Case CInt(Cls.ChannelModuleType)
	Case 1
		Response.Write "strCode=""{$ReadArticlePic("";"
	Case 2
		Response.Write "strCode=""{$ReadSoftPic("";"
	Case 3
		Response.Write "strCode=""{$ReadShopPic("";"
	Case 5
		Response.Write "strCode=""{$ReadPhotoPic("";"
	Case 6
		Response.Write "strCode=""{$ReadMoviePic("";"
	Case 7
		Response.Write "strCode=""{$ReadFleaPic("";"
	Case 8
		Response.Write "strCode=""{$ReadNewsPic("";"
	Case 9
		Response.Write "strCode=""{$ReadOkPic("";"
	Case 10
		Response.Write "strCode=""{$ReadBlogPhoto("";"
	Case 11
		Response.Write "strCode=""{$ReadMusicPic("";"
	Case 12
		Response.Write "strCode=""{$ReadPagesPic("";"
	Case Else
		Response.Write "strCode=""{$ReadArticlePic("";"
End Select

If CInt(Cls.ChannelModuleType) <> 10  Then
%>
strCode+=document.myform.ChannelIDs.value+","
strCode+=document.myform.ClassID.value+","
strCode+=document.myform.SpecialID.value+","
<%
End If
%>
strCode+=document.myform.ShowType.value+","
<%
If CInt(Cls.ChannelModuleType) = 7  Then
%>
strCode+=document.myform.Types.value+","
strCode+=document.myform.ShowTypes.value+","
<%
End If
%>
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
%>