"
sql="select top "&cs_tnum&" id,topic,pic from news where hidden=1 and ispic=1 order by id desc"...,Bullcn'Blog - 分享、交流、进步。" /> [转帖]滚动图片新闻 - Bullcn'Blog

[转帖]滚动图片新闻


sub main_center_newspic(cs_tnum,cs_cnum,row_num)
dim tmp1,tmp_topic,tmp_url,tmp2,i,col_num
col_num=round(cs_tnum/row_num)
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&cs_tnum&" id,topic,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
i=1
do while not rs.eof
tmp_topic=rs(1)
tmp_url="news_view.asp?id="&rs(0)
tmp1=tmp1&vbcrlf&"<td>" & _
vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td align=center>"&pic_fk(rs("pic"),1,tmp_url)&"</td></tr>" & _
vbcrlf&" <tr><td align=center height="&dim_num(6)&"><a href='"&tmp_url&"' target=_blank>"&joekoe_cms.code_html(tmp_topic,1,7)&"</a></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td>"
rs.movenext
if i mod col_num =0 then tmp1=tmp1&"</tr><tr>"
i=i+1
loop
  rs.close
tmp1=tmp1&vbcrlf&"</tr>"
  tmp1="<table border=0 cellspacing=0 cellpadding=2 width='100%'>"&tmp1&vbcrlf&"</table>"
  response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _
  vbcrlf&"<tr><td class=td0> "&img_skin("m_help")&" <a href='news.asp'><font color=white>图片新闻</font></a></td></tr>" & _
vbcrlf&"<tr class=bg_td><td align=center><marquee scrollamount=7 direction=left width='100%' onMouseOver=this.stop() onMouseOut=this.start()>"&tmp1&"</marquee></td></tr>" & _
vbcrlf&"</table>"&ukong
end sub

调用:call main_center_newspic(10,12,1)

文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 6 | 引用: 0 | 查看次数: 549
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭