adModSave.asp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <!--#include file="../bdcommx/jsall.asp"-->
  9. <%call log_chk()%>
  10. <%dim user,pwd,rpwd,thec,Tname,tel
  11. user=trim(request("UserName"))
  12. olduser=trim(request("olduser"))
  13. pwd=request("PassWord")
  14. rpwd=request("rPassWord")
  15. if pwd<>rpwd then
  16. response.Write"<script language='javascript'>alert('两次密码输入不一致');history.go(-1);</script>"
  17. response.End()
  18. end if
  19. pwd=md5(trim(pwd))
  20. xxx=trim(request("xxx"))
  21. thelm=trim(request("thelm"))
  22. Tname=request("Tname")
  23. tel=request("tel")
  24. if user<>olduser then
  25. Set rs=Server.Createobject("Adodb.Recordset")
  26. sql="select * from adminx where adx_name='"&user&"'"
  27. rs.open sql,conn,1,3
  28. if not rs.eof and not rs.bof then
  29. Call backurl("帐号已存在!")
  30. rs.close
  31. set rs=nothing
  32. end if
  33. end if
  34. Set rs=Server.Createobject("Adodb.Recordset")
  35. sql="select * from adminx where adx_id="&xxx
  36. rs.open sql,conn,1,3
  37. rs("adx_name")=user
  38. rs("adx_pass")=pwd
  39. rs("adx_lm")=thelm
  40. rs("adx_Tname")=Tname
  41. rs("adx_tel")=tel
  42. rs.update
  43. session("adminxxx")=rs("adx_name")
  44. session("adxclass")=rs("adx_lm")
  45. rs.close
  46. set rs=nothing
  47. response.Redirect("admag.asp")%>