首页调用论坛图片
作者:cmscn 日期:2006-12-17
sub forum_pic(n)
dim tmp1,id,iid,pic,topic,fid,name,counter
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&n&" upload.id,upload.iid,bbs_topic.topic,bbs_topic.counter,bbs_topic.forum_id,bbs_topic.username,upload.url from upload INNER JOIN bbs_topic ON upload.iid = bbs_topic.id where nsort='forum' and genre='jpg' or genre='gif' or genre='bmp' order by upload.id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("iid")
pic=rs("url")
topic=rs("topic")
fid=rs("forum_id")
name=rs("username")
counter=rs("counter")
tmp1=tmp1&vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td>"&pic_fk(pic,4,"forum/forum_view.asp?forum_id="&fid&"&view_id="&id)&"</td>" & _
vbcrlf&" <td><a href='forum/forum_view.asp?forum_id="&fid&"&view_id="&id&"' target=_blank alt='标题:"&joekoe_cms.code_html(topic,1,0)&"<br>人气:"&counter&"<br>发 布 人:"&name&"'>"&joekoe_cms.code_html(topic,1,30)&"</a></td></td>" & _
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</tr>"
tmp1="<table border=0 cellspacing=0 cellpadding=0 width='100%'>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=0 cellpadding=0 class=table>" & _
vbcrlf&"<tr><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"
end sub
调用方法:<%call forum_pic(1)%>
评论: 6 | 引用: 0 | 查看次数: 689
发表评论