<!-- #include file="../admin/check_master.asp" -->
<!-- #include file="../inc/conn.asp"-->
<%
   dim sql
   dim rs

   set rs=server.createobject("adodb.recordset")
   sql="select [pid] from bbsmenu where id="&request("id")
   rs.open sql,conn,1,1
   parent_id=cint(rs("pid"))
   rs.close


   sql="delete from bbsmenu where id="&request("id")
   conn.execute sql

   set rs=server.createobject("adodb.recordset")
   sql="select * from bbstitle where id="&parent_id
   rs.open sql,conn,3,3
   rs("rep")=cint(rs("rep"))-1
   rs.update
   rs.close


   conn.close
   set conn=nothing

   response.redirect request.servervariables("http_referer")

%>
