仿乔客首页的音乐及电影调用
作者:cmscn 日期:2005-04-23
音乐
sub main_center_music_hits()
dim topic,word,tmp1,hits,nid
sql="select top 6 * from mv_musiclist order by hits desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
nid=rs("id")
topic=rs("MusicName")
hits=rs("hits")
tmp1=tmp1&vbcrlf&"<tr><td height="&dim_num(6)&"><img src=images/music/small_wma_s.gif border=0> <a href=javascript:play('"&nid&"')>"&joekoe_cms.code_html(topic,1,8)&"</a></td><script language=javascript src='images/music/music.js'></script><td align=right class=tims>"&hits&"</td></tr>"
rs.movenext
loop
rs.close
tmp1="<table border=0 cellspacing=0 cellpadding=4 width='100%'>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _
vbcrlf&"<tr><td class=td0> 流行音乐</td></tr>" & _
vbcrlf&"<tr class=bg_td><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"&ukong
end sub
%>
调用
call main_center_music_hits()
下载music.js
[file=attachments/month_200504/23_211841_rogumusic.rar]Click to Download[/file]
说明:打开music.js 后,看播放地址,就这一段的红色部分。秋月现在提供的1.2音乐插件包含该文件。
function play(id){
window.open(' music_play.asp?id='+id,'mv_home', 'scrollbars=no,resizable=no,width=400,height=200,menubar=no,top=168,left=168');
}
改为你音乐播放器的实际播放文件!我现在用的是秋月的1.0插件(1.2的可略过此步,注意上面红色数字部分,这是调整播放器大小的)
电影
sub main_center_video(vname,vgen,c_num,w_num)
dim osql,id,name,pnum
select case vgen
case "hot"
osql=" order by counter desc,id desc"
case "good"
osql=" and istop=1 order by id desc"
case else
osql=" order by id desc"
end select
pnum=100\c_num
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write vname%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr align=center>
<%
sql="select top "&c_num&" id,name,types,genre,lang,star,emoney,power,counter,star,remark,pic from video where hidden=1"&osql
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
name=rs("name")
%>
<td width='<%'response.write pnum%>%'>
<table border=0 cellspacing=1 cellpadding=4>
<tr><td align=center><%response.write pic_fk(rs("pic"),1,"video_view.asp?id="&id)%></td></tr>
<tr><td align=center><b><a href='video_view.asp?id=<%response.write id%>' target=_blank alt='<%response.write joekoe_cms.code_html(name,1,0)%>'><%response.write joekoe_cms.code_html(name,1,w_num)%></a></b></td></tr>
</table>
</td>
<%
rs.movenext
loop
rs.close
%>
</tr>
</table>
</td></tr>
</table>
<%
response.write ukong
end sub
调用
call main_center_video("免费电影","new",4,10)
评论: 8 | 引用: 0 | 查看次数: 712
发表评论