这是CVB论坛显不最新帖子的代码.
哪位高手能做一下修改.
把它改成只显示帖子主题的前10个字附.
<%=Forumname%>
<%
dim sql
dim rs
dim flag
dim ostr
recordnum=request.querystring("recordnum")
if recordnum="" then
recordnum=10
end if
browsetype=request.querystring("browsetype")
if browsetype="" then
browsetype=1'说明开新窗口浏览
end if
timeview=request.querystring("timeview")
if timeview="" then
timeview=1
end if
if browsetype=1 then
flag="target='_blank'"
elseif browsetype=0 then
flag="target='_top'"
end if
ntypeid=request.querystring("ntypeid")
if ntypeid="" then
ntypeid=0
end if
if ntypeid=0 then
sql="select top " & recordnum & " * from article order by lastposttime desc"
else
sql="select top " & recordnum & " * from article where ntypeid=" & ntypeid & " order by lastposttime desc"
end if
%>
<% set rs=conn.execute(sql) if rs.eof and rs.bof then response.write " |
该讨论区还暂时没有文章 |
"
else
do while not rs.eof
if timeview=1 then
response.write ">> " & rs("title") & " " & rs("lastposttime") & " |
"
elseif timeview=0 then
response.write ">> " & rs("title") & " |
"
end if
rs.movenext
loop
end if
rs.close
set conn=nothing
%>