<!-- #include file="include/con_music.asp" -->
<!-- #include file="include/con_music_other.asp" -->
<!-- #include file="include/jk_emoney.asp" -->
<%
dim session_view,lis_true,l_power,l_emoney,emsg,p_id
tit="试听歌曲"
id=trim(request.querystring("id"))

call web_head(0,0,0,0,0)
if instr(id,",")>0 then
  i=0
  id=replace(id," ","") 
  if not(isnumeric(id)) then call music_error(" 请先选择歌曲！")
  sql = "select * from music_song where id in ("&id&")"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    i=i+1
    l_power=rs("power")
    l_emoney=rs("emoney")
    lis_true=emoney_notes(l_power,l_emoney,n_sort,rs("id"),0,"")
    if not lis_true then emsg=emsg&i&"、"&rs("name")&" (需要"&l_emoney&"金币)\n\n"
    rs.movenext
  loop
  rs.close
else
  sql = "select power,emoney,name from music_song WHERE id="&id
  set rs=joekoe_cms.exec(sql,1)
  l_power=rs(0)
  l_emoney=rs(1)
  lis_true=emoney_notes(l_power,l_emoney,n_sort,id,0,"")
  if not lis_true then emsg=emsg&rs("name")&" (需要"&l_emoney&"金币)\n\n"
  rs.close
end if

if emsg<>"" and not music_se.music_free then 
  response.clear
  call music_error("歌曲试听出错：\n\n您没有足够的权限或钱币进行刚才的操作！\n\n具体出错提示：\n\n"&emsg&"")
end if

session_view="jk"&joekoe_cms.rand_num(8)
session(joekoe_cms.web_cookies&"_music")=session_view
response.clear

%>
<SCRIPT language=javascript>
<!--
var state=0
window.resizeTo(161,544);
window.moveTo((screen.width5)/2, (screen.height5)/2);
//-->
</SCRIPT>
<html>
<NOSCRIPT><IFRAME src="index.asp"></IFRAME></NOSCRIPT>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>音乐试听</title>
</head>
<BODY scroll=no style="MARGIN: 0px" oncontextmenu="return false">
<INPUT type=hidden id=session_view value='<%response.write session_view%>'>
<IFRAME frameBorder=0 name=window_left scrolling="NO" src=music_play.asp?id=<%response.write id%>&session_view=<%response.write session_view%>  style="HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:2"></IFRAME>
</body></html>

<%
call web_end(0,1)
%>