<%dim TP,ids,Action,tid,bbsid,tzname,id Action=Request.QueryString("Action") tid=usb(request("tid")) id=usb(request("id")) bbsid=usb(request("bbsid")) TP=usb(request("TP")) IF Action="t" Then call bbslist else call relist end if sub bbslist if TP<>"" then if tid="" or Isnumeric(tid)=False then Call Error("

ID无效!") end if if bbsid="" or Isnumeric(bbsid)=False then Call Error("

ID无效!") end if dim fid,tztitle set rs=Server.CreateObject("ADODB.Recordset") rs.open"select * from [sell] where id="&tid,conn,1,1 if rs("fid")<>myid and skey<>abs(bbsid) and keys<>1 and adminzone<>abs(bbsid) then Call Error("

权限不足!") end if if rs("jj")=1 then Call Error("

先解除精华才能删除帖子!") end if fid=rs("fid") tztitle=rs("name") rs.close set rs=nothing conn.Execute("update sell set yc=1 Where id=" & tid) conn.Execute("update relist set yc=1 Where tid=" & tid) conn.Execute("update users set myjb=myjb-"&abs(int(selldeljb))&",myjy=myjy-"&abs(int(selldeljy))&",mysellnum = mysellnum-1 Where id=" & fid) set rs=Server.CreateObject("ADODB.Recordset") rs.open"select * from [board] ",conn,1,2 rs.addnew rs("bbsid")=bbsid if clng(fid)=myid then rs("nr")="会员:"&myni&"(id:"&myid&")删除帖子["&tztitle&"]!" else rs("nr")="版主:"&myni&"(id:"&myid&")删除帖子["&tztitle&"]!" end if rs.update rs.close set rs=nothing Response.Write "" Response.Write "

" Response.Write "成功删除!正在返回.." Response.Write "
返回本版" Response.Write "

" else Response.Write "

" Response.Write "确认删除该帖子?
" Response.Write "是的
" Response.Write "取消" Response.Write "

" end if end Sub Sub relist if TP<>"" then if id="" or Isnumeric(id)=False then Call Error("

ID无效!") end if if tid="" or Isnumeric(tid)=False then Call Error("

ID无效!") end if if bbsid="" or Isnumeric(bbsid)=False then Call Error("

ID无效!") end if if skey<>abs(bbsid) and keys<>1 and adminzone<>abs(bbsid) then Call Error("

权限不足!") end if dim fid set rs=Server.CreateObject("ADODB.Recordset") rs.open"select fid from [relist] where id="&id,conn,1,1 if rs.eof then Call Error("

不存在的回复!") end if fid=rs("fid") rs.close set rs=nothing conn.Execute("delete from relist Where id=" & id) conn.Execute("update users set myjb=myjb-"&abs(int(redeljb))&",myjy=myjy-"&abs(int(redeljy))&",myrelnum = myrelnum-1 Where id=" & fid) Response.Write "" Response.Write "

" Response.Write "成功删除!正在返回.." Response.Write "
查看主帖" Response.Write "

" else Response.Write "

" Response.Write "确认删除该回复?
" Response.Write "是的
" Response.Write "取消" Response.Write "

" end if end Sub %>