📄 ks_refreshcls.asp
字号:
'站点统计
FileContent = Replace(FileContent, "{$GetSiteCountAll}", GetSiteCountAll(0))
'会员登录入口(横排)
FileContent = Replace(FileContent, "{$GetTopUserLogin}", "<Script Src=""" & DomainStr & "UserTopLogin.asp"" language=""javascript""></script>")
'会员登录入口(竖排)
FileContent = Replace(FileContent, "{$GetUserLogin}", "<Script Src=""" & DomainStr & "UserLogin.asp"" language=""javascript""></script>")
If InStr(FileContent, "{$GetSpecial}") <> 0 Then
Dim SpecialDir
SpecialDir = KSCMS.GetConfig("SpecialDir")
If Left(SpecialDir, 1) = "/" Or Left(SpecialDir, 1) = "\" Then SpecialDir = Right(SpecialDir, Len(SpecialDir) - 1)
SpecialDir = KSCMS.GetDomain & SpecialDir & KSCMS.GetConfig("FsoIndex")
FileContent = Replace(FileContent, "{$GetSpecial}", "<a href=""" & SpecialDir & """ target=""_blank"">专题</a>")
End If
If InStr(FileContent, "{$GetFriendLink}") <> 0 Then
FileContent = Replace(FileContent, "{$GetFriendLink}", "<a href=""" & DomainStr & "FriendLink/"" target=""_blank"">友情链接</a>")
End If
If InStr(FileContent, "{$GetSiteUrl}") <> 0 Then
FileContent = Replace(FileContent, "{$GetSiteUrl}", DomainStr)
End If
FileContent = Replace(FileContent, "{$GetInstallDir}", KSCMS.GetConfig("InstallDir"))
If InStr(FileContent, "{$GetManageLogin}") <> 0 Then
FileContent = Replace(FileContent, "{$GetManageLogin}", "<a href=""" & DomainStr & KSCMS.GetConfig("AdminDir") & "login.asp"" target=""_blank"">管理登录</a>")
End If
If InStr(FileContent, "{$GetCopyRight}") <> 0 Then
FileContent = Replace(FileContent, "{$GetCopyRight}", KSCMS.GetConfig("CopyRight"))
End If
If InStr(FileContent, "{$GetWebmaster}") <> 0 Then
FileContent = Replace(FileContent, "{$GetWebmaster}", "<a href=""mailto:" & KSCMS.GetConfig("WebmasterEmail") & """>" & KSCMS.GetConfig("Webmaster") & "</a>")
End If
If InStr(FileContent, "{$GetWebmasterEmail}") <> 0 Then
FileContent = Replace(FileContent, "{$GetWebmasterEmail}", KSCMS.GetConfig("WebmasterEmail"))
End If
If InStr(FileContent, "{$GetClassName}") <> 0 Then
FileContent = Replace(FileContent, "{$GetClassName}", KSCMS.ReturnClassName(Application(Cstr(KSCMS.SiteSN & "RefreshFolderID"))))
End If
FileContent = Replace(FileContent, "{$GetVote}", GetVote())
'替换搜索标签
FileContent = Replace(FileContent, "{$GetSearch}", GetSearch())
FileContent = Replace(FileContent, "{$GetShortSearch}", GetShortSearch())
FileContent = Replace(FileContent, "{$GetArticleSearch}", GetArticleSearch())
FileContent = Replace(FileContent, "{$GetPhotoSearch}", GetPhotoSearch())
FileContent = Replace(FileContent, "{$GetDownLoadSearch}", GetDownLoadSearch())
FileContent = Replace(FileContent, "{$GetSearchByDate}", GetSearchByDate())
ReplaceGeneralLabelContent = FileContent
End Function
'*********************************************************************************************************
'函数名:GetSiteCountAll
'作 用:替换网站统计标签为内容
'参 数:Flag-0总统计,1-文章统计 2-图片统计
'*********************************************************************************************************
Function GetSiteCountAll(Flag)
Dim ChannelTotal: ChannelTotal = Conn.Execute("Select Count(*) From KS_Class Where TN='0'")(0)
Dim MemberTotal:MemberTotal=Conn.Execute("Select Count(*) From KS_User")(0)
Dim CommentTotal: CommentTotal = Conn.Execute("Select Count(*) From KS_Comment")(0)
Dim GuestBookTotal:GuestBookTotal=Conn.Execute("Select Count(ID) From KS_GuestBook")(0)
Dim ArticleTotal: ArticleTotal = Conn.Execute("Select Count(*) From KS_Article")(0)
Dim PictureTotal: PictureTotal = Conn.Execute("Select Count(*) From KS_Photo")(0)
Dim DownLoadTotal: DownLoadTotal = Conn.Execute("Select Count(*) From KS_Download")(0)
Dim FlashTotal: FlashTotal = Conn.Execute("Select Count(*) From KS_Flash")(0)
GetSiteCountAll="<table border=0 align=""center"" width=""100%"" cellSpacing=0 cellPadding=0>" & vbcrlf
Select Case Flag
Case 0
GetSiteCountAll = GetSiteCountAll & "<tr><td>频道总数: " & ChannelTotal & " 个</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>会员总数: " & MemberTotal & " 位</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>文章总数: " & ArticleTotal & " 篇</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>图片总数: " & PictureTotal & " 张</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>下载总数: " & DownLoadTotal & " 个</td></tr>" & vbcrlf
' GetSiteCountAll = GetSiteCountAll & "<tr><td>动漫总数: " & FlashTotal & " 个</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>留言总数: " & GuestBookTotal &" 条</td></tr>" & vbcrlf
GetSiteCountAll = GetSiteCountAll & "<tr><td>评论总数: " & CommentTotal & " 条</td></tr>" & vbcrlf
End Select
GetSiteCountAll = GetSiteCountAll & "</table>" & vbcrlf
End Function
'替换RSS标签
Function ReplaceRssLabel(FileContent)
IF KSCMS.GetConfig("RssTF")=0 Then
FileContent=Replace(FileContent,"{$Rss}","")
FileContent=Replace(FileContent,"{$RssElite}","")
FileContent=Replace(FileContent,"{$RssHot}","")
ReplaceRssLabel=FileContent
Exit Function
End If
Dim CurrentRefreshType:CurrentRefreshType=Application(Cstr(KSCMS.SiteSN & "RefreshType"))
Dim CurrentClassID:CurrentClassID=Application(Cstr(KSCMS.SiteSN & "RefreshFolderID"))
Select Case CurrentRefreshType
Case "INDEX"
FileContent=Replace(FileContent,"{$Rss}",GetRssLink(DomainStr & "Rss.asp"))
FileContent=Replace(FileContent,"{$RssElite}",GetRssLink(DomainStr & "Rss.asp?Elite=1"))
FileContent=Replace(FileContent,"{$RssHot}",GetRssLink(DomainStr & "Rss.asp?Hot=1"))
Case "ArticleFolder"
FileContent=Replace(FileContent,"{$Rss}",GetRssLink(DomainStr & "Rss.asp?ChannelID=1&ClassID=" & CurrentClassID & ""))
FileContent=Replace(FileContent,"{$RssElite}",GetRssLink(DomainStr & "Rss.asp?ChannelID=1&ClassID=" &CurrentClassID & "&Elite=1"))
FileContent=Replace(FileContent,"{$RssHot}",GetRssLink(DomainStr & "Rss.asp?ChannelID=1&ClassID=" &CurrentClassID & "&Hot=1"))
Case "PictureFolder"
FileContent=Replace(FileContent,"{$Rss}",GetRssLink(DomainStr & "Rss.asp?ChannelID=2&ClassID=" &CurrentClassID & ""))
FileContent=Replace(FileContent,"{$RssElite}",GetRssLink(DomainStr & "Rss.asp?ChannelID=2&ClassID=" &CurrentClassID & "&Elite=1"))
FileContent=Replace(FileContent,"{$RssHot}",GetRssLink(DomainStr & "Rss.asp?ChannelID=2&ClassID=" &CurrentClassID & "&Hot=1"))
Case "DownLoadFolder"
FileContent=Replace(FileContent,"{$Rss}",GetRssLink(DomainStr & "Rss.asp?ChannelID=3&ClassID=" &CurrentClassID & ""))
FileContent=Replace(FileContent,"{$RssElite}",GetRssLink(DomainStr & "Rss.asp?ChannelID=3&ClassID=" &CurrentClassID & "&Elite=1"))
FileContent=Replace(FileContent,"{$RssHot}",GetRssLink(DomainStr & "Rss.asp?ChannelID=3&ClassID=" &CurrentClassID & "&Hot=1"))
Case "FlashFolder"
FileContent=Replace(FileContent,"{$Rss}",GetRssLink(DomainStr & "Rss.asp?ChannelID=4&ClassID=" &CurrentClassID & ""))
FileContent=Replace(FileContent,"{$RssElite}",GetRssLink(DomainStr & "Rss.asp?ChannelID=4&ClassID=" &CurrentClassID & "&Elite=1"))
FileContent=Replace(FileContent,"{$RssHot}",GetRssLink(DomainStr & "Rss.asp?ChannelID=4&ClassID=" &CurrentClassID & "&Hot=1"))
Case Else
FileContent=Replace(FileContent,"{$Rss}","")
FileContent=Replace(FileContent,"{$RssElite}","")
FileContent=Replace(FileContent,"{$RssHot}","")
End Select
ReplaceRssLabel = FileContent
End Function
'取得每个频道的RSS链接,结合ReplaceRssLabel调用
Function GetRssLink(LinkStr)
Dim ImgSrc:ImgSrc=DomainStr & "Images/Rss.gif"
GetRssLink="<a href=""" & LinkStr & """ target=""_blank""><img src=""" & ImgSrc & """ border=""0"">"
End Function
'*********************************************************************************************************
'函数名:ReplaceAnnounceContent
'作 用:替换公告内容页标签为内容
'参 数:FileContent待替换的内容
'*********************************************************************************************************
Function ReplaceAnnounceContent(RefreshRS, FileContent)
If InStr(FileContent, "{$GetAnnounceTitle}") <> 0 Then
FileContent = Replace(FileContent, "{$GetAnnounceTitle}", RefreshRS(0))
End If
If InStr(FileContent, "{$GetAnnounceAuthor}") <> 0 Then
FileContent = Replace(FileContent, "{$GetAnnounceAuthor}", RefreshRS(1))
End If
If InStr(FileContent, "{$GetAnnounceDate}") <> 0 Then
FileContent = Replace(FileContent, "{$GetAnnounceDate}", RefreshRS(2))
End If
If InStr(FileContent, "{$GetAnnounceContent}") <> 0 Then
FileContent = Replace(FileContent, "{$GetAnnounceContent}", RefreshRS(3))
End If
ReplaceAnnounceContent = FileContent
End Function
'*********************************************************************************************************
'函数名:ReplaceLinkContent
'作 用:替换友情链接页标签为内容
'参 数:FileContent待替换的内容
'*********************************************************************************************************
Function ReplaceListContent(FileContent)
' on error resume next
Dim Domain, ClassLinkStr, DetailListStr, KeyWord
Dim RClassID, ClassID, LinkType, ViewKind
Dim ObjRS:Set ObjRS=Server.CreateObject("ADODB.Recordset")
Domain = KSCMS.GetDomain()
RClassID = KSCMS.ChkClng(Replace(Replace(Request.QueryString("ClassID"), """", ""), "'", ""))
LinkType = KSCMS.ChkClng(Replace(Replace(Request.QueryString("LinkType"), """", ""), "'", ""))
ViewKind = KSCMS.ChkClng(Replace(Replace(Request.QueryString("ViewKind"), """", ""), "'", ""))
KeyWord = Replace(Replace(Request.QueryString("KeyWord"), """", ""), "'", "")
IF ViewKind=0 Then ViewKind=1
If LinkType = 0 Then LinkType = 2
If RClassID = 0 Then RClassID = 0
If Not IsNumeric(RClassID) Then
Call KSCMS.Alert("非法参数!", "")
Set KSCMS = Nothing:Exit Function
End If
If InStr(FileContent, "{$GetLinkCommonInfo}") <> 0 Then
FileContent = Replace(FileContent, "{$GetLinkCommonInfo}", "<a href=""" & Domain & "FriendLink/Index.asp"">常规查看</a> | <a href=""" & Domain & "FriendLink/Index.asp?ViewKind=1"">按点击数查看</a> | <a href=""" & Domain & "FriendLink/Index.asp?ViewKind=2"">按类别查看</a> | <a href=""" & Domain & "FriendLink/Index.asp?ViewKind=3"">所有推荐站点</a> | <a href=""" & Domain & "FriendLink/FriendLinkReg.asp"">申请友情链接</a> ")
End If
If InStr(FileContent, "{$GetClassLink}") <> 0 Then
ClassLinkStr = "<table width=""100%"" border=""0""><form action=""Index.asp"" method=""get"" name=""SearchLink""><tr><td>分类显示:<select name='LinkType' id='LinkType' onchange=""if(this.options[this.selectedIndex].value!=''){location='Index.asp?LinkType='+this.options[this.selectedIndex].value;}"">"
If LinkType = 2 Then
ClassLinkStr = ClassLinkStr & "<option value='2' selected>所有类型</option>"
Else
ClassLinkStr = ClassLinkStr & "<option value='2'>所有类型</option>"
End If
If LinkType = 1 Then
ClassLinkStr = ClassLinkStr & "<option value='1' selected>LOGO链接</option>"
Else
ClassLinkStr = ClassLinkStr & "<option value='1'>LOGO链接</option>"
End If
If LinkType = 0 Then
ClassLinkStr = ClassLinkStr & "<option value='0' selected>文字链接</option>"
Else
ClassLinkStr = ClassLinkStr & "<option value='0'>文字链接</option>"
End If
ClassLinkStr = ClassLinkStr & "</select>"
ClassLinkStr = ClassLinkStr & " <select name='ViewClassID' id='ViewClassID' onchange=""if(this.options[this.selectedIndex].value!=''){location='Index.asp?LinkType=" & LinkType & "&ClassID='+this.options[this.selectedIndex].value;}""><option value='0'>所有分类站点</option>"
ObjRS.Open "Select FolderID,FolderName From KS_LinkFolder Order BY AddDate Desc", Conn, 1, 1
If Not ObjRS.EOF Then
Do While Not ObjRS.EOF
ClassID = ObjRS(0)
If CStr(RClassID) = CStr(ClassID) Then
ClassLinkStr = ClassLinkStr & "<option value='" & ClassID & "' selected>" & ObjRS(1) & "</option>"
Else
ClassLinkStr = ClassLinkStr & "<option value='" & ClassID & "'>" & ObjRS(1) & "</option>"
End If
ObjRS.MoveNext
Loop
End If
ObjRS.Close
ClassLinkStr = ClassLinkStr & "</select> 关键字:<input class=""textbox"" type=""text"" size=""22"" name=""KeyWord""> <input class=""inputbutton"" type=""submit"" value="" 搜 索 ""></td></tr></form></table>"
FileContent = Replace(FileContent, "{$GetClassLink}", ClassLinkStr)
End If
If InStr(FileContent, "{$GetLinkDetail}") <> 0 Then
Dim totalPut, CurrentPage,Para
If ViewKind = 2 Then '按分类查看
If RClassID = 0 Then
Dim CRS:Set CRS=Server.CreateObject("ADODB.Recordset")
CRS.Open "Select FolderID,FolderName From KS_LinkFolder Order BY AddDate Desc", Conn, 1, 1
If CRS.EOF And CRS.BOF Then
DetailListStr = "还没有任何友情链接站点分类!"
Else
DetailListStr = "<table width=""100%"" cellpadding=""0"" cellspacing=""0"" Class=""table_border""><tr><td>"
DetailListStr = DetailListStr & "<table width='100%' cellSpacing=2 cellPadding=1 border=0>"
Do While Not CRS.EOF
DetailListStr = DetailListStr & "<tr><td Class=""link_table_title""><a href='Index.asp?ViewKind=2&ClassID=" & CRS(0) & "'><b>" & CRS(1) & "</b></a></td></tr>"
DetailListStr = DetailListStr & GetClassSiteList(CRS(0))
CRS.MoveNext
Loop
DetailListStr = DetailListStr & "</table></td></tr></table>"
End If
CRS.Close
Set CRS = Nothing
Else
DetailListStr = "<table width=""100%"" cellpadding=""0"" cellspacing=""0"" Class=""table_border""><tr><td>"
DetailListStr = DetailListStr & "<table width='100%' cellSpacing=2 cellPadding=1 border=0>"
DetailListStr = DetailListStr & "<tr><td Class=""link_table_title""><b>"
Dim ClassRS
Set ClassRS = Conn.Execute("Select FolderName From KS_LinkFolder Where FolderID=" & RClassID)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -