新闻栏目图片调用
作者:cmscn 日期:2007-04-19
sub main_news_pic(cs_sid)
dim tmp1,tmp_topic,tmp_url
tmp1=vbcrlf&"<tr align=center>"
sql="select top 1 id,topic,pic from news where hidden=1 and ispic=1 and s_id="&cs_sid&" order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
tmp_topic=rs(1)
tmp_url="/news/news_view.asp?id="&rs(0)
tmp1=tmp1&vbcrlf&"<td align=center>" & _
vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td align=center>"&pic_fk(rs("pic"),1,tmp_url)&"</td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td></tr>"
rs.movenext
loop
rs.close
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
评论: 6 | 引用: 0 | 查看次数: 728
发表评论