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

文章列表类别

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
st(9), ArrayList(10), ArrayList(11), ArrayList(12), ArrayList(13), ArrayList(14), ArrayList(15), ArrayList(16), ArrayList(17)))
Next
End If
ReadSoftPicAndText = strTemp
End Function
''================================================
''函数名:LoadGuestList
''作 用:装载留言列表
''参 数:maxnum ----最多留言数
'' maxlen ----字符长度
'' newindow ----是否新窗口打开 1=是,0=否
'' showdate ----是否显示时间 1=是,0=否
'' DateMode ----时间模式
'' styles ----风格名称
''================================================
Public Function LoadGuestList(ByVal maxnum, ByVal maxlen, ByVal newindow, _
ByVal showdate, ByVal DateMode, ByVal styles)

Dim Rs, SQL, strContent
Dim i, ListStyle, GuestTopic, LinkTarget
Dim WriteTime, lastime, GuestTitle,strChannelDir

On Error Resume Next
Set Rs = Newasp.Execute("SELECT TOP " & CInt(maxnum) & " guestid,Topicformat,title,username,WriteTime,lastime,ReplyNum FROM NC_GuestBook WHERE isAccept>0 ORDER BY isTop DESC,lastime DESC,guestid DESC")
If Rs.BOF And Rs.EOF Then
LoadGuestList = "没有任何留言!"
Set Rs = Nothing
Exit Function
Else
i = 0
strContent = "<table width=""100%"" border=0 cellpadding=2 cellspacing=0>"
strChannelDir = Newasp.GetChannelDir(4)
Do While Not Rs.EOF
If (i Mod 2) = 0 Then
ListStyle = Trim(styles) & 1
Else
ListStyle = Trim(styles) & 2
End If
If CInt(newindow) <> 0 Then
LinkTarget = " target=""_blank"""
Else
LinkTarget = ""
End If
If CInt(showdate) <> 0 Then
WriteTime = Newasp.ShowDateTime(Rs("WriteTime"), CInt(DateMode))
lastime = Newasp.ShowDateTime(Rs("lastime"), CInt(DateMode))
Else
WriteTime = ""
lastime = ""
End If
GuestTitle = Newasp.HTMLEncode(Rs("title"))
GuestTopic = "<span " & Rs("Topicformat") & ">" & Newasp.GotTopic(GuestTitle, CInt(maxlen)) & "</span>"
GuestTopic = "<a href=""" & strChannelDir & "showreply.asp?guestid=" & Rs("guestid") & """ title=""主题:" & GuestTitle & " 时间:" & Rs("WriteTime") & " 作者:" & Newasp.HTMLEncode(Rs("username")) & """" & LinkTarget & ">" & GuestTopic & "</a>"
strContent = strContent & Newasp.MainSetting(16)
strContent = Replace(strContent, "{$GuestID}", Rs("guestid"))
strContent = Replace(strContent, "{$UserName}", Newasp.HTMLEncode(Rs("username")))
strContent = Replace(strContent, "{$GuestTopic}", GuestTopic)
strContent
  • 上一篇资讯: newasp中main类
  • 下一篇资讯: [ASP]精华代码
  • 网学推荐

    免费论文

    原创论文

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