ticleid DESC"
Case 1: foundstr = "And A.isBest > 0 ORDER BY A.Writetime DESC ,A.Articleid DESC"
Case 2: foundstr = " ORDER BY A.AllHits DESC ,A.Articleid DESC"
Case 3: foundstr = "And A.ClassID in (" & ChildStr & ") ORDER BY A.Writetime DESC ,A.Articleid DESC"
Case 4: foundstr = "And A.ClassID in (" & ChildStr & ") And A.isBest > 0 ORDER BY A.Writetime DESC ,A.Articleid DESC"
Case 5: foundstr = "And A.ClassID in (" & ChildStr & ") And A.AllHits > B.LeastHotHist ORDER BY A.AllHits DESC ,A.Articleid DESC"
Case 6: foundstr = "And A.ClassID in (" & ChildStr & ") ORDER BY A.Writetime DESC ,A.Articleid DESC"
Case Else
foundstr = "ORDER BY A.Writetime DESC ,A.Articleid DESC"
End Select
If CInt(stype) >= 3 And CLng(ClassID) = 0 Then
foundstr = "ORDER BY A.Writetime DESC ,A.Articleid DESC"
End If
If CLng(specid) <> 0 Then
foundstr = "And A.SpecialID =" & CLng(specid) & " " & foundstr
End If
SQL = " A.ArticleID,A.ClassID,A.ColorMode,A.FontMode,A.title,A.BriefTopic,A.AllHits,A.WriteTime,A.HtmlFileDate,A.isBest,"
SQL = "SELECT TOP " & CInt(maxline) & SQL & " C.ClassName,C.ColorModes,C.FontModes,C.HtmlFileDir FROM [NC_Article] A INNER JOIN [NC_Classify] C ON A.ClassID=C.ClassID WHERE A.isAccept>0 And A.ChannelID=" & chanid & " " & foundstr & ""
Set Rs = Newasp.Execute(SQL)
i = 0
strContent = ""
If Rs.BOF And Rs.EOF Then
strContent = "还没有添加任何内容!"
Else
Do While Not Rs.EOF
NewsTitle = Newasp.ReadTopic(Rs("title"), CInt(maxlen))
NewsTitle = Newasp.ReadFontMode(NewsTitle, Rs("ColorMode"), Rs("FontMode"))
PicTopic = Newasp.ReadPicTopic(Rs("BriefTopic"))
ClassName = Newasp.ReadFontMode(Rs("ClassName"), Rs("ColorModes"), Rs("FontModes"))
HtmlFileName = Newasp.ReadFileName(Rs("HtmlFileDate"), Rs("ArticleID"), Newasp.ChannelHtmlExt, Newasp.ChannelPrefix, Newasp.ChannelHtmlForm, "")
If CInt(Newasp.ChannelUseHtml) <> 0 Then
HtmlFileUrl = Newasp.ChannelPath & Rs("HtmlFileDir") & Newasp.ShowDatePath(Rs("HtmlFileDate"), Newasp.ChannelHtmlPath) & HtmlFileName
ClassName = "[<a href=''" & Newasp.ChannelPath & Rs("HtmlFileDir") & "index" & Newasp.ChannelHtmlExt & "''>" & ClassName & "</a>]"
Else
HtmlFileUrl = Newasp.ChannelPath & "show.asp?id=" & Rs("ArticleID")
ClassName = "[<a href=''" & Newasp.ChannelPath & "list.asp?classid=" & Rs("ClassID") & "''>" & ClassName & "</a>]"
End If
If CInt(showclass) = 1 Then
ClassName = ClassName
Else
ClassName = ""
End If
If CInt(showdate) = 1 T