随缘音乐代码
作者:cmscn 日期:2005-04-11
sub music_fpic(t_num,nft,w_num)
dim sk_bar,sk_class,temp1,title,tim,pic,counter,ooid
sk_bar=11:sk_class="end"
temp1=vbcrlf&"<table border=0 cellspacing=0 cellpadding=2 width='100%'>" & _
vbcrlf&"<tr><td width='50%'></td><td width='50%'></td></tr>"
sql="select top 1 id,pic,name,sizes,yuyan,counter from music where hidden=1 and types=5 order by id desc"
set rs=conn.execute(sql)
if not(rs.eof) then
ooid=rs("id")
if nft=1 then oid=ooid
counter=rs("counter")
pic=pic&vbcrlf&"<tr><td width='35%' class=bw><table width=84 height=64 border=0 cellpadding=0 cellspacing=0><tr><td colspan=2 rowspan=2><a href='music_view.asp?id="&rs("id")&"'"&atb&"><img src='upload/"&rs("pic")&"' border=0 width=80 height=60></a></td></table>"& _
vbcrlf&"<td width='65%' align=right><table border=0 width='100%'>"& _
vbcrlf&"<tr><td><a href='music_view.asp?id="&rs("id")&"'"&atb&">"&rs("name")&"</a></td></tr>"& _
vbcrlf&"<tr><td>歌手:<font class=blue><b>"&rs("sizes")&"</b></font></td></tr>"& _
vbcrlf&"<tr><td>语言:"&rs("yuyan")&" 人气:<font class=red>"&counter&"</font></td></tr>"& _
vbcrlf&"</table>"
end if
rs.close
sql="select top "&t_num&" * from music order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
for i=1 to 2
if rs.eof or rs.bof then exit for
title=rs("name")
temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&"><img border=0 src='images/small/jt23.gif' align=absmiddle><a href='music_view.asp?id="&rs("id")&"'"&atb&" title='专辑名称:"&code_html(title,1,0)&"'>"&code_html(title,1,w_num)&"</a></td>"
rs.movenext
next
temp1=temp1&"</tr>"
loop
rs.close:set rs=nothing
temp1="<td>"&pic&"</td></tr>" & _
"<tr>"&temp1&"</td>"
response.write kong&format_bar("<img src='images/main/music.gif' border=0>",temp1,0,0,0,"||","")
end sub
main.asp 中为 call music_main(6,0,8)
评论: 7 | 引用: 8 | 查看次数: 641
发表评论