<!-- #include file="../../include/skin.asp" -->
<!-- #include file="../../include/jk_ubb.asp" -->
<!-- #include file="class.asp" -->
<%
dim id,c_id,s_id,n_id,types,thischar,sql_add,n_name,n_topic,n_topic2,n_pic
types=Request.QueryString ("types")
types=replace(types,"'","")
types=replace(types,"""","")
id=Request.QueryString ("id")
if not(isnumeric(id)) and instr(id,",")<0 then call music_error("")
c_id=Request.QueryString ("c_id")
if not(isnumeric(c_id)) then c_id=0
s_id=Request.QueryString ("s_id")
if not(isnumeric(s_id)) then s_id=0
n_id=Request.QueryString ("n_id")
if not(isnumeric(n_id)) then n_id=0
index_url="music":n_sort="music"
tit_fir=format_menu(index_url)


sub music_load()
 response.write joekoe_cms.js_put("../images/music/music.js",0)
 %>
 <style>
 <!--
  .mtb { width:570; }
  .mtable { width:570; border: 1px; background-color: #ededed; }
  .mtd { background-image: url('../images/music/bg_td.gif'); color: #333333; height: 20px; font-weight:bold; }
  .mbg_td { background-color:#ffffff; }
  .mbg_tds { background-color:#ededed; }
 -->
 </style>
 <%
end sub
'-----------------------------------播放工具------------------------------------
sub music_tool()
 response.write vbcrlf&music_tools()
end sub
'-----------------------------------收藏工具------------------------------------
sub music_fav()
 response.write vbcrlf&music_fav_csy() 
end sub
'----------------------------------点歌单工具------------------------------------
sub music_mail()
 response.write vbcrlf&music_mail_csy() 
end sub
'-----------------------------------搜索工具------------------------------------
sub music_sea()
 response.write vbcrlf&music_search() 
end sub
'------------------------------------导航条------------------------------------
sub music_head()
response.write vbcrlf&music_head_top()
sql="select * from  jk_class where nsort='msing' order by c_order,c_id"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
   response.write vbcrlf&"<td><a href='singer_list.asp?action=main&c_id="&rs("c_id")&"'>"
    if int(c_id)=rs("c_id") then     
      response.write vbcrlf&"<font class=red>"&rs("c_name")&"</font></a></td>"
    else
      response.write vbcrlf&""&rs("c_name")&"</a></td>"
    end if
    response.write vbcrlf&"<td width=10></td>"
  rs.movenext
  loop
  rs.close
  if c_id<>"" then
    sql="select * from jk_sort where c_id="&c_id
  else
    sql="select * from jk_sort where c_id=1"
  end if
    set rs=joekoe_cms.exec(sql,1)
    do while not rs.eof
      i=i+1
      response.write vbcrlf&"<td><a href='singer_list.asp?action=list&c_id="&rs("c_id")&"&s_id="&rs("s_id")&"'>"
      if int(s_id)=rs("s_id") then
        response.write vbcrlf&"<font class=red>"&rs("s_name")&"</font></td><td width=10></td>"
      else
        response.write vbcrlf&""&rs("s_name")&"</a></td><td width=10></td>"
      end if
    rs.movenext
    loop
    rs.close
response.write vbcrlf&music_head_end()
end sub
'-----------------------------------推荐歌曲------------------------------------
sub music_top(n_num,c_num)
  response.write vbcrlf&music_bar_top("left_song_good",0)
  n_name="歌曲"
  sql="select top "&n_num&" name,hits,id from music_song where hidden=1 order by id desc"
  set rs=joekoe_cms.exec(sql,1) 
  do while not rs.eof
    n_topic=rs("Name")
    n_topic=joekoe_cms.code_js(n_topic,1)
    response.write "<tr>" & _
             vbcrlf&"<td width=15><img src='../images/music/small_mp3_s.gif' border=0 align=absMiddle></td>" & _
             vbcrlf&"<td><a href='javascript:;' onclick=javascript:open_win('pass.asp?id="&rs("id")&"','play_win',310,253,'no'); alt='播放歌曲："&joekoe_cms.code_html(n_topic,1,0)&"'>"&joekoe_cms.code_html(n_topic,1,c_num)&"</a></td>" & _
             vbcrlf&"<td align=right class=tims>"&rs("hits")&"</td>" & _
             vbcrlf&"</tr>"
   rs.movenext   
   loop
  rs.close
  response.write vbcrlf&music_bar_end()
end sub
'-----------------------------------最新歌曲------------------------------------
sub music_new(n_num)
  i=0
  sql="select top "&n_num&" id,name,c_id,s_id,n_id,singer,hits from music_song where hidden=1 order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  response.write vbcrlf&music_list_top("center_song_main",1,"new")
  do while not rs.eof
  i=i+1
    n_topic=rs("name")
    n_topic=joekoe_cms.code_js(n_topic,1)
	response.write music_list(i,rs("id"),rs("c_id"),rs("s_id"),rs("n_id"),n_topic,rs("singer"),"list")
  rs.movenext
  loop
  rs.close 
  response.write vbcrlf&music_list_end()
end sub
'-----------------------------------推荐专辑------------------------------------
sub disk_top(n_num,c_num)
  response.write vbcrlf&music_bar_top("left_disk_good",0)
  n_name="专辑"
  sql="select top "&n_num&" name,hits,id from music_disk where hidden=1 order by hits desc"
  set rs=joekoe_cms.exec(sql,1) 
  do while not rs.eof
    n_topic=rs("name")
    n_topic=joekoe_cms.code_js(n_topic,1)
    response.write "<tr>" & _
             vbcrlf&"<td width=15><img src='../images/music/h_music_disk.gif' border=0 align=absMiddle></td>" & _
             vbcrlf&"<td><a href='javascript:;' onclick=javascript:open_view('disk_view.asp?id="&rs("id")&"',1); alt='浏览专辑："&joekoe_cms.code_html(n_topic,1,0)&"'>"&joekoe_cms.code_html(n_topic,1,c_num)&"</a></td>" & _
             vbcrlf&"<td align=right class=tims>"&rs("hits")&"</td>" & _
             vbcrlf&"</tr>"
    rs.movenext   
  loop
rs.close
  response.write vbcrlf&music_bar_end()
end sub
'-----------------------------------最新专辑------------------------------------
sub disk_new(n_num,c_num)
  dim li,tmp:li=0 
  sql="select top "&n_num&" * from music_disk where hidden=1 order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof 
  if (li mod 2)=0 then tmp=tmp&"<tr valign=top>"
    n_id=rs("id")
	n_pic=rs("pic")
    n_topic=rs("Name")
    n_topic=joekoe_cms.code_js(n_topic,1)
    n_topic2=rs("singer")
    n_topic2=joekoe_cms.code_js(n_topic2,1)
	tmp=tmp&"<td width='50%'>"&music_disk_list(n_pic,n_id,rs("c_id"),rs("s_id"),rs("n_id"),n_topic,n_topic2,rs("pcom"),rs("lang"),rs("ptim"))&"</td>"
     if (li mod 2)>0 then tmp=tmp&"</tr>"
   rs.movenext
  li=li+1
  loop
  rs.close
  tmp=tmp&"<td width='50%'></td></tr>"

  response.write music_bar_top("center_disk_main",1)
  response.write tmp
  response.write music_bar_end()
end sub
'-----------------------------------推荐歌手------------------------------------
sub singer_good()
  sql="select top 1 * from music_singer where hidden=1 and istop=1 order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  response.write vbcrlf&music_bar_top("center_singer_main",1)
  if not rs.eof then
    n_id=rs("id")
    c_id=rs("c_id")
    s_id=rs("s_id")
	n_pic=rs("pic")
    response.write "<tr align=center>" & _
             vbcrlf&"<td width='25%'>"&pic_fk(n_pic,1,"singer_view.asp?c_id="&c_id&"&s_id="&s_id&"&n_id="&n_id&"")&"</td>" & _
             vbcrlf&"<td width='75%'>" & _
             vbcrlf&"<table border=0 width='100%' class=tf>" & _
             vbcrlf&"<tr>" & _
             vbcrlf&"<td class=htd>歌手姓名："&rs("name")&"</td>" & _
             vbcrlf&"<tr>" & _
             vbcrlf&"<td class=htd>歌手简介："&joekoe_cms.code_html(rs("word"),1,180)&"&nbsp;&nbsp;<a href='singer_view.asp?c_id="&c_id&"&s_id="&s_id&"&n_id="&n_id&"' title='查看歌手 "&rs("name")&" 的更多信息'><font class=gray>[更多信息…]</font></a></td>" & _
             vbcrlf&"</tr>" & _
             vbcrlf&"</table>" & _
             vbcrlf&"</td>" & _
             vbcrlf&"</tr>"
  end if 
 rs.close
   response.write vbcrlf&music_bar_end()
end sub
%>