<!--#include file="../inc/Conn.asp"-->
<!--#include file="Inc/Admin.Asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim ID,Action,sqlDel,rsDel,ObjInstalled
ID=trim(request("ID"))
Action=Trim(Request("Action"))

if ID="" or Action<>"Del" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>²ÎÊý²»×ã£¡</li>"
end if
if FoundErr=False then
	if instr(ID,",")>0 then
		dim idarr,i
		idArr=split(ID)
		for i = 0 to ubound(idArr)
			call DelNews(clng(idarr(i)))
		next
	else
		call DelNews(clng(ID))
	end if
end if
if FoundErr=False then
	call CloseConn()
	response.Redirect "Dream_User.asp"
else
	call CloseConn()
	call WriteErrMsg()
end if

sub DelNews(ID)
	PurviewChecked=False
	sqlDel="select * from Dream_User where id=" & CLng(ID)
	Set rsDel= Server.CreateObject("ADODB.Recordset")
	rsDel.open sqlDel,conn,1,3
	rsDel.delete
	rsDel.update
	set rsDel=nothing		
end sub
%> 