<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="Inc/format.asp"-->
<%
if UserLogined<>True then
    response.write"<SCRIPT language=JavaScript>alert(' 请登陆后操作，谢谢 ！');JavaScript:window.close();</SCRIPT>"
    response.end
else
dim new_id:new_id=trim(request.querystring("collect"))
if request.querystring("collect")="" then
  Response.Write "<script language=javascript>alert('非法操作，请指定操作对象！');JavaScript:window.close();</script>"
  Response.End
else
  if not isInteger(request.querystring("collect")) then
    Response.Write "<script language=javascript>alert('错误，参数非法！');JavaScript:window.close();</script>"
    Response.End
  end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from dj where dj_id="&new_id
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
    rs.close
    response.Write"<script language=javascript>alert('要添加的音乐不存在！！');JavaScript:window.close();</script>"
    response.end
else
djname=rs("dj_name")
end if
rs.close
IF Hx66_collect<>"" Then 
Hx66collect=Hx66_collect
else
Hx66collect="|123456790"
End IF
temp=split(Hx66collect,"|")
for j = 1 to ubound(temp)
if new_id=temp(j) then
    response.Write"<script language=javascript>alert('要添加的『"&djname&"』音乐已在你的收藏列表内！！');JavaScript:window.close();</script>"
    response.end
end if
next
if ubound(temp)>=collectsum then
    response.Write"<script language=javascript>alert('您目前的收藏音乐已达到系统"&collectsum&"个限定数，请清理后添加！！');JavaScript:window.close();</script>"
    response.end
end if
dim temp1
temp1="|"
temp1=Hx66_collect&""&temp1&""&new_id
conn.execute"Update [user] set usercollect='"&temp1&"' where username='"&Hx66_name&"'"
response.Write"<script language=javascript>alert(' 已成功将『"&djname&"』加入到您的音乐收藏列表内！');JavaScript:window.close();</script>"
response.end
rs.Close
set rs=nothing
end if
%>

