Case Else
foundstr = "Order By A.Writetime Desc ,A.Articleid Desc"
End Select
If CInt(stype) >= 4 And CLng(ClassID) = 0 Then
foundstr = "Order By A.Writetime Desc ,A.Articleid Desc"
End If
If CLng(SpecialID) <> 0 Then
foundstr = "And A.SpecialID =" & CLng(SpecialID) & " " & 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(TopNum) & SQL & " C.ClassName,C.ColorModes,C.FontModes,C.HtmlFileDir,C.UseHtml FROM [NC_Article] A INNER JOIn [NC_Classify] C ON A.ClassID=C.ClassID WHERE A.isAccept>0 And A.ChannelID=" & ChannelID & " " & foundstr & ""
Set Rs = Newasp.Execute(SQL)
i = 0
If Rs.BOF And Rs.EOF Then
strContent = "该分类还没有添加任何内容!"
Else
strContent = "<table width=""100%"" border=0 cellpadding=2 cellspacing=0>"
Do While Not Rs.EOF
If (i Mod 2) = 0 Then
ListStyle = Trim(styles) & 1
Else
ListStyle = Trim(styles) & 2
End If
If Rs("isBest") <> 0 Then
BestCode = 2
BestString = "<font color=''" & Newasp.MainSetting(3) & "''>推荐</font>"
Else
BestCode = 1
BestString = ""
End If
strContent = strContent & Newasp.MainSetting(13)
sTitle = Newasp.GotTopic(Rs("title"), CInt(strLen))
sTitle = Newasp.ReadFontMode(sTitle, Rs("ColorMode"), Rs("FontMode"))
sTopic = 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) = 0 Then ClassName = ""
If CInt(showpic) = 0 Then sTopic = ""
If CInt(showdate) <> 0 Then
WriteTime = Newasp.ShowDateTime(Rs("WriteTime"), CInt(DateMode))
Else