<!--#include file="../conn.asp"-->
<!-- #include file="../admin/check_master.asp" -->
<!-- #include file="../inc/ubbcode.asp"-->
<!-- #include file="../touxianfun.asp" -->
<!--#include file="../admin/check_admin_qs.asp" -->
<%
Const ForReading = 1
Const Forwriting = 2
Const ForAppending = 8

 pid=Request.QueryString("id")
 reid=Request.QueryString("reid")
 FileName = Request.QueryString("FileName")
 sign=Request.QueryString("sign")
 
 fldarray=split(FileName,"/",-1,1)
 infolder=fldarray(0)
if request("bbs_img")<>"" then
   FiLePaTh = Server.MapPath("../")&infolder&"\" &request("bbs_img")
   Set fso = CreateObject("Scripting.FileSystemObject")
   If fso.FileExists(FiLePaTh) = True Then
      fso.DeleteFile(FiLePaTh)
   end if
   Set fso = nothing   
end if

if sign="0" then
strsql="update bbstitle set rep=rep+1,postnum=postnum+1 where id="+pid
else
strsql="update bbstitle set rep=rep-1,postnum=postnum-1 where rep>0 and id="+pid
end if
conn.execute(strsql)

if sign<>"" then
str="update bbsmenu set deleted="&sign&" where id="&reid
else
str="delete from bbsmenu where id="&reid
end if
conn.execute(str)

sql="update BBS_Cate set BBS_Cate_Reply=BBS_Cate_Reply-1 where BBS_Cate_ID='"&BoardID_2&"'"
conn.execute sql

conn.close
set conn=nothing
response.redirect request.serverVariables("HTTP_REFERER")
%>