<!-- #include file="conn.asp" -->
<!-- #include file="bbsuser.asp" -->
<%
 DIM myFile,htmfilename,page,htm_ext,FileName,postuser,str,strsql
 Post=Request.QueryString("Postnum")
 pid=Request.QueryString("id")
 postuser=Request.QueryString("postuser")
 reid=Request.QueryString("reid")
 sql="select top 1 BBS_Cate.BBS_Cate_Manager_Name from BBS_Cate,bbstitle where BBS_Cate.BBS_Cate_ID = bbstitle.BoardID_2 and bbstitle.id="&pid&""
 set rs=server.createobject("adodb.recordset")
 rs.open sql,conn,1,1
 myname=rs("BBS_Cate_Manager_Name")
 admintobz=0
 if InStr(myname,"|")>0 then
   myname=split(myname,"|",-1,1)
   for i=0 to UBound(myname)
	 if myname(i)=request.cookies("name") then
	    admintobz=1
	 end if
   next
 elseif myname=request.cookies("name") then
  admintobz=1
 end if 
 if (request.cookies("bz")=1 or admintobz=1) and postuser<>"" then 
   str="update bbsmenu set deleted=1 where id="&reid
   conn.execute(str)
   
   strsql="update bbstitle set rep=rep-1,postnum=postnum-1 where rep>0 and id="+pid
   conn.execute(strsql)
   sql="update clubuser set jingyuan=jingyuan-15 where jingyuan>0 and clubuser_name='"&trim(request("postuser"))&"'"
   conn.execute sql
   Response.redirect request.serverVariables("HTTP_REFERER")
   'Response.Redirect "ftbbs.asp?id="&pid
 else
   response.write "<script language='javascript'>"
   response.write "alert('你的权限太低，无法使用此功能！');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end   
 end if
%>