<%
Class Cls_PageData
	Public Sub Article_Index()
		MaxPerPage = Cl.ChannelOtherSetting(9)
		Cl.Path=CurrentPath & " >> 首页"
		TempStr = Cl.ReplaceFlag(Template.html(0),"showclassarticle","")
	End Sub
	Public Sub Article_Class()
		MaxPerPage=Cl.ChannelOtherSetting(3)
		Cl.Path=CurrentPath
		if ClassID>0 then
			if Not Cl.TrueBrowsePurview and CreateHtmlIng=False then Cl.OutErr(Template.Strings(3))
			Cl.Title= ClassName & "--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		end if
		FileName="ShowClass.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Template.html(1)
		if Child>0 then
			TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%classbody%}",Template.html(11))
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"ShowArticle","")
		TempStr = Cl.ReplaceFlag(TempStr,"ShowPicArticle","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Article_Special()
		MaxPerPage=Cl.ChannelOtherSetting(4)
		Cl.Path=CurrentPath & " >> 专题列表"
		Cl.Title="专题列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSpecial.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Replace(Template.html(6),"{%specialname%}",SpecialName)
		if Child>0 then
			TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showarticle","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicarticle","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Article_Update()
		MaxPerPage=Cl.ChannelOtherSetting(5)
		Cl.Path=CurrentPath & " >> 更新列表"
		Cl.Title="更新列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowUpdate.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Template.html(4)
		if Child>0 then
			TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showarticle","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicarticle","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Article_Elite()
		MaxPerPage=Cl.ChannelOtherSetting(6)
		Cl.Path=CurrentPath & " >> 推荐列表"
		Cl.Title="推荐列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowElite.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Template.html(3)
		if Child>0 then
			TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showarticle","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicarticle","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Article_Hot()
		MaxPerPage=Cl.ChannelOtherSetting(7)
		Cl.Path=CurrentPath & " >> 热门列表"
		Cl.Title="热门列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowHot.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Template.html(14)
		if Child>0 then
			TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showarticle","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicarticle","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Article_Search()
		MaxPerPage=Cl.ChannelOtherSetting(8)
		Cl.Path=CurrentPath & " >> 搜索结果"
		Cl.Title="搜索结果--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSearch.asp?Field=" & strField & "&Keyword=" & keyword & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID
		Dim keywordtitle,TopNum,sqlSearch
		if keyword="" then Cl.OutErr("<p align='center'><br /><br />请输入关键字！</p>")
		TopNum=Cl.ChkClng(Request("TopNum"))
		if TopNum=0 then
			sqlSearch="Select Top 100 "
		else
			sqlSearch="Select Top "&TopNum&" "
		end if
		sqlSearch=sqlSearch & "ArticleID,ClassID,Title,Keyword,Author,CopyFrom,UpdateTime,Editor,TitleFontColor,TitleFontType,Content,Hits,OnTop,Hot,Elite,Passed,Prefixion,Stars,PaginationType,ReadLevel,ReadPoint,DefaultPicUrl,IsHtml,HtmlFileUrl,Intro from Cl_Article where Deleted=False and Passed=True  and ChannelID="&ChannelID&" "
		if ClassID>0 then sqlSearch=sqlSearch &  " and ClassID in (" & Replace(arrChildID,"|",",") & ")"
		keyword = Cl.ReplaceBadChar(keyword&"")
		Select Case strField
		Case "ID"
			keywordtitle="ID号为 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and ArticleID = "&Cl.ChkClng(keyword)&" "
		Case "Title"
			keywordtitle="标题含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Title like '%" & keyword & "%' "
		Case "Keyword"
			keywordtitle="关键字含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Keyword like '%" & keyword & "%' "
		Case "Intro"
			keywordtitle="简介含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Content like '%" & keyword & "%' "
		Case "CopyFrom"
			keywordtitle="来源含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and CopyFrom like '%" & keyword & "%' "
		Case "Author"
			keywordtitle="作者含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Author like '%" & keyword & "%' "
		Case "Editor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 添加"
			sqlSearch=sqlSearch & " and Editor='" & keyword & "' "
		Case "Censor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 审核"
			sqlSearch=sqlSearch & " and Censor='" & keyword & "' "
		Case "Point"
			keywordtitle=""&Cl.Web_Setting(28)&"小于或等于 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and ReadPoint <= "&Cl.ChkClng(keyword)&" "
		Case Else
			keywordtitle="标题含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Title like '%" & keyword & "%' "
		End Select
		keywordtitle=keywordtitle & "的" & Cl.ChannelItemName
		TempStr = Replace(Template.html(5),"{%keywordtitle%}",keywordtitle)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		sqlSearch=sqlSearch & " order by UpdateTime desc,ArticleID desc"
		Set rsInfo= Server.CreateObject("ADODB.Recordset")
		OpenConn : rsInfo.open sqlSearch,Conn,1,1
		if rsInfo.eof and rsInfo.bof then 
			TotalPut=0
			TempStr = Replace(TempStr,"{%searchcontent%}","<p align='center'><br /><br />没有或没有找到任何"&Cl.ChannelItemName&"</p>")
			TempStr = Replace(TempStr,"{%showpage%}","")
			rsInfo.close : set rsInfo=Nothing : Exit Sub
		End if
		TotalPut=rsInfo.recordcount		
		if (TotalPut mod MaxPerPage)=0 then
			TotalPages = TotalPut \ MaxPerPage
		else
			TotalPages = TotalPut \ MaxPerPage + 1
		end if
		if CurrentPage > TotalPages then CurrentPage=TotalPages
		if CurrentPage < 1 then CurrentPage=1
		rsInfo.move (CurrentPage-1)*MaxPerPage
		sqlSearch=rsInfo.GetRows(MaxPerPage)
		rsInfo.close : set rsInfo=Nothing
		dim i,strTemp,LinkUrl
		for i=0 to ubound(sqlSearch,2)
			if sqlSearch(22,i)=True and Clng(Cl.Channel_Setting(10))=1 then
				LinkUrl=Cl.WebDir & sqlSearch(23,i)
			else
				LinkUrl=Cl.WebDir & Cl.Channel_Setting(4) & "/ArticleShow.asp?ArticleID="&sqlSearch(0,i)
			end if
			strTemp=strTemp & (MaxPerPage*(CurrentPage-1)+i+1) & ".<a href='" &LinkUrl & "' target=_blank>"
			if strField="Title" then
				strTemp=strTemp & "<strong>" & replace(sqlSearch(2,i),""&keyword&"","<font color='#ff0033'>"&keyword&"</font>") & "</strong></font></a>"
			else
				strTemp=strTemp & "<strong>" & sqlSearch(2,i) & "</strong></a>"
			end if
			if strField="Author" then
				strTemp=strTemp & "&nbsp;[" & replace(sqlSearch(4,i)&"",""&keyword&"","<font color='#ff0033'>"&keyword&"</font>") & "]"
			else
				strTemp=strTemp & "&nbsp;[" & sqlSearch(4,i) & "]"
			end if
			strTemp=strTemp & "[" & FormatDateTime(sqlSearch(6,i),1) & "][<font color='#ff0033'>" & sqlSearch(11,i) & "</font>]"
			if strField="Content" then
				strTemp=strTemp & "<div style='padding:10px 20px'>" & replace(sqlSearch(24,i)&"",""&keyword&"","<font color='#ff0033'>"&keyword&"</font>")
			else
				strTemp=strTemp & "<div style='padding:10px 20px'>" & sqlSearch(24,i)
			end if
			strTemp=strTemp & "&nbsp;[<a href='" &LinkUrl & "' target=_blank>详情……</a>]</div>"
		Next
		TempStr = Replace(TempStr,"{%searchcontent%}",strTemp)
		TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		sqlSearch=""
	End Sub
	Public Sub Article_Show()
		if ArticleId<=0 then Call Cl.OutErr("找不到指定"&Cl.ChannelItemName&"。")
		if rs("IsLink")=True then Response.Redirect rs("HtmlFileUrl")
		Cl.Path=CurrentPath & " >> 正文"
		Cl.Title=InfoTitle & "[" & Cl.Web_info(1) & "]"
		if Not IsNull(rs("Intro")) then
			Cl.DeScriptIon=InfoTitle & "[" & Replace(Left(Cl.NoHtml(rs("Intro")),150),VbCrlf,"") & "]"
		else
			Cl.DeScriptIon=InfoTitle & "、" & Cl.Web_info(3)
		end if
		Cl.Keywords=InfoTitle & "|" & rs("Keyword") & "|" & Cl.Web_Info(2)
		Cl.Keywords=Replace(Cl.Keywords,"||","|")
		FileName="ArticleShow.asp"
		Dim Attribute,Author,CopyFrom
		Author = rs("Author") : CopyFrom = rs("CopyFrom")
		if rs("OnTop") then Attribute="<font color=blue>顶</font>&nbsp;"
		if rs("Hot") then Attribute=Attribute & "<font color='#ff0033'>热</font>&nbsp;"
		if rs("Elite") then Attribute=Attribute & "<font color=green>荐</font>"
		Attribute=Attribute & "&nbsp;&nbsp;" & Cl.Getstar(rs("Stars"))
		TempStr =Template.html(2)
		if Child>0 then
		TempStr = Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
		TempStr = Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%classid%}",rs("ClassID"))
		TempStr = Replace(TempStr,"{%articleid%}",rs("ArticleID"))
		TempStr = Replace(TempStr,"{%title%}",rs("Title"))
		TempStr = Replace(TempStr,"{%titleintact%}",rs("TitleIntact")&"")
		TempStr = Replace(TempStr,"{%articlepicurl%}",rs("DefaultPicUrl")&"")
		TempStr = Replace(TempStr,"{%attribute%}",Attribute)
		if instr(Author,"|")>0 then
			TempStr = Replace(TempStr,"{%author%}","<a href=""mailto:" & right(Author,len(Author)-instr(Author,"|")) & """>" & left(Author,instr(Author,"|")-1) & "</a>")
		else
			TempStr = Replace(TempStr,"{%author%}",Author)
		end if
		if instr(CopyFrom,"|")>0 then
			TempStr = Replace(TempStr,"{%copyfrom%}","<a href=""" & right(CopyFrom,len(CopyFrom)-instr(CopyFrom,"|")) & """ target=""_blank"">" & left(CopyFrom,instr(CopyFrom,"|")-1) & "</a>")
		else
			TempStr = Replace(TempStr,"{%copyfrom%}",CopyFrom)
		end if
		if CreateHtmlIng then
			TempStr = Replace(TempStr,"{%hits%}","<script type='text/JavaScript' Src='"&Cl.WebDir&"GetHits.asp?ChannelID="&ChannelID&"&InfoID="&rs("ArticleID")&"'></script>")
		else
			TempStr = Replace(TempStr,"{%hits%}",rs("Hits"))
		end if
		TempStr = Replace(TempStr,"{%updatetime%}",FormatDateTime(rs("UpdateTime"),2))
		TempStr = Replace(TempStr,"{%editor%}","<a href="""&Cl.WebDir&"User/Info.Asp?UserName=" & rs("Editor") & """>" & rs("Editor") & "</a>")
		TempStr = Replace(TempStr,"{%censor%}",rs("Censor") & "")
		TempStr = Replace(TempStr,"{%showarticlecontent%}",ShowArticleContent())
	End Sub
	'=====================================================================
	Public Sub Soft_Index()
		MaxPerPage=Cl.ChannelOtherSetting(9)
		Cl.Path=CurrentPath & " >> 首页"
		TempStr=Template.html(0)
	End Sub
	Public Sub Soft_Class()
		MaxPerPage=Cl.ChannelOtherSetting(3)
		Cl.Path=CurrentPath
		FileName="ShowClass.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		Dim sqlSoft
		sqlSoft="select SoftID,ClassID,SoftName,SoftVersion,Author,AuthorEmail,Keyword,UpdateTime,Editor,Hits,DayHits,WeekHits,MonthHits,SoftSize,OnTop,Elite,Passed,Stars,SoftPicUrl,SoftLevel,SoftPoint,SoftMoney,SoftIntro,OperatingSystem,SoftType,CopyRighttype,IsHTML,HTMLFileUrl from Cl_Soft where Deleted=False and Passed=True "
		if ClassID>0 then
			if Not Cl.TrueBrowsePurview and CreateHtmlIng=False then Cl.OutErr(Template.Strings(2))
			Cl.Title= ClassName & "--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
			sqlSoft=sqlSoft &  " and ClassID in (" & Replace(arrChildID,"|",",") & ")"
		end if
		'if IsSqlDataBase=1 then
		sqlSoft=sqlSoft & " order by OnTop Asc,UpdateTime desc,SoftID desc"
		Set rsInfo = Server.CreateObject("ADODB.Recordset")
		OpenConn : rsInfo.open sqlSoft,Conn,1,1
		TempStr = Template.html(1)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		if rsInfo.bof and rsInfo.eof then
			TotalPut=0
			TempStr=Replace(TempStr,"{%softclasscontent%}","<p align='center'>没有任何"&Cl.ChannelItemName&"</p>")
			TempStr=Replace(TempStr,"{%showpage%}","")
		else
			TotalPut=rsInfo.recordcount
			if (TotalPut mod MaxPerPage)=0 then
				TotalPages = TotalPut \ MaxPerPage
			else
				TotalPages = TotalPut \ MaxPerPage + 1
			end if
			if CurrentPage > TotalPages then CurrentPage=TotalPages
			if CurrentPage < 1 then CurrentPage=1
			rsInfo.move (CurrentPage-1)*MaxPerPage
			sqlSoft=rsInfo.GetRows(MaxPerPage)
			dim strTemp,strClassContent,Attribute,LinkURl
			strClassContent=""
			for i=0 to Ubound(sqlSoft,2)
				if sqlSoft(14,i)=True then
					Attribute="<img src=""" & Cl.mainpic(16) & """ alt=""固顶"" />&nbsp;"
				elseif sqlSoft(15,i)=True then
					Attribute="<img src=""" & Cl.mainpic(15) & """ alt=""推荐"" />&nbsp;"
				else
					Attribute="<img src=""" & Cl.mainpic(14) & """ alt=""普通"" />&nbsp;"
				end if
				strTemp=Replace(Template.html(10),"{%attribute%}",Attribute)
				if sqlSoft(26,i)=True and Clng(Cl.Channel_Setting(10))=1 then
					LinkURl=Cl.WebDir & sqlSoft(27,i)
				else
					LinkURl=Cl.WebDir & Cl.Channel_Setting(4) & "/SoftShow.asp?SoftID={%softid%}"
				end if
				strTemp=Replace(strTemp,"{%linkurl%}",LinkURl)
				strTemp=Replace(strTemp,"{%softid%}",sqlSoft(0,i))
				strTemp=Replace(strTemp,"{%softname%}",sqlSoft(2,i))
				strTemp=Replace(strTemp,"{%softpicurl%}",sqlSoft(18,i)&"")
				strTemp=Replace(strTemp,"{%softversion%}",sqlSoft(3,i)&"")
				strTemp=Replace(strTemp,"{%updatetime%}",Cl.Format_Time(sqlSoft(7,i),3))
				strTemp=Replace(strTemp,"{%softsize%}",Cl.GetSize(sqlSoft(13,i),"k"))
				strTemp=Replace(strTemp,"{%hits%}",sqlSoft(9,i))
				strTemp=Replace(strTemp,"{%stars%}",Cl.Getstar(sqlSoft(17,i)))
				strTemp=Replace(strTemp,"{%softpoint%}",sqlSoft(20,i))
				strTemp=Replace(strTemp,"{%softmoney%}",sqlSoft(21,i))
				strTemp=Replace(strTemp,"{%softintro%}",Left(Cl.NoHtml(sqlSoft(22,i)),200))
				strTemp=Replace(strTemp,"{%operatingsystem%}",sqlSoft(23,i)&"")
				strTemp=Replace(strTemp,"{%softtype%}",sqlSoft(24,i)&"")
				strTemp=Replace(strTemp,"{%copyrighttype%}",sqlSoft(25,i)&"")
				strTemp=Replace(strTemp,"{%dayhits%}",sqlSoft(10,i))
				strClassContent=strClassContent & strTemp
			Next
			TempStr=Replace(TempStr,"{%softclasscontent%}",strClassContent)
			TempStr=Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		end if
		TempStr=Replace(TempStr,"{%classname%}",ClassName)
		TempStr=Replace(TempStr,"{%classid%}",ClassID)
		rsInfo.Close : Set rsInfo=Nothing
	End Sub
	Public Sub Soft_Special()
		MaxPerPage=Cl.ChannelOtherSetting(4)
		Cl.Path=CurrentPath & " >> 专题列表"
		Cl.Title= "专题列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSpecial.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Replace(Template.html(6),"{%specialname%}",SpecialName)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showsoft","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicsoft","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Soft_Update()
		MaxPerPage=Cl.ChannelOtherSetting(5)
		Cl.Path=CurrentPath & " >> 更新列表"
		Cl.Title= "更新列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowUpdate.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(4)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showsoft","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicsoft","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Soft_Elite()
		MaxPerPage=Cl.ChannelOtherSetting(6)
		Cl.Path=CurrentPath & " >> 推荐列表"
		Cl.Title= "推荐列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowElite.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(3)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showsoft","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicsoft","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Soft_Hot()
		MaxPerPage=Cl.ChannelOtherSetting(7)
		Cl.Path=CurrentPath & " >> 热门列表"
		Cl.Title= "热门列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowHot.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(16)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showsoft","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicsoft","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Soft_Search()
		MaxPerPage=Cl.ChannelOtherSetting(8)
		Cl.Path=CurrentPath & " >> 搜索结果"
		Cl.Title= "搜索结果--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSearch.asp?Field=" & strField & "&Keyword=" & keyword & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID
		Dim keywordtitle,TopNum,sqlSearch
		if keyword="" then Cl.OutErr("<p align='center'><br /><br />请输入关键字！</p>")
		TopNum=Cl.ChkClng(Request("TopNum"))
		if TopNum=0 then
			sqlSearch="Select Top 100 "
		else
			sqlSearch="Select Top "&TopNum&" "
		end if
		sqlSearch=sqlSearch & "SoftID,ClassID,SoftName,SoftVersion,Author,AuthorEmail,Keyword,UpdateTime,Editor,Hits,DayHits,WeekHits,MonthHits,SoftSize,OnTop,Elite,Passed,Stars,SoftPicUrl,SoftLevel,SoftPoint,SoftIntro,OperatingSystem,SoftType,IsHTML,HTMLFileUrl from Cl_Soft where Deleted=False and Passed=True and ChannelID="&ChannelID&" "
		if ClassID>0 then sqlSearch=sqlSearch &  " and ClassID in (" & Replace(arrChildID,"|",",") & ")"
		keyword = Cl.ReplaceBadChar(keyword&"")
		Select Case strField
		Case "ID"
			keywordtitle="ID号为 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and SoftID = "&Cl.ChkClng(keyword)&" "
		Case "Title"
			keywordtitle="名称含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and SoftName like '%" & keyword & "%' "
		Case "Keyword"
			keywordtitle="关键字含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Keyword like '%" & keyword & "%' "
		Case "Intro"
			keywordtitle="简介含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and SoftIntro like '%" & keyword & "%' "
		Case "Author"
			keywordtitle="作者含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Author like '%" & keyword & "%' "
		Case "Editor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 添加"
			sqlSearch=sqlSearch & " and Editor='" & keyword & "' "
		Case "Censor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 审核"
			sqlSearch=sqlSearch & " and Censor='" & keyword & "' "
		Case "Point"
			keywordtitle=""&Cl.Web_Setting(28)&"小于或等于 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and SoftPoint <= "&Cl.ChkClng(keyword)&" "
		Case Else
			sqlSearch=sqlSearch & " and SoftName like '%" & keyword & "%' "
		End Select
		keywordtitle = keywordtitle & "的"&Cl.ChannelItemName
		sqlSearch	 = sqlSearch & " order by UpdateTime desc,SoftID desc"
		TempStr		 = Template.html(5)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr=Replace(TempStr,"{%keywordtitle%}",keywordtitle)
		Set rsInfo= Server.CreateObject("ADODB.Recordset")
		OpenConn : rsInfo.open sqlSearch,Conn,1,1
		if rsInfo.bof and  rsInfo.eof then
			TotalPut=0
			TempStr = Replace(TempStr,"{%showpage%}","")
			TempStr = Replace(TempStr,"{%searchcontent%}","<tr><td colspan='6'>没有任何"&Cl.ChannelItemName&"</td></tr>")
			rsInfo.Close:Set rsInfo=Nothing:Exit Sub
		End if
		TotalPut=rsInfo.recordcount
		if (TotalPut mod MaxPerPage)=0 then
			TotalPages = TotalPut \ MaxPerPage
		else
			TotalPages = TotalPut \ MaxPerPage + 1
		end if
		if CurrentPage > TotalPages then CurrentPage=TotalPages
		if CurrentPage < 1 then CurrentPage=1
		rsInfo.move (CurrentPage-1)*MaxPerPage
		sqlSearch=rsInfo.GetRows(MaxPerPage)
		rsInfo.Close:Set rsInfo=Nothing
		dim strTemp,Attribute,LinkUrl,sIntro
		dim sSearchContent
		sSearchContent=""
		for i=0 to Ubound(sqlSearch,2)
			if sqlSearch(14,i)=True then
				Attribute="<img src=""" & Cl.mainpic(16) & """ alt=""固顶"">&nbsp;"
			elseif sqlSearch(15,i)=True then
				Attribute="<img src=""" & Cl.mainpic(15) & """ alt=""推荐"">&nbsp;"
			else
				Attribute="<img src=""" & Cl.mainpic(14) & """ alt=""普通"">&nbsp;"
			end if
			if sqlSearch(24,i)=True and Clng(Cl.Channel_Setting(10))=1 then
				LinkUrl=Cl.WebDir & sqlSearch(25,i)
			else
				LinkUrl=Cl.WebDir & Cl.Channel_Setting(4) & "/SoftShow.asp?SoftID="& sqlSearch(0,i)
			end if
			if strField="Title" or strField="" then
				sqlSearch(2,i)=Replace(sqlSearch(2,i),keyword,"<font color='#ff0033'>"&keyword&"</font>")
			end if
			sIntro=Left(Cl.NoHtml(sqlSearch(21,i)),200)
			if strField="Intro" then
				sIntro=Replace(sIntro,keyword,"<font color='#ff0033'>"&keyword&"</font>")
			end if
			strTemp=Replace(Template.html(10),"{%attribute%}",Attribute)
			strTemp=Replace(strTemp,"{%linkurl%}",LinkUrl)
			strTemp=Replace(strTemp,"{%softid%}",sqlSearch(0,i))
			strTemp=Replace(strTemp,"{%softname%}",sqlSearch(2,i))
			strTemp=Replace(strTemp,"{%softpicurl%}",sqlSearch(18,i)&"")
			strTemp=Replace(strTemp,"{%softversion%}",sqlSearch(3,i)&"")
			strTemp=Replace(strTemp,"{%updatetime%}",Cl.Format_Time(sqlSearch(7,i),3))
			strTemp=Replace(strTemp,"{%softsize%}",Cl.GetSize(sqlSearch(13,i),"k"))
			strTemp=Replace(strTemp,"{%hits%}",sqlSearch(9,i))
			strTemp=Replace(strTemp,"{%stars%}",Cl.Getstar(sqlSearch(17,i)))
			strTemp=Replace(strTemp,"{%softintro%}",sIntro&"")
			strTemp=Replace(strTemp,"{%operatingsystem%}",sqlSearch(22,i)&"")
			strTemp=Replace(strTemp,"{%softtype%}",sqlSearch(23,i)&"")
			strTemp=Replace(strTemp,"{%dayhits%}",sqlSearch(10,i))
			sSearchContent=sSearchContent & strTemp
		Next
		TempStr = Replace(TempStr,"{%searchcontent%}",sSearchContent)
		TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
	End Sub
	Public Sub Soft_Show()
		if SoftID<1 then Call Cl.OutMsg("找不到指定"&Cl.ChannelItemName&"。","Index.asp")
		Cl.Path			= CurrentPath & " >> " & Cl.ChannelItemName & "信息"
		Cl.Title		= InfoTitle & "[" & Cl.Web_info(1) & "]"
		if Not IsNull(rs("SoftIntro")) then
			Cl.DeScriptIon=InfoTitle & "[" & Replace(Left(Cl.NoHtml(rs("SoftIntro")),150),VbCrlf,"") & "]"
		else
			Cl.DeScriptIon=InfoTitle & "、" & Cl.Web_info(3)
		end if
		Cl.Keywords		= InfoTitle & "|" & rs("Keyword") & "|" & Cl.Web_Info(2)
		Cl.Keywords		= Replace(Cl.Keywords,"||","|")
		dim declarecomment
		TempStr=Template.html(2)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(11))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr=Replace(TempStr,"{%showdownloadurl%}",ShowDownLoadUrl())
		TempStr=Replace(TempStr,"{%downloadmsg%}","")
		declarecomment=Cl.mainhtml(14)
		declarecomment=Replace(declarecomment,"{%action%}",Cl.WebDir&"Comment.asp")
		if Cl.UserID>0 and Cl.UserLevel<>5 then
			declarecomment=Replace(declarecomment,"{%chkname%}","value="""&Cl.User_Info(5)&""" disabled")
			declarecomment=Replace(declarecomment,"{%chkemail%}","value="""&Cl.User_Info(8)&""" disabled")
		else
			declarecomment=Replace(declarecomment,"{%chkname%}","")
			declarecomment=Replace(declarecomment,"{%chkemail%}","")
		end if
		declarecomment=Replace(declarecomment,"{%infoid%}",rs("SoftID"))
		TempStr=Replace(TempStr,"{%declarecomment%}",declarecomment)
		TempStr=Replace(TempStr,"{%classid%}",ClassID)
		TempStr=Replace(TempStr,"{%classname%}",ClassName)
		TempStr=Replace(TempStr,"{%softid%}",rs("SoftID"))
		TempStr=Replace(TempStr,"{%softname%}",Cl.HTMLEncode(rs("SoftName")))
		TempStr=Replace(TempStr,"{%softversion%}",Cl.HTMLEncode(rs("SoftVersion")&""))
		TempStr=Replace(TempStr,"{%softsize%}",Cl.GetSize(rs("SoftSize"),"k"))
		if IsNull(rs("SoftPicUrl")) or rs("SoftPicUrl")="" then
			TempStr=Replace(TempStr,"{%softpicurl%}",Template.pic(3))
		else
			TempStr=Replace(TempStr,"{%softpicurl%}",rs("SoftPicUrl")&"")
		end if
		TempStr=Replace(TempStr,"{%stars%}",Cl.Getstar(rs("Stars")))
		TempStr=Replace(TempStr,"{%copyrighttype%}",rs("CopyrightType")&"")
		TempStr=Replace(TempStr,"{%softtype%}",rs("SoftType")&"")
		TempStr=Replace(TempStr,"{%softlanguage%}",rs("SoftLanguage")&"")
		TempStr=Replace(TempStr,"{%operatingsystem%}",Cl.HTMLEncode(rs("OperatingSystem")&""))
		TempStr=Replace(TempStr,"{%author%}",Cl.HTMLEncode(rs("Author")&""))
		TempStr=Replace(TempStr,"{%authoremail%}",rs("AuthorEmail")&"")
		TempStr=Replace(TempStr,"{%authorhomepage%}",rs("AuthorHomepage")&"")
		TempStr=Replace(TempStr,"{%demourl%}",rs("DemoUrl")&"")
		TempStr=Replace(TempStr,"{%updatetime%}",Cl.Format_Time(rs("UpdateTime"),2))
		TempStr=Replace(TempStr,"{%decompresspassword%}",rs("DecompressPassword")&"")
		TempStr=Replace(TempStr,"{%softlevel%}",Cl.GetUserGroupName(rs("SoftLevel")))
		TempStr=Replace(TempStr,"{%softpoint%}",rs("SoftPoint"))
		TempStr=Replace(TempStr,"{%softmoney%}",rs("SoftMoney"))'
		TempStr=Replace(TempStr,"{%dayhits%}",rs("DayHits"))
		TempStr=Replace(TempStr,"{%weekhits%}",rs("WeekHits"))
		TempStr=Replace(TempStr,"{%monthhits%}",rs("MonthHits"))
		TempStr=Replace(TempStr,"{%hits%}",rs("Hits"))
		TempStr=Replace(TempStr,"{%softintro%}",Cl.Ubbcode(rs("SoftIntro")))
		TempStr=Replace(TempStr,"{%editor%}",rs("Editor") & "")
		TempStr=Replace(TempStr,"{%censor%}",rs("Censor") & "")
		TempStr=Replace(TempStr,"{%showdownloadurl%}",ShowDownLoadUrl())
	End Sub
	Public Sub Soft_Down()
		dim UrlID,ComeUrl,SqlUpdate
		dim DownloadUrl,DownUrlStr,sTemp
		UrlID	= Cl.ChkClng(request("UrlID"))
		ComeUrl	= Cstr(Request.ServerVariables("HTTP_REFERER"))
		if SoftID=0 then Call Cl.OutMsg("请指定软件ID",ComeUrl)
		if UrlID<0 then UrlID=0
		Call ChkSoftLevel()
		if Rs("UseServer") then
			Dim rsS,ServerAddress,FileAddress
			Set rsS=Cl.Execute("Select * from Cl_Server where ChannelID="&ChannelID&" and ServerID="&UrlID&"")
			If rsS.Bof and rsS.Eof then
			rsS.Close:Set rsS=Nothing
			Call Cl.OutMsg("找不到有效下载地址，请点确定返回，然后点击其它下载地址！",ComeUrl)
			End if
			if Not Cl.ChkUserLevel(rsS("DownGroup"),Cl.UserLevel) then
			sTemp=Cl.GetUserGroupName(rsS("DownGroup"))
			rsS.Close:Set rsS=Nothing
			Cl.OutErr("对不起，此下载服务器只供以下权限会员使用：<font color=blue>"&sTemp&"</font><br />有关下载权限问题，请联系本站管理员，点击 <a href="""&ComeUrl&""">返回下载页</a>！")
			Response.end
			end if
			ServerAddress	= rsS("ServerAddress")
			FileAddress		= Cl.ReplaceDir(rs("FileAddress")&"")
			if left(FileAddress,1)="/" then FileAddress=Right(FileAddress,len(FileAddress)-1)
			DownloadUrl = ServerAddress & FileAddress
			if Cl.GetCookies("DownAddress_" & UrlID & "_" & SoftID)<>"OK" then
				if rsS("DownPoint")>0 then
					if Clng(Cl.User_Info(22))<Clng(rs("SoftPoint")) then
						ErrMsg=Replace(Template.Strings(7),"{%softpoint%}",rs("SoftPoint"))
						ErrMsg=Replace(ErrMsg,"{%userpoint%}",Cl.User_Info(22))
						response.write Cl.ReplaceItem(ErrMsg)
						response.end
					End if
					Cl.NewUserInfo 22,(Clng(Cl.User_Info(22))-rs("SoftPoint"))
					Cl.Execute_U "update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "-" & rs("SoftPoint") & " where " & Db.UserID & "=" & Cl.UserID & ""
				end if
				if rsS("DownMoney")>0 then
					if Clng(Cl.User_Info(23))<Clng(rsS("DownMoney")) then
						ErrMsg=Replace(Template.Strings(7),"{%softpoint%}",rsS("DownMoney"))
						ErrMsg=Replace(ErrMsg,"{%userpoint%}",Cl.User_Info(23))
						response.write Cl.ReplaceItem(ErrMsg)
						response.end
					End if
					Cl.NewUserInfo 23,(Clng(Cl.User_Info(23))-rsS("DownMoney"))
					Cl.Execute_U "update " & Db.UserTable & " set " & Db.UserMoney & "=" & Db.UserMoney & "-" & rsS("DownMoney") & " where " & Db.UserID & "=" & Cl.UserID & ""
				end if
				Cl.SetCookies "DownAddress_" & UrlID & "_" & SoftID,"OK"
			end if
			rsS.Close:Set rsS=Nothing
		else
			DownUrlStr=rs("DownloadUrl")
			On Error Resume Next
			if InStr(DownUrlStr,"@@@")>0 then
				DownUrlStr=Split(DownUrlStr,"@@@")
				if UrlID>Ubound(DownUrlStr) then UrlID=Ubound(DownUrlStr)
				DownLoadUrl=Split(DownUrlStr(UrlID),"|")(1)
			else
				DownLoadUrl=Split(DownUrlStr,"|")(1)
			end if
			On Error GoTo 0
			if DownloadUrl="" or DownloadUrl="http://" then
				rs.Close:Set rs=Nothing
				Call Cl.OutMsg("找不到有效下载地址，请点确定返回，然后点击其它下载地址！",ComeUrl)
			end if
			sTemp=Split(Cl.Channel_Setting(22),"@")
			DownloadUrl=Cl.ReplaceDir(DownloadUrl)
			DownloadUrl=Cl.ReplaceLabel(DownloadUrl)
			DownloadUrl=Replace(DownloadUrl,"{%downloaddir%}",Cl.UploadDir & Trim(sTemp(1)))
		end if
		SqlUpdate="Update Cl_Soft Set Hits=Hits+1"
		if datediff("D",rs("LastHitTime"),now())<=0 then
			SqlUpdate=SqlUpdate & ",DayHits=DayHits+1"
		else
			SqlUpdate=SqlUpdate & ",DayHits=1"
		end if
		if datediff("ww",rs("LastHitTime"),now())<=0 then
			SqlUpdate=SqlUpdate & ",WeekHits=WeekHits+1"
		else
			SqlUpdate=SqlUpdate & ",WeekHits=1"
		end if
		if datediff("m",rs("LastHitTime"),now())<=0 then
			SqlUpdate=SqlUpdate & ",MonthHits=MonthHits+1"
		else
			SqlUpdate=SqlUpdate & ",MonthHits=1"
		end if
		Cl.Execute(SqlUpdate & ",LastHitTime='"&Now&"' where SoftID=" & SoftID)
		if left(lcase(DownloadUrl),7)="http://" or left(lcase(DownloadUrl),6)="ftp://" or Not Cl.ChkObjInstalled(Trim(Cl.Web_Info(13))) or Trim(Cl.Web_Setting(11))<>"Yes" then
			CloseAllObj
			response.redirect DownloadUrl
		else
			Call Cl.downloadFile(Server.MapPath(DownloadUrl),InfoTitle)
		end if
	End Sub
	'=========================================================================
	Public Sub Photo_Index()
		MaxPerPage=Cl.ChannelOtherSetting(9)
		Cl.Path=CurrentPath & " >> 首页"
		TempStr=Template.html(0)
	End Sub
	Public Sub Photo_Class()
		MaxPerPage=Cl.ChannelOtherSetting(3)
		Cl.Path=CurrentPath
		if ClassID>0 then
			if Not Cl.TrueBrowsePurview and CreateHtmlIng=False then Cl.OutErr(Template.Strings(3))
			Cl.Title= ClassName & "--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		end if
		FileName="ShowClass.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(1)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr=Replace(TempStr,"{%classid%}",ClassID)
		TempStr=Replace(TempStr,"{%classname%}",ClassName)
		TempStr=Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr=Cl.ReplaceFlag(TempStr,"showphoto","")
		TempStr=Cl.ReplaceFlag(TempStr,"showpicphoto","")
		if TotalPut>0 then
			TempStr=Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr=Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Photo_Special()
		MaxPerPage=Cl.ChannelOtherSetting(4)
		Cl.Path=CurrentPath & " >> 专题列表"
		Cl.Title= "专题列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSpecial.Asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr = Replace(Template.html(6),"{%specialname%}",SpecialName)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showphoto","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicphoto","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Photo_Update()
		MaxPerPage=Cl.ChannelOtherSetting(5)
		Cl.Path=CurrentPath & " >> 更新列表"
		Cl.Title= "更新列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowUpdate.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(4)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showphoto","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicphoto","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub

	Public Sub Photo_Elite()
		MaxPerPage=Cl.ChannelOtherSetting(6)
		Cl.Path=CurrentPath & " >> 推荐列表"
		Cl.Title= "推荐列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowElite.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(3)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showphoto","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicphoto","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Photo_Hot()
		MaxPerPage=Cl.ChannelOtherSetting(7)
		Cl.Path=CurrentPath & " >> 热门列表"
		Cl.Title= "热门列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowHot.asp?ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(13)
		if Child>0 then
			TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
			TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr = Replace(TempStr,"{%specialid%}",SpecialID)
		TempStr = Replace(TempStr,"{%classid%}",ClassID)
		TempStr = Replace(TempStr,"{%classname%}",ClassName)
		TempStr = Replace(TempStr,"{%channelid%}",ChannelID)
		TempStr = Cl.ReplaceFlag(TempStr,"showphoto","")
		TempStr = Cl.ReplaceFlag(TempStr,"showpicphoto","")
		if TotalPut>0 then
			TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
		else
			TempStr = Replace(TempStr,"{%showpage%}","")
		end if
	End Sub
	Public Sub Photo_Search()
		MaxPerPage=Cl.ChannelOtherSetting(8)
		Cl.Path=CurrentPath & " >> 搜索结果"
		Cl.Title= "搜索结果--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
		FileName="ShowSearch.asp?Field=" & strField & "&Keyword=" & keyword & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID
		TempStr=Template.html(5)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		TempStr=Replace(TempStr,"{%classname%}",ClassName)
		TempStr=Replace(TempStr,"{%classid%}",ClassID)
		Dim keywordtitle,TopNum,sqlSearch
		if keyword="" then Cl.OutErr("<p align='center'><br /><br />请输入关键字！</p>")
		TopNum=Cl.ChkClng(Request("TopNum"))
		if TopNum=0 then
			sqlSearch="Select Top 100 "
		else
			sqlSearch="Select Top "&TopNum&" "
		end if
		sqlSearch=sqlSearch & "PhotoID,ClassID,PhotoName,Prefixion,Author,AuthorEmail,Editor,Keyword,Hits,DayHits,WeekHits,MonthHits,UpdateTime,PhotoPicUrl,OnTop,Elite,Passed,PhotoIntro,PhotoLevel,PhotoPoint,Stars,IsHtml,HtmlFileUrl from Cl_Photo where Deleted=False and Passed=True and ChannelID="&ChannelID&" "
		if ClassID>0 then sqlSearch=sqlSearch &  " and ClassID in (" & Replace(arrChildID,"|",",") & ")"
		keyword = Cl.ReplaceBadChar(keyword&"")
		Select Case strField
		Case "ID"
			keywordtitle="ID号为 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and PhotoID = "&Cl.ChkClng(keyword)&" "
		Case "Title"
			keywordtitle="名称含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and PhotoName like '%" & keyword & "%' "
		Case "Keyword"
			keywordtitle="关键字含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Keyword like '%" & keyword & "%' "
		Case "Intro"
			keywordtitle="简介含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and PhotoIntro like '%" & keyword & "%' "
		Case "Author"
			keywordtitle="作者含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and Author like '%" & keyword & "%' "
		Case "Editor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 添加"
			sqlSearch=sqlSearch & " and Editor='" & keyword & "' "
		Case "Censor"
			keywordtitle="<font color='#ff0033'>"&keyword&"</font> 审核"
			sqlSearch=sqlSearch & " and Censor='" & keyword & "' "
		Case "Point"
			keywordtitle=""&Cl.Web_Setting(28)&"小于或等于 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and PhotoPoint <= "&Cl.ChkClng(keyword)&" "
		Case Else
			keywordtitle="名称含有 <font color='#ff0033'>"&keyword&"</font> "
			sqlSearch=sqlSearch & " and PhotoName like '%" & keyword & "%' "
		End Select
		keywordtitle= keywordtitle & "的"&Cl.ChannelItemName
		sqlSearch=sqlSearch & " order by UpdateTime desc,PhotoID desc"
		TempStr=Replace(TempStr,"{%keywordtitle%}",keywordtitle)
		Set rsInfo= Server.CreateObject("ADODB.Recordset")
		OpenConn : rsInfo.open sqlSearch,Conn,1,1
		if rsInfo.bof and  rsInfo.eof then
			TotalPut=0
			TempStr = Replace(TempStr,"{%showpage%}","")
			TempStr = Replace(TempStr,"{%searchcontent%}","<p>没有任何"&Cl.ChannelItemName&"</p>")
			rsInfo.Close:Set rsInfo=Nothing:Exit Sub
		End if
		TotalPut=rsInfo.recordcount
		if (TotalPut mod MaxPerPage)=0 then
			TotalPages = TotalPut \ MaxPerPage
		else
			TotalPages = TotalPut \ MaxPerPage + 1
		end if
		if CurrentPage > TotalPages then CurrentPage=TotalPages
		if CurrentPage < 1 then CurrentPage=1
		rsInfo.move (CurrentPage-1)*MaxPerPage
		sqlSearch=rsInfo.GetRows(MaxPerPage)
		rsInfo.Close:Set rsInfo=Nothing
		dim strTemp,Attribute,LinkUrl,n,FileType,TitleStr
		strTemp="<table width=""100%"" cellpadding=""0"" cellspacing=""0"" border=""0"" align=""center""><tr valign=""top"">"
		for i=0 to Ubound(sqlSearch,2)
			strTemp=strTemp & "<td align=""center"">"
			if CBool(sqlSearch(21,i)) and Clng(Cl.Channel_Setting(10))=1 then
				LinkUrl=Cl.WebDir & sqlSearch(22,i)
			else
				LinkUrl=Cl.WebDir & Cl.Channel_Setting(4) & "/PhotoShow.asp?PhotoID=" & sqlSearch(0,i)
			end if
			FileType=right(lcase(sqlSearch(13,i)),3)
			TitleStr=Cl.GotTopic(sqlSearch(2,i),20)
			strTemp=strTemp & "<a href=""" & LinkUrl & """ title=""标题：" & sqlSearch(2,i) & vbcrlf & "作者：" & sqlSearch(4,i) & vbcrlf & "更新：" & sqlSearch(12,i) & vbcrlf & "点击：" & sqlSearch(8,i) & """ target=""_blank"">"
			sqlSearch(13,i)=Cl.ReplaceDir(sqlSearch(13,i))
			Select Case FileType
			Case "swf"
				strTemp=strTemp & "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"" width=""120"" height=""120""><param name=""movie"" value=""" & sqlSearch(13,i) & """><param name=""quality"" value=""high""><embed src=""" & sqlSearch(13,i) & """ pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=""120"" height=""120""></embed></object>"
			Case "jpg", "bmp", "png", "gif"
				strTemp=strTemp & "<img src=""" & sqlSearch(13,i) & """ width=""120"" height=""120"" border=""0"">"
			Case Else
				strTemp=strTemp & "<img src=""" & Cl.WebDir & "images/NoPic.gif"" width=""120"" height=""120"" border=""0"">"
			End Select
			strTemp=strTemp & "<br />" & TitleStr & "</a>"
			strTemp=strTemp & "</td>"
			if (i+1) mod 3 = 0 then strTemp=strTemp & "</tr><tr valign=""top"">"
		Next
		strTemp=strTemp &  "</tr></table>"
		TempStr = Replace(TempStr,"{%searchcontent%}",strTemp)
		TempStr = Replace(TempStr,"{%showpage%}",Cl.ShowPage(FileName,TotalPut,MaxPerPage,Cl.ChannelItemUnit,Cl.ChannelItemName))
	End Sub
	Public Sub Photo_Show()
		if PhotoID=0 then Call Cl.OutMsg("找不到指定" & Cl.ChannelItemName & "。","Index.asp")
		Cl.Path			= CurrentPath & " >> " & Cl.ChannelItemName & "信息"
		Cl.Title		= InfoTitle & "[" & Cl.Web_info(1) & "]"
		if Not IsNull(rs("PhotoIntro")) then
			Cl.DeScriptIon=InfoTitle & "[" & Replace(Left(Cl.NoHtml(rs("PhotoIntro")),150),VbCrlf,"") & "]"
		else
			Cl.DeScriptIon=InfoTitle & "、" & Cl.Web_info(3)
		end if
		Cl.Keywords=InfoTitle & "|" & rs("Keyword") & "|" & Cl.Web_Info(2)
		Cl.Keywords=Replace(Cl.Keywords,"||","|")
		TempStr=Template.html(2)
		if Child>0 then
		TempStr=Replace(TempStr,"{%showchildclass%}",Template.html(10))
		else
		TempStr=Replace(TempStr,"{%showchildclass%}","")
		end if
		dim PhotoUrlStr,TempPhotoUrl,TempPhotoDownUrl
		PhotoUrlStr=Trim(rs("PhotoUrl"))
		On error Resume Next
		if Instr(PhotoUrlStr,"@@@")>0 then
			PhotoUrlStr=Split(PhotoUrlStr,"@@@")
			for i=0 to Ubound(PhotoUrlStr)
				TempPhotoUrl = TempPhotoUrl & "<a href="""& Cl.WebDir & Cl.ChannelDir & "/PhotoShow.asp?UrlID="&i&"&PhotoID=" & rs("PhotoID") & """>" & Split(PhotoUrlStr(i),"|")(0) & "</a><br />"
				TempPhotoDownUrl = TempPhotoDownUrl & "<a href="""& Cl.WebDir & Cl.ChannelDir & "/PhotoDown.asp?UrlID="&i&"&PhotoID=" & rs("PhotoID") & """>" & Split(PhotoUrlStr(i),"|")(0) & "</a><br />"
			next
		else
			TempPhotoUrl = "<a href="""& Cl.WebDir & Cl.ChannelDir & "/PhotoShow.asp?UrlID="&i&"&PhotoID=" & rs("PhotoID") & """>" & Split(PhotoUrlStr,"|")(0) & "</a>"
			TempPhotoDownUrl = "<a href="""& Cl.WebDir & Cl.ChannelDir & "/PhotoDown.asp?UrlID="&i&"&PhotoID=" & rs("PhotoID") & """>" & Split(PhotoUrlStr,"|")(0) & "</a>"
		end if
		On Error GoTo 0
		TempStr=Replace(TempStr,"{%photourl%}",TempPhotoUrl)
		if Not rs("IsDownLoad") then
			TempStr=Replace(TempStr,"{%photodownurl%}",Template.Strings(9))
		else
			TempStr=Replace(TempStr,"{%photodownurl%}",TempPhotoDownUrl)
		end if
		Dim declarecomment
		declarecomment=Cl.mainhtml(14)
		declarecomment=Replace(declarecomment,"{%action%}",Cl.WebDir&"Comment.asp")
		if Cl.UserID>0 and Cl.UserLevel<>5 then
		declarecomment=Replace(declarecomment,"{%chkname%}","value="""&Cl.User_Info(5)&""" disabled")
		declarecomment=Replace(declarecomment,"{%chkemail%}","value="""&Cl.User_Info(8)&""" disabled")
		else
		declarecomment=Replace(declarecomment,"{%chkname%}","")
		declarecomment=Replace(declarecomment,"{%chkemail%}","")
		end if
		declarecomment=Replace(declarecomment,"{%infoid%}",rs("PhotoID"))
		TempStr=Replace(TempStr,"{%declarecomment%}",declarecomment)
		TempStr=Replace(TempStr,"{%classid%}",ClassID)
		TempStr=Replace(TempStr,"{%classname%}",ClassName)
		TempStr=Replace(TempStr,"{%photoname%}",rs("PhotoName"))
		TempStr=Replace(TempStr,"{%photoid%}",rs("PhotoID"))
		TempStr=Replace(TempStr,"{%photourlid%}",Request("UrlID")&"")
		TempStr=Replace(TempStr,"{%photopicurl%}",rs("PhotoPicUrl") & "")'<img src="" border=0 width=150>
		TempStr=Replace(TempStr,"{%photosize%}","")
		TempStr=Replace(TempStr,"{%author%}",rs("Author")&"")
		TempStr=Replace(TempStr,"{%updatetime%}",rs("UpdateTime"))
		TempStr=Replace(TempStr,"{%stars%}",Cl.Getstar(rs("Stars")))
		TempStr=Replace(TempStr,"{%photopoint%}",rs("PhotoPoint")&"")
		TempStr=Replace(TempStr,"{%photomoney%}",rs("PhotoMoney")&"")
		TempStr=Replace(TempStr,"{%dayhits%}",rs("DayHits")&"")
		TempStr=Replace(TempStr,"{%weekhits%}",rs("WeekHits")&"")
		TempStr=Replace(TempStr,"{%monthhits%}",rs("Monthhits")&"")
		TempStr=Replace(TempStr,"{%hits%}",rs("Hits")&"")
		TempStr=Replace(TempStr,"{%authoremail%}",rs("AuthorEmail")&"")
		TempStr=Replace(TempStr,"{%authorhomepage%}",rs("AuthorHomepage")&"") 
		TempStr=Replace(TempStr,"{%editor%}",rs("Editor") & "")
		TempStr=Replace(TempStr,"{%censor%}",rs("Censor") & "")
		TempStr=Replace(TempStr,"{%photointro%}",Cl.Ubbcode(rs("PhotoIntro")&""))
	End Sub
	Public Sub Photo_View()
		if PhotoID=0 then Call Cl.OutMsg("请指定软件ID",ComeUrl)
		Dim UrlID,PhotoJsContent
		Dim PhotoUrl,PhotoUrlStr,FirstUrl
		UrlID=Cl.ChkClng(Request("UrlID"))
		if UrlID<0 then UrlID=0
		ChkPhotoLevel
		PhotoUrlStr=Cl.ReplaceDir(rs("PhotoUrl"))
		if Instr(PhotoUrlStr,"@@@")>0 then
			PhotoUrlStr=Split(PhotoUrlStr,"@@@")
			if UrlID>Ubound(PhotoUrlStr) then UrlID=Ubound(PhotoUrlStr)
			for i=0 to Ubound(PhotoUrlStr)
				if Instr(PhotoUrlStr(i),"|")>0 then
					PhotoUrl = Split(PhotoUrlStr(i),"|")(1)
				else
					PhotoUrl = PhotoUrlStr(i)
				end if
				if UrlID=i then FirstUrl = PhotoUrl
				PhotoJsContent = PhotoJsContent & "s = new slide();" & VbCrlf
				PhotoJsContent = PhotoJsContent & "s.src =  """&PhotoUrl&""";" & VbCrlf
				PhotoJsContent = PhotoJsContent & "ss.add_slide(s);" & VbCrlf
			next
		else
			if Instr(PhotoUrlStr,"|")>0 then
				PhotoUrl = Split(PhotoUrlStr,"|")(1)
			else
				PhotoUrl = PhotoUrlStr
			end if
			FirstUrl = PhotoUrl
			PhotoJsContent = PhotoJsContent & "s = new slide();" & VbCrlf
			PhotoJsContent = PhotoJsContent & "s.src =  """&PhotoUrl&""";" & VbCrlf
			PhotoJsContent = PhotoJsContent & "ss.add_slide(s);" & VbCrlf
		end if
		TempStr=Template.html(11)
		TempStr=Replace(TempStr,"{%photojscontent%}",PhotoJsContent)
		If FoundErr=True then
			TempStr=Replace(TempStr,"{%photourlcontent%}",ErrMsg)
			response.write ErrMsg
		ElseIf FirstUrl="" or FirstUrl="http://" then
			TempStr=Replace(TempStr,"{%photourlcontent%}","地址错误!")
			response.write "地址错误!"
		Else
			TempStr=Replace(TempStr,"{%photourlcontent%}",Template.html(12))
			TempStr=Replace(TempStr,"{%photourl%}",FirstUrl)
		End if
		if Cl.GetCookies("View_"&ChannelID&"_" & PhotoID)<>"Yes" then
			dim StrUpdate
			StrUpdate="Update Cl_Photo Set Hits=Hits+1"
			if datediff("D",rs("LastHitTime"),now())<=0 then
				StrUpdate=StrUpdate & ",DayHits=DayHits+1"
			else
				StrUpdate=StrUpdate & ",DayHits=1"
			end if
			if datediff("ww",rs("LastHitTime"),now())<=0 then
				StrUpdate=StrUpdate & ",WeekHits=WeekHits+1"
			else
				StrUpdate=StrUpdate & ",WeekHits=1"
			end if
			if datediff("m",rs("LastHitTime"),now())<=0 then
				StrUpdate=StrUpdate & ",MonthHits=MonthHits+1"
			else
				StrUpdate=StrUpdate & ",MonthHits=1"
			end if
			StrUpdate=StrUpdate & ",LastHitTime="&SqlNowString&" where PhotoID=" & PhotoID
			Cl.Execute(StrUpdate)
			Cl.SetCookies "View_"&ChannelID&"_" & PhotoID,"Yes"
		end if
	End Sub
	Public Sub Photo_Down()
		if PhotoID=0 then Call Cl.OutMsg("请指定软件ID",ComeUrl)
		if Not rs("IsDownLoad") then Call Cl.OutMsg(Template.Strings(9),ComeUrl)
		dim UrlID,ComeUrl
		dim DownloadUrl,DownUrlStr
		UrlID=Cl.ChkCLng(request("UrlID"))
		ComeUrl=Cstr(Request.ServerVariables("HTTP_REFERER"))
		if UrlID<0 then UrlID=0
		DownUrlStr=rs("PhotoUrl")
		On Error Resume Next
		if InStr(DownUrlStr,"@@@")>0 then
			DownUrlStr=Split(DownUrlStr,"@@@")
			if UrlID>Ubound(DownUrlStr) then UrlID=Ubound(DownUrlStr)
			DownLoadUrl=Split(DownUrlStr(UrlID),"|")(1)
		else
			DownLoadUrl=Split(DownUrlStr,"|")(1)
		end if
		On Error GoTo 0
		if DownloadUrl="" or DownloadUrl="http://" then
			Call Cl.OutMsg("找不到有效下载地址，请点确定返回，然后点击其它下载地址！",ComeUrl)
		end if
		if Cl.GetCookies("Down_"&ChannelID&"_" & PhotoID)<>"Yes" then
			Cl.Execute("Update Cl_Photo Set DownLoadNum=DownLoadNum+1 where PhotoID=" & PhotoID)
			Cl.SetCookies "Down_"&ChannelID&"_" & PhotoID,"Yes"
		end if
		DownloadUrl=Cl.ReplaceDir(DownloadUrl)
		if left(lcase(DownloadUrl),7)="http://" or left(lcase(DownloadUrl),6)="ftp://" or Not Cl.ChkObjInstalled(Trim(Cl.Web_Info(13))) or Trim(Cl.Web_Setting(11))="Yes" then
			response.redirect DownloadUrl
		else
			Call Cl.downloadFile(Server.MapPath(DownloadUrl),InfoTitle)
		end if
	End Sub

End Class

Set PageData = New Cls_PageData

'===================================================
' CreateLive CMS Version 3.1
'							Powered by Aspoo.CoM
'===================================================
' File: Cl_ClsPageData.asp
' Date: 2005-10-31
' Mail: aspoo@126.com, Info@aspoo.cn
' Q  Q: 3315263, 596197794
' Msn : aspoo@126.com, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005 Aspoo.CoM All Rights Reserved.
'===================================================
%>
