当前位置: 网学 > 编程文档 > ASP > 正文

文章列表类别

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
nt(") > 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
End If
Rs.MoveNext
Loop
End If
  • 上一篇资讯: newasp中main类
  • 下一篇资讯: [ASP]精华代码
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号