<!--#include file="../inc/conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="functionuser.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
action=request("action")
set rs=server.createobject("adodb.recordset")
if action="add" then
	Musicid=request.QueryString("id")
	sql="select * from Box where UserName='"&membername&"' and Musicid="&Musicid
	rs.open sql,conn,1,3
	if not rs.EOF then
		response.Redirect "musicsc.asp?action=show"
		response.end
	else
		set rs2=server.createobject("adodb.recordset")
		sql2="select * from MusicList where id="&Musicid
		rs2.open sql2,conn,1,1
		if (rs2.EOF and rs2.BOF) then
			errmsg=errmsg+"<SCRIPT language=JavaScript>alert(' 请正确选择歌曲! ');javascript:top.window.close();</SCRIPT>"
			call error()
			response.end
		else
			
			MusicName=rs2("MusicName")

			sClassid=rs2("sClassid")
		end if
		rs2.close
	        set rs2=nothing
		rs.AddNew
		rs("UserName")=membername
		rs("Musicid")=Musicid
		rs("MusicName")=MusicName
		rs("sclassid")=sclassid

		rs.Update
	end if
	rs.Close
	Response.Redirect "musicsc.asp?action=show"
elseif action="del" then
	id=request("id")
	set rs=conn.execute("delete FROM Box where UserName='"&membername&"' and id="&id)
	Response.Redirect "musicsc.asp?action=show"
	
elseif action<>"del" and action<>"add" then  
%>
<%
'===========请保留版权信息,如果去除，将不提供相关服务==============
' 888网音乐系统 V8.1 版
' 管方网址：www.888wang.com
' 技术支持: QQ:56566918
' 客服：见www.888wang.com网站的客服QQ
' 电话:15918529718
'==================================================================
'此文件为了搜索速度，去除了分页功能，这样速度大大加快
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="免费音乐,在线音乐试听,mp3音乐下载,<%=keywords%>">
<meta http-equiv="Description" content="免费音乐,在线音乐试听,mp3音乐下载,<%=Description%>">
<meta content="all" name="robots" />
<LINK href="../images/search.css" type=text/css rel=stylesheet>
<title>音乐盒-免费在线音乐试听,mp3音乐下载</title>
<script type="text/javascript" src="../js/common.js"></script>
<base target="_blank" />
</head>
<body>
<script type="text/javascript" src="../js/top.js"></script>
<div id="c">
  <div class="o1 o2">
    <div class="iu">
      <iframe src="../user/userLogin.asp" frameborder="0" scrolling="no" width="380" height="25"></iframe>
    </div>
    <div class="is" id="header_bar"></div>
  </div>
  <div class="le">
    <div class="b1">
      <h1>您好，以下是您的收藏音乐</h1>
    </div>
    <div class="tts">
      <iframe scrolling="no" topmargin="0" width="100%"  height="60" marginwidth="0" marginheight="0" frameborder="0" align="center" src="../ads/s_1.html"></iframe>
    </div>
     
<!--列表结束-->

 <!-----------------------搜索歌曲---------------------------->
   
    <div class="b1">
      <table cellspacing="0" cellpadding="0">
      <thead>
        <tr>
          <th width=""5%"">选择</th>
          <th width""60%"">歌曲</th>
          <th width=""7%"">试听</th>
         
          <th width=""7%"">下载</th>
          <th width=""7%"">铃声</th>
	      <th width=""7%"">点歌</th>	  
		  <th width=""7%"">删除</th>	
        </tr>
      </thead>
      <tbody id=albumSongs>
               <%
	sql="select * from Box where UserName='"&membername&"'"
	rs.open sql,conn,1,1
	if rs.EOF and rs.BOF then
%>
<tr bgcolor="#FFFFFF">
          <td height="16" colspan=7 align=center>你尚未收藏任何歌曲</td>
        </tr>
		    <%
	else
    do while not rs.EOF 
	i=i+1
	%>
        <tr>
          <td align=center><input type=checkbox value=<%=rs("musicid")%> name=checked></td>
          <td class=ge><a href="<%=urlPlay(rs("musicid"))%>"><%=rs("MusicName")%></a></td>
          <td align=center><a href="<%=urlPlay(rs("musicid"))%>">试听</a></td>

         
          <td align=center><a href='/user/wmadown.asp?id=<%=rs("musicid")%>'  target=_blank>下载</a></td>
          <td align=center><a href='../ads/mms.html?<%=rs("musicname")%>' target=_blank>铃声</a></td>
		   <td align=center><a href='../ads/ivr.html?<%=rs("musicname")%>' target=_blank>点歌</a></td>
		   <td align=center><a href='?action=del&id=<%=rs("id")%>' target=_blank>删除</a></td>
        </tr>
          <%
	rs.MoveNext
    loop
%></table>
    </div>
    
    <div class="e">
      <input type="button" name="" value="全 选" class="i2" onClick="clk('all','albumSongs');"/>
      <input type="button" name="" value="反 选" class="i2"  onclick="clk('un','albumSongs');"/>
      <input type="button" name="" value="歌曲连播" class="i3"  onclick="clk('play','albumSongs');"/>
    </div>
  </div>
  
  <div class="r">
    <div class="o1">
      <h3>广告也娱乐</h3>
      <ul>
        <iframe scrolling="no" topmargin="0" width="100%"  height="300" marginwidth="0" marginheight="0" frameborder="0" align="center" src="../ads/s_2.html"></iframe>
      </ul>
    </div>
    <div class="o1">
      <h3>广告也娱乐</h3>
      <ul id="newSongs">
        <iframe scrolling="no" topmargin="0" width="100%"  height="300" marginwidth="0" marginheight="0" frameborder="0" align="center" src="../ads/s_3.html"></iframe>
      </ul>
    </div>
    <div class="tts"></div>
  </div>
</div>
<script type="text/javascript" src="../js/foot.js"></script>
</body>
</html>
<%
	end if
	rs.Close
else
	errmsg=errmsg+"<SCRIPT language=JavaScript>alert(' 操作错误! 请联系管理员. ');javascript:top.window.close();</SCRIPT>"
	founderr=true
end if
set rs=nothing
conn.close
set conn=nothing
if founderr=true then
	call error()
end if
%>






