主题:动网论坛的程序谁熟悉帮忙看看怎么搞
想搞个本周热贴排行和今日热贴排行,怎么搞
下面这段是热门主题,按点击率排的,但按照今日和本周,我就不会了,请高手帮看看,谢谢
<%
HotTopic2()
sub HotTopic2()
dim rs,sql,i,n,myboard,ds,tempstr
i=0
n=10 '社区热门话题调用个数
sql="select top "&n&" a.topicid,a.title,a.boardid,a.postusername,a.lastpost,a.lastposttime,a.dateandtime,b.boardtype from dv_topic a,dv_board b where a.boardid<>444 and b.boardid=a.boardid order by Hits desc"
set rs=Dvbbs.Execute(sql)
If Not RS.Eof then
SQL=Rs.GetRows(-1)
else
response.write "目前没有新贴"
exit sub
end if
rs.close:set rs=nothing
For i=0 To Ubound(SQL,2)
response.write "<table cellSpacing=0 cellPadding=5 border=0 width=335>"
response.write "<tr><td width=75% align=left><FONT class=f7>●</FONT> <a href=dispbbs.asp?boardid="&sql(2,i)&"&id="&sql(0,i)&" title=标题:"&left(sql(1,i),30)&" 作者:"&left(sql(3,i),16)&" 时间:"&left(sql(5,i),16)&" target=""_blank"">"
response.write ""&left(sql(1,i),20)&"</a></td><td width=25% align=right>"&left(sql(6,i),10)&"</td></tr></TABLE>"
next
end sub
%>
下面这段是热门主题,按点击率排的,但按照今日和本周,我就不会了,请高手帮看看,谢谢
<%
HotTopic2()
sub HotTopic2()
dim rs,sql,i,n,myboard,ds,tempstr
i=0
n=10 '社区热门话题调用个数
sql="select top "&n&" a.topicid,a.title,a.boardid,a.postusername,a.lastpost,a.lastposttime,a.dateandtime,b.boardtype from dv_topic a,dv_board b where a.boardid<>444 and b.boardid=a.boardid order by Hits desc"
set rs=Dvbbs.Execute(sql)
If Not RS.Eof then
SQL=Rs.GetRows(-1)
else
response.write "目前没有新贴"
exit sub
end if
rs.close:set rs=nothing
For i=0 To Ubound(SQL,2)
response.write "<table cellSpacing=0 cellPadding=5 border=0 width=335>"
response.write "<tr><td width=75% align=left><FONT class=f7>●</FONT> <a href=dispbbs.asp?boardid="&sql(2,i)&"&id="&sql(0,i)&" title=标题:"&left(sql(1,i),30)&" 作者:"&left(sql(3,i),16)&" 时间:"&left(sql(5,i),16)&" target=""_blank"">"
response.write ""&left(sql(1,i),20)&"</a></td><td width=25% align=right>"&left(sql(6,i),10)&"</td></tr></TABLE>"
next
end sub
%>