动画
图片列表
''参 数:ClassID ----分类ID
'' ChannelID ----频道ID
'' sType ----调用动画类型,0=所有最新动画,1=推荐动画,2=热门动画
'' TopNum ----显示动画列表数
'' strlen ----显示标题长度
'' newindow ----新窗口打开
''================================================
Public Function LoadFlashPic(ByVal ChannelID, ByVal ClassID, ByVal SpecialID, _
ByVal stype, ByVal TopNum, ByVal PerRowNum, ByVal strLen, ByVal newindow, _
ByVal width, ByVal height, ByVal showtopic)
Dim Rs, SQL, i, strContent, foundstr
Dim strtitle, ChildStr, miniature, HtmlFileName
Dim HtmlFileUrl, addTime, LinkTarget
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
LoadFlashPic = ""
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.title,A.AllHits,A.addTime,A.HtmlFileDate,A.isBest,A.miniature,"
SQL = "SELECT TOP " & CInt(TopNum) & SQL & " C.ClassName,C.HtmlFileDir,C.UseHtml FROM [NC_FlashList] A INNER JOIN [NC_Classify] C On A.ClassID=C.ClassID WHERE A.isAccept>0 And A.miniature<>'''' And A.ChannelID=" & ChannelID & " " & foundstr & ""
Set Rs = Newasp.Execute(SQL)
If Rs.BOF And Rs.EOF Then
strContent = "<img src=''" & Newasp.InstallDir & "images/no_pic.gif'' width=" & width & "