<!-- #include file="../inc/conn.asp"-->
<%
   dim sql
   return_url=request("File")
   if request.cookies("bbsuser")="" then '用户还未登录
      response.redirect "rebbslogin.asp"
   end if   
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="&clng(request("id"))&""
'sql="SELECT top 1 BBS_Cate.BBS_Cate_Manager_Name FROM BBS_Cate INNER JOIN bbstitle ON BBS_Cate.BBS_Cate_ID = bbstitle.BoardID_2 AND bbstitle.id="&request("id")
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 InStr(myname(i),request.cookies("name"))>0 then
	    admintobz=1
	 end if
   next
end if   
     
   if request.cookies("bz")=1 or admintobz=1 then
   sql="update bbstitle set sign=0 where id="&request("id")
   conn.execute sql
   conn.close
   set conn=nothing
   response.redirect request.serverVariables("HTTP_REFERER")
   'response.redirect "../html/"&return_url
   else
   response.write "<script language='javascript'>"
   response.write "alert('你的权限太低，无法使用此功能！');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end   
   end if
%>
