<!-- #include file="../include/Channel_Music.asp" -->
<!-- #include file="../include/Inc_Emoney.asp" -->
<!-- #Include File="Music_Class.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================
Dim PlayID,GetOption,session_view,Name,ddim,Web_Name
'PlayID=trim(request.querystring("id"))
PlayID=trim(request.querystring("sid"))
'if not(isnumeric(PlayID))  then 
'Call Cls.Out_Msg("ID传入错误","javascript:window.close()")
'else
'PlayID=int(PlayID)
'end if
session_view="LK"&Cls.rand_num(8)
tit="歌曲欣赏"
Web_Name=""&Cls.Web_Name&""
call DoWebHead(0,0)
Response.write "<link type=""text/css"" href=""/Skin/Template_1.css"" rel=stylesheet media=""all"" />"
Call Channel_Load(0)
GetOption=Split(Cls.ChannelOption,"|||")

'===========================
dim dnum,singer,nurl,npower,nemoney,server_url,play_url_true,view_play_true,server_id,id
temp1=""
play_url_true=false
view_play_true=true
ddim=split(PlayID,",")
dnum=ubound(ddim)
for i=0 to dnum
  if isnumeric(ddim(i)) then
 sql="select * from AsaiMHMusicSong where hidden=1 and id="&ddim(i)    
 set rs=Cls.exec(sql,1)
    if not rs.eof then
      id=rs("id")
      npower=rs("power")
      nemoney=rs("emoney")
      name=rs("name")
      nurl=rs("url")
      v_genre=rs("genre")
      server_id=rs("server_id")
      singer=rs("singer")
      server_url=Cls.Server_Url(Channelids,server_id,"")
      if not(server_url="" and instr(nurl,"://")<1) then
      nurl=Cls.url_true(server_url,nurl)
     'nurl=server.urlencode(nurl) '地址处理
      'nurl=joekoe_cms.iisfd_url(nurl) 'IIS防盗连参数
        call Cls.session_set("aspnurl",nurl)
        if v_genre="wmp" then
          temp1=temp1&vbcrlf&vbcrlf&"<Entry>" & _
	        vbcrlf&"<title>"&name&"</title>" & _
	        vbcrlf&"<author>"&singer&"</author>" & _
	        vbcrlf&"<COPYRIGHT>"&Cls.web_url&"</COPYRIGHT>" & _
	        vbcrlf&"<ref href="""&nurl&""" />" & _
	        vbcrlf&"</Entry>"
        else
          if instr(nurl,"://")=0 then nurl=Cls.web_urls&nurl
          temp1=temp1&vbcrlf&nurl
        end if
        call Cls.exec("update AsaiMHMusicSong set Hits=Hits+1 where id="&ddim(i),0)
        'play_url_true=true
      end if
      '---------------------------权限检测---------------------------
   Dim chkpower,chkemoney,ChkMsg
   	   chkpower=true
	   chkemoney=true
   	   chkpower=chk_power(npower,ChannelIDs)
	   chkemoney=chk_emoney(nemoney,"Music",id,ChannelIDs)
   If login_mode<>"" Then
      if not chkemoney then 
	      If int(login_emoney) >= int(nemoney) then
	           ChkMsg="<p align=center><br /><br />下载或欣赏本音乐需要扣除<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&",你目前尚有<b><font color=blue>"&login_emoney&"</font></b>"&Cls.Web_Unit&"可用<br /><br />你确实愿意支付<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&"来阅读此文吗？<br /><br /><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/Player.asp?ID="&v_id&"&UrlID="&UrlID&"&pay=yes'>我愿意</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='"&Cls.Web_Dir&Cls.ChannelDir&"'>我不愿意</a></p>"
          else
	           ChkMsg="<p align=center><br /><br />对不起，欣赏本音乐需要扣除<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&",你目前只有<b><font color=blue>"&login_emoney&"</font></b>"&Cls.Web_Unit&"可用<br /><br />你的"&Cls.Web_Unit&"不足，无法下载或欣赏本音乐，请联系管理员进行充值！</p>"
		  end if
	  end if
	  if not chkpower then ChkMsg="<p align=center><br /><br />对不起，你没有下载或欣赏此音乐的权限！</p>"
   else
	  if not(chkpower and chkemoney) then ChkMsg="<br />&nbsp;&nbsp;&nbsp;&nbsp;你还没注册？或者没有登录？此影片要求至少是本站的注册用户才能下载！<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;如果你还没注册，请赶紧<a href='"&Cls.Web_Dir&"User/Register.asp'><font class=red>点此注册</font></a>吧！<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;如果你已经注册但还没登录，请赶紧<a href='"&Cls.Web_Dir&"User/Login.asp?old_url=back'><font class=red>点此登录</font></a>吧！<br /><br />"
   end if
   if not(chkpower and chkemoney) then 
   call DoWebHead(0,0)
   Response.Write ChkMsg
   Response.End
   end if
 '----------------------------获取地址----------------------------
        'rs.close
        exit for
    end if
    rs.close
  end if
next
erase ddim
if v_genre="wmp"  and play_url_true=true then
  temp1="<asx version=""3.0"">" & _
	vbcrlf&"<Param Name=""AllowShuffle"" Value=""yes"" />" & _
	vbcrlf&"<author>"&Cls.web_name&"</author>" & _
	vbcrlf&"<title>"&Cls.web_name&" - "&Cls.web_url&"</title>" & _
	temp1 & _
	vbcrlf&vbcrlf&"</asx>"
end if
'===========================
      session(Cls.web_cookies&"_music")=session_view
%>
<html>
<head>
<title><%response.write Web_Name & tit%> - <%response.write singer%>:<%response.write name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style>
body,p,td,th { font-family:Verdana, Arial, Helvetica, sans-serif, 宋体; font-size:9pt; color:#000000 }
.menu {BORDER-RIGHT: buttonface 1px solid; BORDER-TOP: buttonface 1px solid; BORDER-LEFT: buttonface 1px solid; BORDER-BOTTOM: buttonface 1px solid}
body {BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; BORDER-LEFT: 0px solid; CURSOR: default; BORDER-BOTTOM: 0px solid; BACKGROUND-COLOR: menu}
input.txt { border: 1px solid #c0c0c0; padding: 1px; background-color: #ffffff; height: 20px; }
</style>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false" ondragstart="return false" onselectstart ="return true" onselect="document.selection.empty()">
<map name="map_top">
<area onClick="javascript:window.close();" href="javascript:self.close();" shape="rect" coords="363, 4, 390, 18">
</map>
<table cellspacing=0 cellpadding=0 border=0 width=400 align=center>
<tr><td><img height=39 src="<%=cls.web_dir%>Images/Music/play_top.gif" usemap="#map_top" width=400 border=0></td></tr>
<tr><td background="<%=cls.web_dir%>Images/Music/play_bg.gif">
  <table cellspacing=0 cellpadding=3 width="96%" align=center border=0>
  <tr>
  <td width="28%">
    <table cellspacing=0 cellpadding=3 width="90%" align=center border=0>
    <tr><td><a href='Index.Asp' target=_blank><img height=14 src="<%=cls.web_dir%>Images/Music/play_but_01.gif" width=73 border=0></a></td></tr>
    <tr><td><a href='Index.Asp' target=_blank><img height=14 src="<%=cls.web_dir%>Images/Music/play_but_02.gif" width=73 border=0></a></td></tr>
    <tr><td><a href='Index.Asp' target=_blank><img height=14 src="<%=cls.web_dir%>Images/Music/play_but_03.gif" width=73 border=0></a></td></tr>
    </table>
  </td>
  <td width="72%">
    <table cellspacing=0 cellpadding=0 width=273 border=0>
    <tr><td><img height=10 src="<%=cls.web_dir%>Images/Music/play_w_top.gif" width=273></td></tr>
    <tr><td background="<%=cls.web_dir%>Images/Music/play_w_bg.gif" width='100%' align=center>
      <table cellspacing=0 cellpadding=0 width="97%" align=center border=0>
      <tr><td height=32></td></tr>
      <tr><td height=22 align=center></td></tr>
      </table>
    </td></tr>
    <tr><td><img height=6 src="<%=cls.web_dir%>Images/Music/play_w_foot.gif" width=273></td></tr>
    </table>
  </td></tr>
  </table>
  <table cellspacing=0 cellpadding=0 width="100%" border=0>
  <tr>
  <td align=right><img height=71 src="<%=cls.web_dir%>Images/Music/play_p_lift.gif" width=5></td>
  <td width=375>
    <table cellspacing=0 cellpadding=0 width="100%" border=0>
    <tr><td background="<%=cls.web_dir%>Images/Music/play_p_top.gif" height=5><img height=5 src="<%=cls.web_dir%>Images/Music/play_p_top.gif" width=2></td></tr>
    <tr><td>
<%
  call play_types()
%>
</td></tr>
    <tr><td background="<%=cls.web_dir%>Images/Music/play_p_foot.gif" height=4><img height=4 src="<%=cls.web_dir%>Images/Music/play_p_foot.gif" width=1></td></tr>
    </table>
  </td>
  <td><img height=71 src="<%=cls.web_dir%>Images/Music/play_p_right.gif" width=5></td>
  </tr>
  </table>
</td></tr>
<tr><td><img height=14 src="<%=cls.web_dir%>Images/Music/play_foot.gif" width=400></td></tr>
</table>
</body></center>
</head></html>
<%

sub play_types()
  if v_genre="wmp" then
    call play_wmp()
  else
    call play_rm()
  end if
end sub

sub play_rm()
%>
<object id="HaiEs49_Com_RealPlayer" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" height=64 width="100%">
<param name="src" value="<%response.write "music_geturl.asp?id="&id&"&session_get="&session_view&""%>">
<param name="autostart" value="-1">
<param name="shuffle" value="0">
<param name="prefetch" value="0">
<param name="nolabels" value="0">
<param name="controls" value="ControlPanel,StatusBar">
<param name="loop" value="0">
<param name="numloop" value="0">
<param name="center" value="0">
<param name="maintainaspect" value="0">
<param name="BACKGROUNDCOLOR" value="#000000">
<embed type="audio/x-pn-realaudio-plugin" controls="ControlPanel,StatusBar" height=64 width="100%"></embed>
</object>
<%
end sub

sub play_wmp()
%>
<object id="HaiEs49_Com_mPlayer" height=64 width="100%" standby="正在载入 Windows Media Player 播放流 ..." type=application/x-oleobject classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6>
<param name="url" value="<%response.write "Music_GetUrl.asp?id="&id&"&session_get="&session_view&""%>">
<param name="album" value="HaiEs49.Com">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentposition" value="0">
<param name="defaultframe" value="">
<param name="playcount" value="100">
<param name="autostart" value="-1">
<param name="currentmarker" value="0">
<param name="invokeurls" value="-1">
<param name="baseurl" value="">
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uimode" value="full">
<param name="stretchtofit" value="0">
<param name="windowlessvideo" value="0">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="0">
<param name="fullscreen" value="0">
<param name="samistyle" value="">
<param name="samilang" value="">
<param name="samifilename" value="">
<param name="captioningid" value="">
<param name="bufferingtime" value="5">
</object>
<%
end sub
%>