<%PageName="SpecialBox"%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<LINK href="CSS/ALL_CSS.CSS" type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=gb2312">



<META content="ˮ,ж,MusiC CitY,Xn365" name=keywords>
<META content="ˮ,ж,MusiC CitY,Xn365" name=description>
<%
founderr=false
if isnull(session("FD_User")) or session("FD_User")="" or isnull(session("FD_Pwd")) or session("FD_Pwd")="" then
	errmsg=errmsg+"<br><li><SCRIPT language=JavaScript>alert(' Բ, ֻлԱղؼУע');javascript:top.window.close();</SCRIPT></li>"
	call error()
	Response.End 
end if
%>
<%
action=request("action")
set rs=server.createobject("adodb.recordset")
if action="add" then
	SpecialId=request.QueryString("SpecialId")
	sql="select * from SpecialBox where UserName='"&session("FD_User")&"' and SpecialId="&SpecialId
	rs.open sql,conn,1,3
	if not rs.EOF then
		response.Redirect "UserCollect_S.asp?Action=Show"
		response.end
	else
		set rs2=server.createobject("adodb.recordset")
		sql2="select * from special where specialid="&SpecialId
		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
			
			SpecialName=rs2("SpecialName")
			Singer=rs2("NClass")
			NClassid=rs2("NClassid")
			pic=rs2("pic")
			intro=rs2("intro")
		end if
		rs2.close
	        set rs2=nothing 
		rs.AddNew
		rs("UserName")=session("FD_User")
		rs("SpecialId")=SpecialId
		rs("SpecialName")=SpecialName
		rs("Singer")=Singer
		rs("NClassid")=NClassid
		rs("pic")=pic
		rs("intro")=intro
		rs.Update
	end if
	rs.Close
		Response.Redirect "UserCollect_S.asp?Action=Show"
elseif action="del" then
	id=request("id")
	set rs=conn.execute("delete FROM SpecialBox where UserName='"&session("FD_User")&"' and id="&id)
	Response.Redirect "UserCollect_S.asp?Action=Show"
	
elseif action<>"del" and action<>"add" then
%>
               

<table border="1" width="96%" cellspacing="0" cellpadding="0" bordercolor="#000000" bordercolordark="#FFFFFF">
               
        <tr>
          
    <td bgcolor=#FAFAFA height=30 align=center colspan=6><img src="zy11/albumsc.gif" width="150" height="24" align="absmiddle" vspace="1" hspace="1" border="0"></td>
        </tr>
      
<%
	sql="select * from SpecialBox where UserName='"&session("FD_User")&"'"
	rs.open sql,conn,1,1
	if rs.EOF and rs.BOF then
%>
        <tr><td align=center colspan=8>δղκר</td></tr>
<%
	else
    do while not rs.EOF 
	i=i+1
%>
        <tr> 
          <td width=100%>
          <table>
          <tr><td> <b><font color=#ff0000 face=Verdana, Arial, Helvetica, sans-serif size=4><%=i%></font></b></td></tr>
          <tr><td>ר֣<a href="ShowSpecial.asp?Specialid<%=rs("SpecialId")%>"><%=rs("SpecialName")%></a><font color=green>  * ʹר</font></td></tr>
          
           <tr><td>ݳ֣<a href="EMusic.asp?NClassid=<%=rs("NClassid")%>"><%=rs("Singer")%></a></td> </tr>
          
          <tr> <td>ʴ飺<a href="#" onClick="window.open('MailSpecial.asp?id=<%=rs("SpecialId")%>','','scrollbars=no,resizable=no,width=419,height=151,menubar=no,top=98,left=198')"></a></td>
           </tr> <tr><td>ɾղأ<a href="UserCollect_S.asp?action=del&id=<%=rs("id")%>">ɾ</a></td>
        </tr></table></td>
        <td width=100><img src="<%=rs("pic")%>" width="100" height="100"></td>
        </tr>
        <tr><td colspan=2 >רܣ<%=rs("inTro")%></td><tr>
<%
	rs.MoveNext
    loop
%>
    


<%
	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
%>
 </table>
