<!-- #include file="conn.asp" -->
<%call Head()
dim action,name,id
id=request("id")
action=trim(request.querystring("action"))
if action="ok" then
if id="" or Isnumeric(id)=False then
  Call Error("出错了","ID无效！")
  end if
dim uid,tztitle
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [zonerj] where id="&id,conn,1,1

if rs("dt")=1 then
  Call Error("出错了","先去顶才能删除日志！")
  end if
uid=rs("uid")
tztitle=rs("tit")
rs.close
set rs=Nothing

call cardz("删除日志","blog.asp?sid="&sid&"&amp;saytk="&saytk&"")

conn.Execute"delete from zonerj Where id="&id
conn.Execute"delete from zonerjpl Where zonezid="&id
conn.Execute"update [zone] set mysellnum=mysellnum-1 Where zoneid="&uid

Response.Write "成功删除日记["&tztitle&"](ID:"&id&")！正在返回日志列表.."

else
call saycard("删除日志","left")
 Response.Write "确认删除该日志？<br/>"
 Response.Write "<a href='blogrj_del.asp?Action=ok&amp;id="&id&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>是的</a><br/>"
 Response.Write "<a href='blog_view.asp?id="&id&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>取消</a><br/>"

end if
conn.close
set conn=Nothing
response.write "<br/><a href='blog.asp?sid="&sid&"&amp;saytk="&saytk&"'>返回所有日记</a>"
%><!--#include file="fanhui.asp"--><%
Call Headsay()
%>                         