📄 cl_clspage.asp
字号:
End Sub
Public Sub Soft_Class()
PageSize = Cl.ChannelOtherSetting(3)
Cl.Path = CurrentPath
FileName = "ShowClass.asp?ClassID=" & ClassID
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
Template.TemplateID = CLng(Cl.Channel.selectSingleNode("@class_templateid").text)
If CLng(ClassTemplateID)>0 Then Template.TemplateID = ClassTemplateID
Call Template.Load(2,2)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(2,TempStr,0,"")
End Sub
Public Sub Soft_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(2,3)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(2,TempStr,0,"and Elite="&TrueType)
End Sub
Public Sub Soft_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(2,4)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(2,TempStr,0,"and Hot="&TrueType)
End Sub
Public Sub Soft_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(2,5)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(2,TempStr,0,"")
End Sub
Public Sub Soft_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
Rem 搜索Begin
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 "Title"
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 SoftName like '%" & Keyword & "%' "
End Select
KeywordTitle = KeywordTitle & " 的"&Cl.ChannelItemName
Rem 搜索End
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(2,6)
TempStr = Template.Html
TempStr = Replace(TempStr,"{$keywordtitle}",KeywordTitle)
TempStr = Template.ReplaceInfoLoop(2,TempStr,TopNum,WhereStr)
End Sub
Public Sub Soft_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(2,7)
TempStr = Template.Html
TempStr = Template.ReplaceInfoLoop(2,TempStr,0,"and SpecialID like (',"&SpecialID&",')")
End Sub
Public Sub Soft_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(2,8)
TempStr = Template.Html
TempStr = Template.ReplaceCl_Rs(TempStr)
TempStr = Cl.ReplaceField(TempStr)
If InStr(TempStr,"{$showdownloadurl}")>0 Then
TempStr = Replace(TempStr,"{$showdownloadurl}",ShowDownLoadUrl())
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,"{$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,"{$softsize}")>0 Then
TempStr = Replace(TempStr,"{$softsize}",Cl.GetSize(rs("SoftSize"),"k"))
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,"{$stars}")>0 Then
TempStr = Replace(TempStr,"{$stars}",Cl.Getstar(rs("Stars")))
End If
If InStr(TempStr,"{$infogroup}")>0 Then
TempStr = Replace(TempStr,"{$infogroup}",Cl.GetUserGroupName(rs("InfoGroup")))
End If
'If InStr(TempStr,"{$infogroupname}")>0 Then
' TempStr = Replace(TempStr,"{$infogroupname}",Cl.GetUserGroupName(rs("InfoGroup")))
'End If
If InStr(TempStr,"{$intro}")>0 Then
TempStr = Replace(TempStr,"{$intro}",Cl.Ubbcode(rs("Intro")))
End If
End Sub
Public Sub Soft_Down()
Dim UrlID,ComeUrl
Dim DownloadUrl,DownUrlStr,sTemp
UrlID = Cl.GetClng(request("UrlID"))
ComeUrl = Cstr(Request.ServerVariables("HTTP_REFERER"))
if InfoID=0 then Call Cl.OutMsg(0,"请指定软件ID",ComeUrl)
if UrlID<0 then UrlID=0
if Cl.TrueInfoPurview=False then
Response.write Cl.ErrMessage
Response.end
end if
if Rs("UseServer") then
Dim rsS,ServerAddress,FileAddress
Set rsS=Cl.Execute("Select * from Cl_Server where ProjectID="&Cl.GetClng(Cl.Channel.selectSingleNode("@serverprojectid").text)&" and ServerID="&UrlID&"")
If rsS.Bof and rsS.Eof then
rsS.Close:Set rsS=Nothing
Call Cl.OutMsg(0,"找不到有效下载地址,请点确定返回,然后点击其它下载地址!",ComeUrl)
End if
if Not Cl.ChkUserGroupID(rsS("DownGroup"),Cl.UserGroupID) then
ErrMsg = Cl.Language.selectSingleNode("//AddressNoPurview").text
ErrMsg = Replace(ErrMsg,"{$usergroup}",Cl.GetUserGroupName(rsS("DownGroup")))
ErrMsg = Replace(ErrMsg,"{$comeurl}",ComeUrl)
rsS.Close:Set rsS=Nothing
Call Cl.OutErr(0,ErrMsg)
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 & "_" & InfoID)<>"OK" then
if rsS("DownPoint")>0 then
if Clng(Cl.User_Info(15))<Clng(rsS("DownPoint")) Then
ErrMsg = Cl.Language.selectSingleNode("//AddressPointLack").text
ErrMsg = Replace(ErrMsg,"{$downpoint}",rsS("DownPoint"))
response.write Cl.ReplaceItem(ErrMsg)
response.end
End if
Call Cl.NewUserInfo(15,Clng(Cl.User_Info(15))-rsS("DownPoint"))
Cl.Execute_U "update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "-" & rsS("DownPoint") & " where " & Db.UserID & "=" & Cl.UserID & ""
end if
if rsS("DownMoney")>0 then
if Clng(Cl.User_Info(16))<Clng(rsS("DownMoney")) then
ErrMsg = Cl.Language.selectSingleNode("//AddressMoneyLack").text
ErrMsg = Replace(ErrMsg,"{$downmoney}",rsS("DownMoney"))
response.write Cl.ReplaceItem(ErrMsg)
response.end
End if
Call Cl.NewUserInfo(16,Clng(Cl.User_Info(16))-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 & "_" & InfoID,"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)
DownUrlStr=Empty
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(0,"找不到有效下载地址,请点确定返回,然后点击其它下载地址!",ComeUrl)
end if
sTemp=Split(Cl.Channel.selectSingleNode("@uploadsetting").text,"@")
DownloadUrl=Cl.ReplaceDir(DownloadUrl)
DownloadUrl=Template.ReplaceLabel(DownloadUrl)
DownloadUrl=Replace(DownloadUrl,"{$downloaddir}",Cl.UploadDir & Trim(sTemp(1)))
end if
Call Cl.UpdateInfoHits("Cl_Soft",InfoID,rs("LastHitTime"))
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
Rem =========================================
Rem 图片模块 ================================
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -