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

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" --> <% '请尊重作者劳动成果不要删除以上信息 '业一新闻系统3.0正式版 '主页:http://yeyi.net '论坛:http://bbs.yeyi.net '业一网络 承接各种网站制作 '程序开发 软件开发业务 '业务联系 '电话: 13007310512 '联系人:郝亚平 'QQ:24344842 (只谈业务,技术问题请访问论坛) '请尊重作者劳动成果不要删除以上信息 %>
  3. <%
  4. ' *** Restrict Access To Page: Grant or deny access to this page
  5. MM_authorizedUsers="3"
  6. MM_authFailedURL="default.asp"
  7. MM_grantAccess=false
  8. If Session("MM_Username") <> "" Then
  9.   If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
  10.          (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
  11.     MM_grantAccess = true
  12.   End If
  13. End If
  14. If Not MM_grantAccess Then
  15.   MM_qsChar = "?"
  16.   If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  17.   MM_referrer = Request.ServerVariables("URL")
  18.   if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  19.   MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  20.   Response.Redirect(MM_authFailedURL)
  21. End If
  22. %>
  23. <!--#include file="md5.asp" -->
  24. <%
  25. if(request.form("u_name") <> "") then Command1__mmname = request.form("u_name")
  26. if(request.form("u_level") <> "") then Command1__mmlevel = request.form("u_level")
  27. if(request.form("u_password") <> "") then Command1__mmpassword = md5(request.form("u_password"))
  28. %>
  29. <%
  30. Dim rsu__MMColParam
  31. rsu__MMColParam = "1"
  32. If (Request.Form("u_name") <> "") Then 
  33.   rsu__MMColParam = Request.Form("u_name")
  34. End If
  35. %>
  36. <%
  37. Dim rsu
  38. Dim rsu_numRows
  39. Set rsu = Server.CreateObject("ADODB.Recordset")
  40. rsu.ActiveConnection = MM_conn_news_STRING
  41. rsu.Source = "SELECT * FROM t_user WHERE u_name = '" + Replace(rsu__MMColParam, "'", "''") + "'"
  42. rsu.CursorType = 0
  43. rsu.CursorLocation = 2
  44. rsu.LockType = 1
  45. rsu.Open()
  46. rsu_numRows = 0
  47. %>
  48. <%
  49. If rsu.EOF And rsu.BOF Then
  50. set Command1 = Server.CreateObject("ADODB.Command")
  51. Command1.ActiveConnection = MM_conn_news_STRING
  52. Command1.CommandText = "INSERT INTO t_user (u_name, u_level, u_password)  VALUES ('" + Replace(Command1__mmname, "'", "''") + "','" + Replace(Command1__mmlevel, "'", "''") + "','" + Replace(Command1__mmpassword, "'", "''") + "') "
  53. Command1.CommandType = 1
  54. Command1.CommandTimeout = 0
  55. Command1.Prepared = true
  56. Command1.Execute()
  57. Response.Redirect "yns_user.asp"
  58. else
  59. Response.write"你的用户名已经有人使用了"
  60. End If
  61. %>
  62. <%
  63. rsu.Close()
  64. Set rsu = Nothing
  65. %>