NCBdel.asp 827 B

1234567891011121314151617181920212223
  1. <!--#include file="../bdcommx/connxyz.asp"-->
  2. <%
  3. call log_chk()
  4. theX=trim(request("theX"))
  5. if theX<>"" then
  6. '-----------------判断小类是否为空!
  7. set rs1=conn.execute("select * from nsclass where nb_id="&theX&"")
  8. if not rs1.eof and not rs1.bof then
  9. call backurl("该大类下小类有信息,您不能删除!")
  10. rs1.close
  11. set rs1=nothing
  12. end if
  13. '-----------------删除大类!为彻底,也删除小类以及相关新闻
  14. conn.Execute("delete from nbclass where nb_id="&theX&"")
  15. conn.Execute("delete from nsclass where nb_id="&theX&"")
  16. conn.Execute("delete from bdnews where nb_id="&theX&"")
  17. conn.Close
  18. Set conn=Nothing
  19. response.write"<SCRIPT language=JavaScript>alert('删除成功!');"
  20. response.write"this.location.href='NCMag.asp';</SCRIPT>"
  21. response.end
  22. end if
  23. %>