📄 cl_clspage.asp
字号:
Public Sub Photo_Index()
PageSize=Cl.ChannelOtherSetting(9)
Cl.Path=CurrentPath & " >> 首页"
If CLng(Cl.Channel.selectSingleNode("@index_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@index_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@index_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@index_cssid").text)
End if
if Clng(Cl.Channel.selectSingleNode("@iscreatehtml").text)=1 and Cl.Web_Info(15) = "1" Then
Rem 定时生成首页(待测试)
Dim CurrentHour,IndexFileUrlStr
CurrentHour = Hour(Now())
IndexFileUrlStr = Cl.WebDir & Cl.GetItemIndexPath(Cl.CreatePathType, Cl.HtmlDir, Cl.ChannelDir) & "Index." & Cl.CreateFileExt
If InStr(","&Cl.Web_Info(17)&",",","&CurrentHour&",")>0 Then
Cl.Name="CreateIndex"
If InStr(","&Cl.value&",",","&ChannelID&"_"&CurrentHour&",")=0 Then
Call Template.Load(3,1)
TempStr = Template.Html
TempStr = Template.ReplaceAllFlag(TempStr)
Call Cl.MakeHtml(TempStr,IndexFileUrlStr)
Cl.Name = "CreateIndex"
Cl.Value= Cl.Value & ","&ChannelID&"_" & CurrentHour
End If
End If
Response.redirect(IndexFileUrlStr)
Response.end
End if
Call Template.Load(3,1)
TempStr = Template.Html
End Sub
Public Sub Photo_Class()
PageSize=Cl.ChannelOtherSetting(3)
Cl.Path=CurrentPath
if ClassID>0 then
if Not Cl.TrueBrowsePurview and CreateHtmlIng=False then Call Cl.OutErr(0,Cl.Language.selectSingleNode("//ClassNoPurview").text)
Cl.Title= ClassName & "--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
end if
FileName="ShowClass.asp?ClassID=" & ClassID
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@class_templateid").text)
If CLng(ClassTemplateID)>0 Then Template.TemplateID = ClassTemplateID
Call Template.Load(3,2)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,"")
End Sub
Public Sub Photo_Elite()
PageSize=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
If CLng(Cl.Channel.selectSingleNode("@elite_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@elite_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@elite_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@elite_cssid").text)
End if
Call Template.Load(3,3)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,"and Elite="&TrueType)
End Sub
Public Sub Photo_Hot()
PageSize=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
If CLng(Cl.Channel.selectSingleNode("@hot_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@hot_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@hot_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@hot_cssid").text)
End if
Call Template.Load(3,4)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,"and Hot="&TrueType)
End Sub
Public Sub Photo_Update()
PageSize=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
If CLng(Cl.Channel.selectSingleNode("@update_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@update_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@update_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@update_cssid").text)
End if
Call Template.Load(3,5)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,"")
End Sub
Public Sub Photo_Search()
PageSize=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=" & Field & "&Keyword=" & Keyword & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID
Dim KeywordTitle,TopNum,WhereStr
if Keyword="" then Call Cl.OutErr(0,"<p align='center'><br /><br />请输入关键字!</p>")
TopNum = Cl.GetClng(Request("TopNum"))
Keyword = Cl.ReplaceBadChar(Keyword&"")
KeywordTitle = "<font color=""#ff0033"">"&Keyword&"</font>"
Select Case LCase(Field)
Case "id"
KeywordTitle="ID号为 "&KeywordTitle
WhereStr = " and InfoID = "&Cl.GetClng(Keyword)&" "
Case "keyword"
KeywordTitle="关键字含有 "&KeywordTitle
WhereStr = " and Keyword like '%" & Keyword & "%' "
Case "intro"
KeywordTitle="简介含有 "&KeywordTitle
WhereStr = " and Intro like '%" & Keyword & "%' "
Case "author"
KeywordTitle="作者含有 "&KeywordTitle
WhereStr = " and Author like '%" & Keyword & "%' "
Case "editor"
KeywordTitle=KeywordTitle & " 添加"
WhereStr = " and Editor='" & Keyword & "' "
Case "censor"
KeywordTitle=KeywordTitle & " 审核"
WhereStr = " and Censor='" & Keyword & "' "
Case "point"
KeywordTitle=""&Cl.Web_Setting(28)&"小于或等于 "&KeywordTitle
WhereStr = " and InfoPoint <= "&Cl.GetClng(Keyword)&" "
Case Else
KeywordTitle="名称含有 "&KeywordTitle
WhereStr = " and PhotoName like '%" & Keyword & "%' "
End Select
KeywordTitle = KeywordTitle & " 的"&Cl.ChannelItemName
If CLng(Cl.Channel.selectSingleNode("@search_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@search_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@search_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@search_cssid").text)
End if
Call Template.Load(3,6)
TempStr = Template.Html
TempStr = Replace(TempStr,"{$keywordtitle}",KeywordTitle)
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,WhereStr)
End Sub
Public Sub Photo_Special()
Call Special_Setting()
PageSize=Cl.ChannelOtherSetting(4)
Cl.Path=CurrentPath & " >> 专题列表"
Cl.Title= "专题列表--" & Cl.NoHtml(Cl.ChannelName) & " " & Cl.GotTopic(Cl.ChannelReadMe,50) & "[" & Cl.Web_info(1) & "]"
FileName="ShowSpecial.asp?SpecialID=" & SpecialID
If CLng(Cl.Channel.selectSingleNode("@special_projectid").text)>0 Then
Template.ProjectID = CLng(Cl.Channel.selectSingleNode("@special_projectid").text)
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@special_templateid").text)
Template.CssID = CLng(Cl.Channel.selectSingleNode("@special_cssid").text)
End if
Call Template.Load(3,7)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(3,TempStr,0,"and SpecialID like '%,"&SpecialID&",%' ")
End Sub
Public Sub Photo_Show()
Cl.Path = CurrentPath & " >> " & Cl.ChannelItemName & "信息"
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,"||","|")
If Rs("ProjectID")>0 Then
Template.ProjectID = Rs("ProjectID")
Template.TemplateID = Rs("TemplateID")
Template.CssID = Rs("CssID")
End if
Call Template.Load(3,8)
TempStr = Template.Html
TempStr = Template.ReplaceCl_Rs(TempStr)
TempStr = Cl.ReplaceField(TempStr)
If InStr(TempStr,"{$photourljs}")>0 then
Dim PhotoUrlStr,TempPhotoUrlJs
PhotoUrlStr=Trim(rs("PhotoUrl"))
On error Resume Next
if Instr(PhotoUrlStr,"@@@")>0 then
PhotoUrlStr=Split(PhotoUrlStr,"@@@")
for i=0 to Ubound(PhotoUrlStr)
TempPhotoUrlJs = TempPhotoUrlJs & "ArrName["&i&"]='" & Split(PhotoUrlStr(i),"|")(0) & "';" & VbCrlf
TempPhotoUrlJs = TempPhotoUrlJs & "ArrUrl["&i&"]='" & Split(PhotoUrlStr(i),"|")(1) & "';" & VbCrlf
next
PhotoUrlStr=Empty
else
TempPhotoUrlJs = TempPhotoUrlJs & "ArrName[0]='" & Split(PhotoUrlStr,"|")(0) & "';" & VbCrlf
TempPhotoUrlJs = TempPhotoUrlJs & "ArrUrl[0]='" & Split(PhotoUrlStr,"|")(1) & "';" & VbCrlf
end if
On Error GoTo 0
TempStr=Replace(TempStr,"{$photourljs}",TempPhotoUrlJs)
End If
If InStr(TempStr,"{$attribute}")>0 Then
Dim Attribute
if rs("OnTop") then Attribute="<font color='blue'>顶</font>"
if rs("Hot") then Attribute=Attribute & " <font color='#ff0033'>热</font>"
if rs("Elite") then Attribute=Attribute & " <font color='green'>荐</font>"
TempStr=Replace(TempStr,"{$attribute}",Attribute)
End If
If InStr(TempStr,"{$declarecomment}")>0 Then TempStr = Replace(TempStr,"{$declarecomment}","")
if Cl.UserID>0 and Cl.UserGroupID<>5 then
If InStr(TempStr,"{$isdisabled}")>0 Then TempStr = Replace(TempStr,"{$isdisabled}"," disabled")
If InStr(TempStr,"{$username}")>0 Then TempStr = Replace(TempStr,"{$username}",Cl.MemberName&"")
If InStr(TempStr,"{$useremail}")>0 Then TempStr = Replace(TempStr,"{$useremail}",Cl.User_Info(7) & "")
else
If InStr(TempStr,"{$isdisabled}")>0 Then TempStr = Replace(TempStr,"{$isdisabled}","")
If InStr(TempStr,"{$username}")>0 Then TempStr = Replace(TempStr,"{$username}","")
If InStr(TempStr,"{$useremail}")>0 Then TempStr = Replace(TempStr,"{$useremail}","")
end if
If InStr(TempStr,"{$photourlid}")>0 then
TempStr=Replace(TempStr,"{$photourlid}",Request("UrlID")&"")
End If
If InStr(TempStr,"{$picurl}")>0 Then
if IsNull(rs("picurl")) or rs("picurl")="" then
TempStr = Replace(TempStr,"{$picurl}",InstallDir & "images/nopic.gif")
else
TempStr = Replace(TempStr,"{$picurl}",rs("picurl")&"")
end If
End If
If InStr(TempStr,"{$infogroup}")>0 Then
TempStr = Replace(TempStr,"{$infogroup}",Cl.GetUserGroupName(rs("InfoGroup")))
End If
If InStr(TempStr,"{$stars}")>0 Then
TempStr = Replace(TempStr,"{$stars}",Cl.Getstar(rs("Stars")))
End If
If InStr(TempStr,"{$intro}")>0 Then
TempStr = Replace(TempStr,"{$intro}",Cl.Ubbcode(rs("Intro")))
End If
Call Cl.UpdateInfoHits("Cl_Photo",InfoID,rs("LastHitTime"))
End Sub
Public Sub Photo_Down()
if InfoID=0 then Call Cl.OutMsg(0,"请指定软件ID",ComeUrl)
if Not rs("IsDownLoad") Then
Rs.Close : Set Rs = Nothing
Call Cl.OutMsg(0,Cl.Language.selectSingleNode("//Photo/NoDownLoad").text,ComeUrl)
End if
dim UrlID,ComeUrl
dim DownloadUrl,DownUrlStr
UrlID=Cl.GetClng(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)
DownUrlStr=Empty
else
DownLoadUrl=Split(DownUrlStr,"|")(1)
end if
On Error GoTo 0
if DownloadUrl="" or DownloadUrl="http://" then
Call Cl.OutMsg(0,"找不到有效下载地址,请点确定返回,然后点击其它下载地址!",ComeUrl)
end if
if Cl.GetCookies("Down_"&ChannelID&"_" & InfoID)<>"Yes" then
Cl.Execute("Update Cl_Photo Set DownLoadNum=DownLoadNum+1 where InfoID=" & InfoID)
Cl.SetCookies "Down_"&ChannelID&"_" & InfoID,"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 4.0
' Powered by Aspoo.CoM
'===================================================
' File: Cl_ClsPage.asp
' Date: 2007-4-11
' Mail: Info@aspoo.cn
' Q Q: 3315263, 596197794
' Msn : support@aspoo.cn, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005-2007 Aspoo.CoM All Rights Reserved.
'===================================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -