<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="IsLogin.asp" -->
<%
m_username= Session("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
	if action="accept" then
	response.Redirect "message.asp"
	else
	response.Redirect "message_out.asp"
	end if
else
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
 



%>

