opNum, ByVal strLen, ByVal showclass, _
ByVal showdate, ByVal DateMode, ByVal newindow, ByVal styles)
Dim Rs, SQL, i, strContent, foundstr,j
Dim strTitle, ChildStr, ListStyle
Dim HtmlFileName, BestCode, BestString,ChannelPath
Dim ClassName, HtmlFileUrl, addTime, LinkTarget, FlashTopic
ChannelID = Newasp.ChkNumeric(ChannelID)
ClassID = Newasp.ChkNumeric(ClassID)
SpecialID = Newasp.ChkNumeric(SpecialID)
stype = Newasp.ChkNumeric(stype)
On Error Resume Next
Newasp.LoadChannel(ChannelID)
If CInt(stype) >= 3 And CLng(ClassID) <> 0 Then
SQL = "SELECT ChildStr FROM [NC_Classify] WHERE ChannelID=" & ChannelID & " And ClassID = " & ClassID
Set Rs = Newasp.Execute(SQL)
If Rs.BOF And Rs.EOF Then
Set Rs = Nothing
LoadFlashList = ""
Exit Function
Else
ChildStr = Rs("ChildStr")
End If
Rs.Close
Else
ChildStr = 0
End If
Select Case CInt(stype)
Case 0: foundstr = "Order By A.addTime Desc ,A.flashid Desc"
Case 1: foundstr = "And A.isBest > 0 Order By A.addTime Desc ,A.flashid Desc"
Case 2: foundstr = "Order By A.AllHits Desc ,A.flashid Desc"
Case 3: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.addTime Desc ,A.flashid Desc"
Case 4: foundstr = "And A.ClassID in (" & ChildStr & ") And A.isBest > 0 Order By A.addTime Desc ,A.flashid Desc"
Case 5: foundstr = "And A.ClassID in (" & ChildStr & ") Order By A.AllHits Desc ,A.flashid Desc"
Case Else
foundstr = "Order By A.addTime Desc ,A.flashid Desc"
End Select
If CInt(stype) >= 3 And CLng(ClassID) = 0 Then
foundstr = "Order By A.addTime Desc ,A.flashid Desc"
End If
If CLng(SpecialID) <> 0 Then
foundstr = "And A.SpecialID =" & CLng(SpecialID) & " " & foundstr
End If
SQL = " A.flashid,A.ClassID,A.ColorMode,A.FontMode,A.title,A.Author,A.AllHits,A.addTime,A.HtmlFileDate,A.isBest,"
SQL = "SELECT TOP " & CInt(TopNum) & SQL & " C.ClassName,C.ColorModes,C.FontModes,C.HtmlFileDir,C.UseHtml FROM [NC_FlashList] 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)
j = 0
If Rs.BOF And Rs.EOF Then
strContent = "没有添加任何信息!"
Else
SQL=Rs.GetRows(-1)
strContent = "<table width=""100%"" border=0 cellpadding=2 cellspacing=0>"
For i=0 To Ubound(SQL,2)
If (j Mod 2) = 0 Then
ListStyle = Trim(styles) & 1
Else
ListStyle = Trim(styles) & 2
End If
If CInt(SQL(9,i)) <> 0 Then