<% userPageRights="{member}" %>
<!--#include file="check.asp"-->
<!--#include file="../Include/char.asp" -->
<%

dim i
dim rsdel,rsdel1

 
ArticleID=trim(request("ArticleID"))
Action=Trim(Request("Action"))
FoundErr=False
if ArticleId="" then
	FoundErr=True
   Call Msgbox("对不起,请选择记录！",1)
    Response.end
end if
'删除
if Action="del" then 

if instr(ArticleID,",")>0 then
	'	dim idarr,i
		idArr=split(ArticleID)
		for i = 0 to ubound(idArr)
			call DelArticle(clng(idarr(i)))
		next
	else
		call DelArticle(clng(ArticleID))
	end if

	conn.close
	set conn=nothing
	response.Redirect "admin_diary.asp"

	

sub DelArticle(ID)
	'PurviewChecked=False
	sqlDel1="select f_id,f_userid from rj_diary where f_ID=" & CLng(ID)
	Set rsDel1= Server.CreateObject("ADODB.Recordset")
	rsDel1.open sqlDel1,conn,1,3
	if not rsdel1.eof then
	
   'mSql = "DELETE FROM rj_diary WHERE F_userid=" &rsdel1("f_userid")  '删除日记
   ' conn.execute mSql
   
   rsDel1.delete
   rsdel1.update
	end if	
	'rsdel1.close
	'set rsdel1=nothing	
   	
end sub
  
end if
'////////////////////////////////////////////////

response.Redirect "admin_diarydel.asp"

%>
