打开 syscls目录下的 ks_refreshfunction.asp
并找到GetLastArticleList这个函数,将该函数替换为
'取得文章分页函数
Function GetLastArticleList(PerPageNumber, RowHeight, ShowClassName, OpenType, TitleLen, ArticleSort, IncludeSubClass, ShowPicFlag, NavType, Nav, SplitPic, DateRule, DateAlign, TitleCss, DateCss)
On Error Resume Next
Dim FolderID, ArticleSql, CommentStr
If Application(Cstr(KSCMS.SiteSN & "RefreshType")) = "ArticleFolder" Or Application(Cstr(KSCMS.SiteSN & "RefreshType")) = "Special" Then
If Application(Cstr(KSCMS.SiteSN & "RefreshType")) = "Special" Then '刷新专题,查询语句不同
ArticleSql = "SELECT ID FROM KS_Article WHERE SpecialID like '%" & Application(Cstr(KSCMS.SiteSN & "CurrSpecialID")) & "%' AND Verific=1 And DelTF=0 Order by ID Desc"
Else
FolderID = Application(Cstr(KSCMS.SiteSN & "RefreshFolderID"))
If CBool(IncludeSubClass) = True Then
Dim ArticleTid
ArticleTid = GetFolderTid(FolderID) '取子目录ID集合
ArticleSql = "SELECT ID FROM KS_Article WHERE Tid in (" & ArticleTid & ") AND Verific=1 AND DelTF<>1 order by ID Desc"
Else
ArticleSql = "SELECT ID FROM KS_Article Where Tid='" & FolderID & "' AND Verific=1 AND DelTF<>1 order by ID Desc"
End If
End If
Dim ArticleRS:Set ArticleRS=Server.CreateObject("ADODB.RECORDSET")
ArticleRS.Open ArticleSql, Conn, 1, 1
If ArticleRS.EOF And ArticleRS.BOF Then
GetLastArticleList = "<p>此栏目下没有文章</p>"
Application(Cstr(KSCMS.SiteSN & "PageArticleList")) = ""
ArticleRS.Close:Set ArticleRS = Nothing:Exit Function
Else
PerPageNumber=cint(PerPageNumber)
Dim PageNum, I, J, k, TempStr, OpenTypeStr
Dim FolderNameAndLinkStr, TempTitle, NaviStr, ColSpanNum
Dim CurrTid, AddDate,SqlStr
OpenTypeStr = GetOpenTypeStr(OpenType)
dim totalput,TempIDArrStr
TotalPut = ArticleRS.recordcount
if (TotalPut mod PerPageNumber)=0 then
PageNum = TotalPut \ PerPageNumber
else
PageNum = TotalPut \ PerPageNumber + 1
end if
For I = 1 To PageNum
ArticleRS.Move (I - 1) * PerPageNumber,1
TempIDArrStr = ""
For J = 1 To PerPageNumber
TempIDArrStr = TempIDArrStr &ArticleRS(0) & ","
ArticleRS.MoveNext
If ArticleRS.EOF Then Exit For
Next
TempIDArrStr = Left(TempIDArrStr, Len(TempIDArrStr) - 1)
SqlStr = "SELECT * FROM KS_Article Where ID in (" & TempIDArrStr & ") AND Verific=1 AND DelTF=0 order by " & ArticleSort
TempStr = TempStr & "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & vbCrLf
TempStr = TempStr & "<tr>" & vbCrLf
TempStr = TempStr & "<td>" & vbCrLf
TempStr = TempStr & GetCommonArticleList(SqlStr, "", ShowClassName, OpenTypeStr, RowHeight, TitleLen, 1, ShowPicFlag, NavType, Nav, SplitPic, DateRule, DateAlign, TitleCss, DateCss)
TempStr = TempStr & "</td>" & vbCrLf & "</tr>"
TempStr = TempStr & "<tr><td align=""right"" height=""25"">" & "共 " & TotalPut & " 篇 页次:<font color=red> " & I & "</font>/" & PageNum & "页 " & PerPageNumber & " 篇/页 "
TempStr = TempStr & "[NextPage]" '加上分页符
Next
GetLastArticleList = "":Application(Cstr(KSCMS.SiteSN & "PageArticleList")) = TempStr
End If
ArticleRS.Close:Set ArticleRS = Nothing
Else
GetLastArticleList = "":Application(Cstr(KSCMS.SiteSN & "PageArticleList")) = ""
End If
End Function
试试,速度有没有加快了