strFileName = Replace(strFileName, " ", "")
ClassFileName = CStr(strFileName)
End Function
''================================================
''函数名:SpecialFileName
''作 用:读取专题HTML文件名
''参 数:specid ----专题ID
''================================================
Public Function SpecialFileName(ByVal specid, ByVal ExtName, ByVal n)
Dim strFileName, strExtName, strSpecialID
If Trim(ExtName) = "" Then ExtName = ".html"
If Not IsNumeric(n) Then n = 0
If Left(ExtName, 1) <> "." Then
strExtName = "." & Trim(ExtName)
Else
strExtName = Trim(ExtName)
End If
If CInt(n) <= 1 Then
strFileName = "index" & strExtName
Else
strSpecialID = Supplemental(specid, 3)
strFileName = "Special" & strSpecialID & "_" & n & strExtName
End If
strFileName = Replace(strFileName, " ", "")
SpecialFileName = CStr(strFileName)
End Function
''================================================
''函数名:ChannelMenu
''作 用:显示频道菜单
''================================================
Public Function ChannelMenu()
Dim SQL, Rs, i, TotalNumber,strTop
Dim strContent, LinkTarget, ChannelName
Dim ChannelUrl, HtmlContent, sCaption
Name = "ChannelMenu"
If ObjIsEmpty() Then
If ChkNumeric(Main_Setting(7)) = 0 Then
strTop = vbNullString
Else
strTop = "TOP " & CInt(Main_Setting(7))
End If
SQL = "SELECT " & strTop & " ChannelID,orders,ColorModes,FontModes,ChannelName,Caption,ChannelDir,StopChannel,IsHidden,BindDomain,DomainName,LinkTarget,ChannelType,ChannelUrl,IsHidden FROM [NC_Channel] WHERE IsHidden = 0 Order By orders"
Set Rs = Execute(SQL)
If Rs.BOF And Rs.EOF Then
strContent = ""
Else
i = 0
TotalNumber = Rs.RecordCount
Do While Not Rs.EOF
i = i + 1
If Rs("LinkTarget") <> 0 Then
LinkTarget = " target=""_blank"""
Else
LinkTarget = ""
End If
HtmlContent = HtmlContent & Main_Setting(9)
ChannelName = ReadFontMode(Rs("ChannelName"), Rs("ColorModes"), Rs("FontModes"))
If Rs("ChannelType") < 2 Then
ChannelUrl = InstallDir & Rs("ChannelDir")
Else
ChannelUrl = Rs("ChannelUrl")
End If
If Rs("StopChannel") <> 0 Then
sCaption = "此频道暂时关闭,不能访问!"
Else
sCaption = Rs("Caption")
End If
strContent = "<a href=""" & ChannelUrl & """" & LinkTarget & " title=""" & sCaption & """ class=navmenu>" & ChannelName &