yns_udel.asp
资源名称:gov_1.0.rar [点击查看]
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:5k
源码类别:
电子政务应用
开发平台:
HTML/CSS
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <!--#include file="Connections/conn_news.asp" --> <% '请尊重作者劳动成果不要删除以上信息 '业一新闻系统3.0正式版 '主页:http://yeyi.net '论坛:http://bbs.yeyi.net '业一网络 承接各种网站制作 '程序开发 软件开发业务 '业务联系 '电话: 13007310512 '联系人:郝亚平 'QQ:24344842 (只谈业务,技术问题请访问论坛) '请尊重作者劳动成果不要删除以上信息 %>
- <%
- ' *** Restrict Access To Page: Grant or deny access to this page
- MM_authorizedUsers="3"
- MM_authFailedURL="default.asp"
- MM_grantAccess=false
- If Session("MM_Username") <> "" Then
- If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
- (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
- MM_grantAccess = true
- End If
- End If
- If Not MM_grantAccess Then
- MM_qsChar = "?"
- If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
- MM_referrer = Request.ServerVariables("URL")
- if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
- MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
- Response.Redirect(MM_authFailedURL)
- End If
- %>
- <%
- ' *** Edit Operations: declare variables
- Dim MM_editAction
- Dim MM_abortEdit
- Dim MM_editQuery
- Dim MM_editCmd
- Dim MM_editConnection
- Dim MM_editTable
- Dim MM_editRedirectUrl
- Dim MM_editColumn
- Dim MM_recordId
- Dim MM_fieldsStr
- Dim MM_columnsStr
- Dim MM_fields
- Dim MM_columns
- Dim MM_typeArray
- Dim MM_formVal
- Dim MM_delim
- Dim MM_altVal
- Dim MM_emptyVal
- Dim MM_i
- MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
- If (Request.QueryString <> "") Then
- MM_editAction = MM_editAction & "?" & Request.QueryString
- End If
- ' boolean to abort record edit
- MM_abortEdit = false
- ' query string to execute
- MM_editQuery = ""
- %>
- <%
- ' *** Delete Record: declare variables
- if (CStr(Request("MM_delete")) = "form1" And CStr(Request("MM_recordId")) <> "") Then
- MM_editConnection = MM_conn_news_STRING
- MM_editTable = "t_user"
- MM_editColumn = "u_id"
- MM_recordId = "" + Request.Form("MM_recordId") + ""
- MM_editRedirectUrl = "yns_user.asp"
- ' append the query string to the redirect URL
- If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
- If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
- MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
- Else
- MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
- End If
- End If
- End If
- %>
- <%
- ' *** Delete Record: construct a sql delete statement and execute it
- If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then
- ' create the sql delete statement
- MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
- If (Not MM_abortEdit) Then
- ' execute the delete
- Set MM_editCmd = Server.CreateObject("ADODB.Command")
- MM_editCmd.ActiveConnection = MM_editConnection
- MM_editCmd.CommandText = MM_editQuery
- MM_editCmd.Execute
- MM_editCmd.ActiveConnection.Close
- If (MM_editRedirectUrl <> "") Then
- Response.Redirect(MM_editRedirectUrl)
- End If
- End If
- End If
- %>
- <%
- Dim rsd__MMColParam
- rsd__MMColParam = "1"
- If (Request.QueryString("u_id") <> "") Then
- rsd__MMColParam = Request.QueryString("u_id")
- End If
- %>
- <%
- Dim rsd
- Dim rsd_numRows
- Set rsd = Server.CreateObject("ADODB.Recordset")
- rsd.ActiveConnection = MM_conn_news_STRING
- rsd.Source = "SELECT * FROM t_user WHERE u_id = " + Replace(rsd__MMColParam, "'", "''") + ""
- rsd.CursorType = 0
- rsd.CursorLocation = 2
- rsd.LockType = 1
- rsd.Open()
- rsd_numRows = 0
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>业一新闻系统3.0正式版-------业一网络Yeyi.net制作</title>
- <link href="style/css.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <p align="center" class="title"><strong><font color="#FF0000">请你确认删除</font></strong></p>
- <form name="form1" method="POST" action="<%=MM_editAction%>">
- <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr bgcolor="#CCCCCC">
- <td height="4" colspan="2"></td>
- </tr>
- <tr>
- <td height="7" colspan="2" align="center" class="bg"></td>
- </tr>
- <tr>
- <td width="60%" height="25" align="center">id:</td>
- <td width="44%" height="25"><%=(rsd.Fields.Item("u_id").Value)%></td>
- </tr>
- <tr>
- <td width="60%" height="25" align="center">名字:</td>
- <td height="25"><%=(rsd.Fields.Item("u_name").Value)%></td>
- </tr>
- <tr>
- <td width="60%" height="25" align="center">等级:</td>
- <td height="25"><%=(rsd.Fields.Item("u_level").Value)%></td>
- </tr>
- <tr>
- <td height="25" colspan="2" align="center"> <input type="submit" name="Submit" value="删除"></td>
- </tr>
- </table>
- <input type="hidden" name="MM_delete" value="form1">
- <input type="hidden" name="MM_recordId" value="<%= rsd.Fields.Item("u_id").Value %>">
- </form>
- <p align="center"><a href="yns_user.asp">不删除,返回用户管理页。</a></p>
- </body>
- </html>
- <%
- rsd.Close()
- Set rsd = Nothing
- %>
English
