End Function
‘================================================
‘函数名:ReadFlashList
‘作 用:读取动画列表
‘参 数:str —-原字符串
‘================================================
Public Function ReadFlashList(ByVal str)
Dim strTemp, i
Dim sTempContent, nTempContent
Dim arrTempContent, arrTempContents, ArrayList
On Error Resume Next
strTemp = str
If InStr(strTemp, “{$ReadFlashList(“) > 0 Then
sTempContent = Newasp.CutMatchContent(strTemp, “{$ReadFlashList(“, “)}”, 1)
nTempContent = Newasp.CutMatchContent(strTemp, “{$ReadFlashList(“, “)}”, 0)
arrTempContents = Split(sTempContent, “|||”)
arrTempContent = Split(nTempContent, “|||”)
For i = 0 To UBound(arrTempContents)
ArrayList = Split(arrTempContent(i), “,”)
strTemp = Replace(strTemp, arrTempContents(i), LoadFlashList(ArrayList(0), ArrayList(1), ArrayList(2), ArrayList(3), ArrayList(4), ArrayList(5), ArrayList(6), ArrayList(7), ArrayList(8), ArrayList(9), ArrayList(10)))
Next
End If
ReadFlashList = strTemp
End Function
‘================================================
‘函数名:LoadAnnounceContent
‘作 用:装载内容公告
‘参 数:str —-原字符串
‘================================================
Public Function LoadAnnounceContent(ByVal sTopic, ByVal ChannelID)
Dim SQL, Rs, strTemp
strTemp = “”
sTopic = Newasp.CheckStr(sTopic)
If sTopic <> “” And sTopic <> “0” Then
SQL = “Select AnnounceID,Content,PostTime,writer From NC_Announce where AnnounceType=1 And title = ‘” & sTopic & “‘ Order By PostTime Desc,AnnounceID Desc”
Else
SQL = “Select AnnounceID,Content From NC_Announce where AnnounceType=1 And ChannelID in (” & ChannelID & “,999) Order By PostTime Desc,AnnounceID Desc”
End If
Set Rs = Newasp.Execute(SQL)
If Not (Rs.BOF And Rs.EOF) Then
strTemp = Rs(“Content”)
End If
Rs.Close: Set Rs = Nothing
LoadAnnounceContent = strTemp
End Function
‘================================================
‘函数名:ReadAnnounceContent
‘作 用:读取内容公告
‘参 数:str —-原字符串
‘================================================
Public Function ReadAnnounceContent(ByVal str, ByVal ChannelID)
Dim strTemp, i, sTempContent, nTempContent, strValue
Dim arrTempContent, arrTempContents
On Error Resume Next
strTemp = str
If InStr(strTemp, “{$AnnounceContent(“) > 0 Then
sTempContent = Newasp.CutMatchContent(strTemp, “{$AnnounceContent(“, “)}”, 1)
nTempContent = Newasp.CutMatchContent(strTemp, “{$AnnounceContent(“, “)}”, 0)
If nTempContent = “” Then nTempContent = “0”
arrTempContents = Split(sTempContent, “|||”)
arrTempContent = Split(nTempContent, “|||”)
For i = 0 To UBound(arrTempContents)
strValue = arrTempContent(i)
strTemp = Replace(strTemp, arrTempContents(i), LoadAnnounceContent(strValue, ChannelID))
Next
End If
ReadAnnounceContent = strTemp
End Function
‘================================================
‘函数名:LoadAnnounceList
‘作 用:装载公告列表
‘参 数:maxnum —-最多公告数
‘ maxlen —-字符长度
‘ newindow —-是否新窗口打开 1=是,0=否
‘ showdate —-是否显示时间 1=是,0=否
‘ DateMode —-时间模式
‘ showtree —-树型显示
‘================================================
Public Function LoadAnnounceList(ByVal ChannelID, ByVal maxnum, ByVal maxlen, _
ByVal newindow, ByVal showdate, ByVal DateMode, ByVal showtree)
Dim Rs, SQL, strContent
Dim AnnounceTopic, LinkTarget
Dim PostTime
ChannelID = Newasp.ChkNumeric(ChannelID)
maxnum = Newasp.ChkNumeric(maxnum)
If maxnum = 0 Then maxnum = 10
On Error Resume Next
Set Rs = Newasp.Execute(“SELECT TOP ” & CInt(maxnum) & ” AnnounceID,title,Content,PostTime,writer,hits FROM NC_Announce WHERE (ChannelID=” & ChannelID & ” Or ChannelID=999) And AnnounceType<>1 ORDER BY PostTime DESC,AnnounceID DESC”)
If Rs.BOF And Rs.EOF Then
LoadAnnounceList = “”
Set Rs = Nothing
Exit Function
Else
Do While Not Rs.EOF
If CInt(newindow) <> 0 Then
LinkTarget = ” target=””_blank”””
Else
LinkTarget = “”
End If
If CInt(showdate) <> 0 Then
PostTime = Newasp.ShowDateTime(Rs(“PostTime”), CInt(DateMode))
Else
PostTime = “”
End If
AnnounceTopic = Newasp.GotTopic(Rs(“title”), CInt(maxlen))
AnnounceTopic = “<a href=””” & Newasp.InstallDir & “Announce.Asp?AnnounceID=” & Rs(“AnnounceID”) & “”” title=””” & Rs(“title”) & “””” & LinkTarget & “>” & AnnounceTopic & “</a>”
If CInt(showtree) = 1 Then
strContent = strContent & “<div>· ” & AnnounceTopic & “</div><div align=””right”” class=””dottedline””>” & PostTime & “</div>” & vbNewLine
Else
strContent = strContent & “· ” & AnnounceTopic & ” ” & PostTime & vbNewLine