📄 deluser.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="2"
MM_authFailedURL="admuserlogin.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
MM_editAction = CStr(Request("URL"))
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")) <> "" And CStr(Request("MM_recordId")) <> "") Then
MM_editConnection = MM_conn_STRING
MM_editTable = "yonghu"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId") + ""
MM_editRedirectUrl = "adminok.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
%>
<%
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_conn_STRING
Rs.Source = "SELECT * FROM yonghu"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 3
Rs.Open()
Rs_numRows = 0
%>
<html>
<head>
<title>删除用户确认</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="files/cssresult.css" type="text/css">
<link rel="stylesheet" href="../files/cssresult.css" type="text/css">
</head>
<body bgcolor="#CCCCCC" text="#000000" background="../files/bg.jpg" leftmargin="0" topmargin="0">
<p align="center"><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"><img src="top.gif" width="777" height="106" usemap="#Map" border="0" align="middle"></span></font></b></font></b></font></b></font></b></font><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult">
<map name="Map">
<area shape="rect" coords="7,79,59,104" href="../index1.asp" target="_self">
<area shape="rect" coords="62,79,113,106" href="../search.asp" target="_self">
<area shape="rect" coords="116,78,208,103" href="../add.asp" target="_self">
<area shape="rect" coords="307,77,359,103" href="admuserlogin.asp" target="_self">
<area shape="rect" coords="697,75,749,103" href="loginout.asp" target="_self">
<area shape="rect" coords="640,75,693,103" href="../index.asp" target="_self">
<area shape="rect" coords="212,78,303,103" href="../view.asp" target="_self">
<area shape="rect" coords="686,4,764,40" href="../help.htm" target="_blank">
</map>
</span></font></b></font></b></font></b></font></b></font><font color="#0000FF"></font></b></font></b></font><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult">
</span></font></b></font></b></font></p>
<p align="center"><font color="#660000"><b class="cssindexda">真的要删除用户<font color="#0000FF"><%=Rs("uxinming")%></font>吗?</b></font></p>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="formreg">
<table width="38%" border="0" cellspacing="0" cellpadding="0" align="center" height="188" class="cssresult">
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">用户名:</font></td>
<td class="cssresult" width="66%"><%=Rs("uname")%> </td>
</tr>
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">密码:</font></td>
<td class="cssresult" width="66%"><%=Rs("upassword")%></td>
</tr>
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">真实姓名:</font></td>
<td class="cssresult" width="66%"><%=Rs("uxinming")%> </td>
</tr>
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">访问级别:</font></td>
<td class="cssresult" width="66%"><%=Rs("uaccesslevel")%></td>
</tr>
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">所属部门:</font></td>
<td class="cssresult" width="66%"><%=Rs("ubumen")%> </td>
</tr>
<tr>
<td class="cssresult" width="34%"><font color="#0000FF">联系电话:</font></td>
<td class="cssresult" width="66%"><%=Rs("uphone")%> </td>
</tr>
<tr>
<td class="cssresult" width="34%" height="22"><font color="#0000FF">申请用途:</font></td>
<td class="cssresult" width="66%" height="22"><%=Rs("uyongtu")%> </td>
</tr>
<tr>
<td class="cssresult" width="34%" height="21"><font color="#0000FF">个人信息:</font></td>
<td class="cssresult" width="66%" height="21"><%=Rs("uxinxi")%> </td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="我要删除">
</div>
<input type="hidden" name="MM_delete" value="true">
<input type="hidden" name="MM_recordId" value="<%= Rs.Fields.Item("ID").Value %>">
</form>
</body>
</html>
<%
Rs.Close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -