yns_uusave.asp
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:3k
源码类别:

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  3. <%
  4. '请尊重作者劳动成果不要删除以上信息
  5. '业一新闻系统3.0正式版
  6. '主页:http://yeyi.net
  7. '论坛:http://bbs.yeyi.net
  8. '业一网络 承接各种网站制作
  9. '程序开发 软件开发业务
  10. '业务联系
  11. '电话: 13007310512
  12. '联系人:郝亚平
  13. 'QQ:24344842 (只谈业务,技术问题请访问论坛)
  14. '请尊重作者劳动成果不要删除以上信息
  15. %>
  16. <%
  17. ' *** Restrict Access To Page: Grant or deny access to this page
  18. MM_authorizedUsers="3"
  19. MM_authFailedURL="default.asp"
  20. MM_grantAccess=false
  21. If Session("MM_Username") <> "" Then
  22.   If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
  23.          (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
  24.     MM_grantAccess = true
  25.   End If
  26. End If
  27. If Not MM_grantAccess Then
  28.   MM_qsChar = "?"
  29.   If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  30.   MM_referrer = Request.ServerVariables("URL")
  31.   if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  32.   MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  33.   Response.Redirect(MM_authFailedURL)
  34. End If
  35. %>
  36. <!--#include file="md5.asp" -->
  37. <%
  38. Dim rsu__MMColParam
  39. rsu__MMColParam = "1"
  40. If (Request.Form("u_id") <> "") Then 
  41.   rsu__MMColParam = Request.Form("u_id")
  42. End If
  43. %>
  44. <%
  45. Dim rsu
  46. Dim rsu_numRows
  47. Set rsu = Server.CreateObject("ADODB.Recordset")
  48. rsu.ActiveConnection = MM_conn_news_STRING
  49. rsu.Source = "SELECT * FROM t_user WHERE u_id = " + Replace(rsu__MMColParam, "'", "''") + ""
  50. rsu.CursorType = 0
  51. rsu.CursorLocation = 2
  52. rsu.LockType = 1
  53. rsu.Open()
  54. rsu_numRows = 0
  55. %>
  56. <% 
  57. dim uocode
  58. dim uncode1
  59. dim uncode2
  60. uocode = md5(request.Form("u_pass1"))
  61. uncode1 = request.Form("u_pass2")
  62. uncode2 = request.Form("u_pass3")
  63. if uocode = "" or uncode1 = "" or uncode2 = "" then
  64. response.Write("密码不能为空!<br><a href='javascript:history.back();'>返回重填</a>")
  65. elseif uocode <> (rsu.Fields.Item("u_password").Value) then 
  66. response.Write("你的旧密码有误<br><a href='javascript:history.back();'>返回重填</a>")
  67. elseif uncode1 <> uncode2 then
  68. response.Write("你两次输入的新密码不一致<br><a href='javascript:history.back();'>返回重填</a>")
  69. else
  70. %>
  71. <%
  72. if(request.form("u_pass2") <> "") then Command1__mmncode = md5(request.form("u_pass2"))
  73. if(request.form("u_id") <> "") then Command1__mmuid = request.form("u_id")
  74. if(request.form("u_level") <> "") then Command1__mmnlevel = request.form("u_level")
  75. %>
  76. <%
  77. set Command1 = Server.CreateObject("ADODB.Command")
  78. Command1.ActiveConnection = MM_conn_news_STRING
  79. Command1.CommandText = "UPDATE t_user  SET u_password = '" + Replace(Command1__mmncode, "'", "''") + "', u_level = '" + Replace(Command1__mmnlevel, "'", "''") + "' WHERE u_id = " + Replace(Command1__mmuid, "'", "''") + " "
  80. Command1.CommandType = 1
  81. Command1.CommandTimeout = 0
  82. Command1.Prepared = true
  83. Command1.Execute()
  84. %>
  85. <html>
  86. <head>
  87. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  88. <title>业一新闻系统3.0正式版-------业一网络Yeyi.net制作</title>
  89. </head>
  90. <body>
  91. </body>
  92. </html><% Response.Write("恭喜你,密码修改成功!请牢记你的密码。<br><a href='yns_user.asp'>返回用户管理</a>")%>
  93. <% end if %>
  94. <%
  95. rsu.Close()
  96. Set rsu = Nothing
  97. %>