adDel.asp 975 B

123456789101112131415161718192021222324252627282930
  1. <%Session.CodePage=65001%>
  2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  3. <%if session("adxclass")<>"超管" then
  4. response.Write"<script language='javascript'>alert('您没有权限');history.go(-1);</script>"
  5. response.End()
  6. end if%>
  7. <!--#include file="../bdcommx/connxyz.asp"-->
  8. <%call log_chk()
  9. dim xxx
  10. xxx=trim(request("xxx"))
  11. if xxx<>"" then
  12. Set rs=Server.Createobject("Adodb.Recordset")
  13. sql="select * from adminx where adx_id="&xxx
  14. rs.open sql,conn,1,3
  15. if rs("adx_name")=session("adminxxx") then
  16. response.Write("<script languge='javascript'>alert('您不能删除自己!');history.back(-1);</script>")
  17. response.End()
  18. end if
  19. rs.delete
  20. rs.close
  21. set rs=nothing
  22. '删除大类!为彻底,也删除登录日志
  23. conn.Execute("delete from adminlog where adx_id="&xxx&"")
  24. conn.Close
  25. Set conn=Nothing
  26. response.write"<SCRIPT language=JavaScript>alert('删除成功!');"
  27. response.write"this.location.href='adMag.asp';</SCRIPT>"
  28. response.end
  29. end if%>