%
If session("PassWord")="" or session("UserName")="" or session("PassWord")=null or session("UserName")=null Then
Response.Write ("")
Response.end
End If
stats=session("UserName")&"的音乐盒"
%>
<%
action=request("action")
set rs=server.createobject("adodb.recordset")
if action="add" then
Musicid=request.QueryString("id")
sql="select * from ylmv_Box where UserName='"&session("UserName")&"' and Musicid="&Musicid
rs.open sql,conn,1,3
if not rs.EOF then
errmsg=errmsg+""
call error()
response.end
else
set rs2=server.createobject("adodb.recordset")
sql2="select * from ylmv_MusicList where id="&Musicid
rs2.open sql2,conn,1,1
if (rs2.EOF and rs2.BOF) then
errmsg=errmsg+""
call error()
response.end
else
Wma=rs2("Wma")
MusicName=rs2("MusicName")
Singer=rs2("Singer")
Classid=rs2("Classid")
SClassid=rs2("SClassid")
NClassid=rs2("NClassid")
end if
rs2.close
set rs2=nothing
rs.AddNew
rs("UserName")=session("UserName")
rs("Musicid")=Musicid
rs("MusicName")=MusicName
rs("Singer")=Singer
rs("Wma")=Wma
if Wma<>"" then
rs("Wma")=true
end if
rs("Classid")=Classid
rs("SClassid")=SClassid
rs("NClassid")=NClassid
rs.Update
end if
rs.Close
Response.Redirect "musicbox.asp?action=show"
elseif action="del" then
id=request("id")
set rs=conn.execute("delete FROM ylmv_Box where UserName='"&session("UserName")&"' and id="&id)
Response.Redirect "musicbox.asp?action=show"
elseif action="show" or action="" then
%>