调用精采推荐中的FLASH.
作者:cmscn 日期:2005-04-11
在首页中适当的位置插入:
sub main_center_pic(cs_tnum,cs_cnum)
dim tmp1,tmp_topic,tmp_url
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&cs_tnum&" id,name,spic from gallery where hidden=1 and types='flash' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
tmp_topic=rs(1)
tmp_url="gallery_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("spic"),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,cs_cnum)&"</a></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td>"
rs.movenext
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><a href='gallery.asp?types=flash'><font color=white> 最新flash</font></a></td></tr>" & _
vbcrlf&"<tr class=bg_td><td align=center><div id=demo style=overflow:hidden;width:550>"& _
vbcrlf&"<table align=left cellpadding=4 cellspace=0 border=0><tr>"& _
vbcrlf&"<td id=demo1 valign=top>"&tmp1&" </td>"& _
vbcrlf&"<td id=demo2 valign=top></td></tr></table>"& _
vbcrlf&"</div>"& _
vbcrlf&"</td></tr>" & _
vbcrlf&"<script>"& _
vbcrlf&"var speed=30" & _
vbcrlf&"demo2.innerHTML=demo1.innerHTML" & _
vbcrlf&"function Marquee(){" & _
vbcrlf&"if(demo2.offsetWidth-demo.scrollLeft<=0)" & _
vbcrlf&"demo.scrollLeft-=demo1.offsetWidth" & _
vbcrlf&"else{" & _
vbcrlf&"demo.scrollLeft++" & _
vbcrlf&"}" & _
vbcrlf&"}" & _
vbcrlf&"var MyMar=setInterval(Marquee,speed)" & _
vbcrlf&"demo.onmouseover=function() {clearInterval(MyMar)}" & _
vbcrlf&"demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}" & _
vbcrlf&" </script> "& _
vbcrlf&"</table>"&ukong
end sub
再调用call main_center_pic(8,12)
在index2.asp中最后添加:
sub main_center_flash(cs_tnum,cs_cnum)
dim tmp1,tmp_topic,tmp_url
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&cs_tnum&" id,name,spic from gallery where hidden=1 and types='flash' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
tmp_topic=rs(1)
tmp_url="gallery_view.asp?id="&rs(0)
tmp1=tmp1&vbcrlf&"<td>" & _
vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td align=center height="&dim_num(6)&"><a href='"&tmp_url&"' target=_blank>"&joekoe_cms.code_html(tmp_topic,1,cs_cnum)&"</a></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td>"
rs.movenext
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> 精彩FLASH</td></tr>" & _
vbcrlf&"<tr class=bg_td><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"&ukong
end sub
case "gallery"
tmp_title="精彩动漫"
tmp_tit="动漫标题"
tmp_count="浏览次数"
tmp_img="gallery"
tmp_table="gallery"
tmp_record="id,name,username,tim,counter,c_id"
tmp_where="c_id>0 and types='flash'"
if cl_classid>0 then tmp_where="c_id="&cl_classid
首页调用
call main_center_list("gallery",10,24,0)
评论: 5 | 引用: 0 | 查看次数: 624
发表评论