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

电子政务应用

开发平台:

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. <%
  24. ' *** Edit Operations: declare variables
  25. Dim MM_editAction
  26. Dim MM_abortEdit
  27. Dim MM_editQuery
  28. Dim MM_editCmd
  29. Dim MM_editConnection
  30. Dim MM_editTable
  31. Dim MM_editRedirectUrl
  32. Dim MM_editColumn
  33. Dim MM_recordId
  34. Dim MM_fieldsStr
  35. Dim MM_columnsStr
  36. Dim MM_fields
  37. Dim MM_columns
  38. Dim MM_typeArray
  39. Dim MM_formVal
  40. Dim MM_delim
  41. Dim MM_altVal
  42. Dim MM_emptyVal
  43. Dim MM_i
  44. MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
  45. If (Request.QueryString <> "") Then
  46.   MM_editAction = MM_editAction & "?" & Request.QueryString
  47. End If
  48. ' boolean to abort record edit
  49. MM_abortEdit = false
  50. ' query string to execute
  51. MM_editQuery = ""
  52. %>
  53. <%
  54. ' *** Delete Record: declare variables
  55. if (CStr(Request("MM_delete")) = "form1" And CStr(Request("MM_recordId")) <> "") Then
  56.   MM_editConnection = MM_conn_news_STRING
  57.   MM_editTable = "t_user"
  58.   MM_editColumn = "u_id"
  59.   MM_recordId = "" + Request.Form("MM_recordId") + ""
  60.   MM_editRedirectUrl = "yns_user.asp"
  61.   ' append the query string to the redirect URL
  62.   If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
  63.     If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
  64.       MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
  65.     Else
  66.       MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
  67.     End If
  68.   End If
  69.   
  70. End If
  71. %>
  72. <%
  73. ' *** Delete Record: construct a sql delete statement and execute it
  74. If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then
  75.   ' create the sql delete statement
  76.   MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
  77.   If (Not MM_abortEdit) Then
  78.     ' execute the delete
  79.     Set MM_editCmd = Server.CreateObject("ADODB.Command")
  80.     MM_editCmd.ActiveConnection = MM_editConnection
  81.     MM_editCmd.CommandText = MM_editQuery
  82.     MM_editCmd.Execute
  83.     MM_editCmd.ActiveConnection.Close
  84.     If (MM_editRedirectUrl <> "") Then
  85.       Response.Redirect(MM_editRedirectUrl)
  86.     End If
  87.   End If
  88. End If
  89. %>
  90. <%
  91. Dim rsd__MMColParam
  92. rsd__MMColParam = "1"
  93. If (Request.QueryString("u_id") <> "") Then 
  94.   rsd__MMColParam = Request.QueryString("u_id")
  95. End If
  96. %>
  97. <%
  98. Dim rsd
  99. Dim rsd_numRows
  100. Set rsd = Server.CreateObject("ADODB.Recordset")
  101. rsd.ActiveConnection = MM_conn_news_STRING
  102. rsd.Source = "SELECT * FROM t_user WHERE u_id = " + Replace(rsd__MMColParam, "'", "''") + ""
  103. rsd.CursorType = 0
  104. rsd.CursorLocation = 2
  105. rsd.LockType = 1
  106. rsd.Open()
  107. rsd_numRows = 0
  108. %>
  109. <html>
  110. <head>
  111. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  112. <title>业一新闻系统3.0正式版-------业一网络Yeyi.net制作</title>
  113. <link href="style/css.css" rel="stylesheet" type="text/css">
  114. </head>
  115. <body>
  116. <p align="center" class="title"><strong><font color="#FF0000">请你确认删除</font></strong></p>
  117. <form name="form1" method="POST" action="<%=MM_editAction%>">
  118.   <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
  119.     <tr bgcolor="#CCCCCC"> 
  120.       <td height="4" colspan="2"></td>
  121.     </tr>
  122.     <tr> 
  123.       <td height="7" colspan="2" align="center" class="bg"></td>
  124.     </tr>
  125.     <tr> 
  126.       <td width="60%" height="25" align="center">id:</td>
  127.       <td width="44%" height="25"><%=(rsd.Fields.Item("u_id").Value)%></td>
  128.     </tr>
  129.     <tr> 
  130.       <td width="60%" height="25" align="center">名字:</td>
  131.       <td height="25"><%=(rsd.Fields.Item("u_name").Value)%></td>
  132.     </tr>
  133.     <tr> 
  134.       <td width="60%" height="25" align="center">等级:</td>
  135.       <td height="25"><%=(rsd.Fields.Item("u_level").Value)%></td>
  136.     </tr>
  137.     <tr> 
  138.       <td height="25" colspan="2" align="center"> <input type="submit" name="Submit" value="删除"></td>
  139.     </tr>
  140.   </table>
  141. <input type="hidden" name="MM_delete" value="form1">
  142.   <input type="hidden" name="MM_recordId" value="<%= rsd.Fields.Item("u_id").Value %>">
  143. </form>
  144. <p align="center"><a href="yns_user.asp">不删除,返回用户管理页。</a></p>
  145. </body>
  146. </html>
  147. <%
  148. rsd.Close()
  149. Set rsd = Nothing
  150. %>