<!--#include file="UserSession.asp" -->
<!--#include file="UserConn.asp" -->
<%
Chkhttp()
action=Trim(Request.QueryString("action"))
reurl=Request.ServerVariables("Http_Referer")'来源地址
If reurl="" Then reurl="userfav.asp"
id=QvodCms_CLng(Request.QueryString("id"))
allid=Trim(Request.Form("allid"))'批量影片ID
If action="del" then 
   Call News_Del		
Else
   Call QvodCms_Err("请检查你提交的参数是否正确！")
   Response.End
End if
Sub News_Del '作用:删除新闻信息
     'dim temp_collect,allid 
     Set rs = Server.CreateObject("adodb.recordset")
     sql = "select ufav from qvodcms_user where uid="&uid&""
     rs.Open sql, Conn, 1, 3
     if rs("ufav")<>"" then
     ufavlist=rs("ufav")
     else
     ufavlist="|"
     End if
	 
	 If allid<>"" then '批量删除新闻信息
	   ad=Split(allid,",")
	   for bd=0 to Ubound(ad)
	     allida=allida&"|"&QvodCms_CLng(ad(bd))
	   next
        temp_collect=Replace(ufavlist,Replace(Replace(allida," ",""),",","|"),"")
		
     elseif id>0 then
	    temp=split(ufavlist,"|")
		for i = 1 to ubound(temp)
		 if QvodCms_CLng(temp(i))=id then
		 temp_collect=temp_collect
		 Else
		 temp_collect=temp_collect&"|"&temp(i)
		 End if
		next
	  else
	   Call QvodCms_Err_Url("请选择删除对象！","userfav.asp") 
	   Response.End()	
	  End if	
      rs("ufav")=Trim(temp_collect)
	  rs.update
	  rs.close:Set rs=nothing
	  Response.Redirect(reurl)
	 ' Response.Write Trim(temp_collect)
End Sub
Call CloseConn()
%>