<% '========================================================= ' 调用标题代码 'Loading... ' '--------------------------------------------------------- ' 调用内容代码 'Loading... ' '--------------------------------------------------------- ' id: 定义识别代码[其中“yuzi”可自定义,如一个页面多个调用请各自更改不同的代码,共2处需要修改] ' forumid: 指定论坛的ID ' TopicCount: 显示多少条主题 ' Count: 标题 长度 ' showtime: 1=显示时间 0=不显示时间 ' showcontent:1=显示内容 0=不显示内容 ' icon: 标题前的符号 '========================================================= forumid=int(Request("forumid")) if Request("TopicCount")=empty then TopicCount=10 else TopicCount=int(Request("TopicCount")) end if if Request("Count")=empty then Count=100 else Count=int(Request("Count")) end if cluburl=Conn.Execute("Select cluburl From clubconfig")(0) if forumid <> empty then sqlforumid=" and forumid="&forumid&"" sql="select top "&TopicCount&" * from forum where deltopic=0 "&sqlforumid&" order by id desc" Set Rs=Conn.Execute(sql) do while Not RS.Eof if Request("showcontent")=1 then content=ReplaceText(rs("content"),"<[^>]*>","") if len(content)>200 then content=left(""&content&"",200)&"..." list=list&"
"&Request("icon")&" "&rs("Topic")&"

"&content&"
"&rs("username")&" 发表于 "&rs("posttime")&" - "&rs("replies")&" 个评论

" else topic=ReplaceText(rs("topic"),"<[^>]*>","") if Request("showtime")=1 then showtime=" ["&rs("lasttime")&"]" list=list&""&Request("icon")&" "&left(topic,Count)&""&showtime&"
" end if RS.MoveNext Loop set rs=nothing conn.close set conn=nothing ''''''''''替换模块START'''''''''''' Function ReplaceText(fString,patrn,replStr) Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = patrn ' 设置模式。 regEx.IgnoreCase = True ' 设置是否区分大小写。 regEx.Global = True ' 设置全局可用性。 ReplaceText = regEx.Replace(fString, replStr) ' 作替换。 Set reg=nothing End Function ''''''''''替换模块END'''''''''''' %> <%=Request("id")%>.innerHTML='<%=list%>'

虎翼网门户通主机大赠送