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

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  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. <%
  24. if(request("s_name") <> "") then Command1__varname = request("s_name")
  25. if(request("s_id") <> "") then Command1__varid = request("s_id")
  26. %>
  27. <%
  28. set Command1 = Server.CreateObject("ADODB.Command")
  29. Command1.ActiveConnection = MM_conn_news_STRING
  30. Command1.CommandText = "UPDATE t_stype  SET s_name = '" + Replace(Command1__varname, "'", "''") + "'  WHERE s_id = " + Replace(Command1__varid, "'", "''") + ""
  31. Command1.CommandType = 1
  32. Command1.CommandTimeout = 0
  33. Command1.Prepared = true
  34. Command1.Execute()
  35. %>
  36. <html>
  37. <head>
  38. <meta http-equiv="Refresh" content="1 url=yns_stype.asp">
  39. </head>
  40. <body>
  41. 正在更新数据库... 
  42. </body>
  43. </html>