<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/char.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="IsLogin.jsp" -->
<%
m_username= Request.Cookies("aspxnet")("CurUsername")
dim ArticleID,Action,sqlDel,rsDel,FoundErr,ErrMsg,ObjInstalled
ArticleID=trim(request("ArticleID"))
Action=Trim(Request("type"))
FoundErr=False
if ArticleId="" or Action="" then
	FoundErr=True
	Call Msgbox("对不起，参数错误！",1)
end if

if FoundErr=False then
	if instr(ArticleID,",")>0 then
		dim idarr,i
		idArr=split(ArticleID)
		for i = 0 to ubound(idArr)
		    if action="accept" then
			call DelArticle(clng(idarr(i)))
			else
			call DelArticle1(clng(idarr(i)))
			end if
		next
	else 
	    if action="accept" then
		call DelArticle(clng(ArticleID))
		else
		call DelArticle1(clng(ArticleID))
		end if
	end if
end if
if FoundErr=False then
	Call CloseDatabase()
	if action="accept" then
	response.Redirect "Center_msg.jsp"
	else
	response.Redirect "Center_msgout.jsp"
	end if
else
	Call CloseDatabase()
end if

sub DelArticle(ID)
conn.execute "update T_message set F_accept=1 where F_username_a='"&m_username&"' and F_ID=" & CLng(ID)
end sub

sub DelArticle1(ID)
conn.execute "update T_message set F_send=1 where F_username_s='"&m_username&"' and F_ID=" & CLng(ID)
end sub
 



%>

