📄 deltz.asp
字号:
<%Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"%>
<!--#include file="../../Connections/leq.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="1,10"
MM_authFailedURL="../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
If (true 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
%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "通知"
If (Request("MM_EmptyValue") <> "") Then
Recordset1__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset1__MMColParam1
Recordset1__MMColParam1 = "1"
If (Session("userssdfgfhtrh") <> "") Then
Recordset1__MMColParam1 = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT id FROM infoall WHERE infoall.信息属性 = '" + Replace(Recordset1__MMColParam, "'", "''") + "' and 发送人帐号='" + Replace(Recordset1__MMColParam1, "'", "''") + "' ORDER BY infoall.最后更新时间 DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
if not Recordset1.eof or not Recordset1.bof then
Recordset1.delete
Recordset1.update
Recordset1_numRows = 0
end if
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Dim path__u
path__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
path__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim path__d
path__d = "1"
If (request("id") <> "") Then
path__d = request("id")
End If
%>
<%
Dim path
Dim path_numRows
Set path = Server.CreateObject("ADODB.Recordset")
path.ActiveConnection = MM_oavbsconn_STRING
path.Source = "SELECT 文件路径 FROM 通知附件db WHERE 通知编号 = " + Replace(path__d, "'", "''") + " AND 发送人帐号='" + Replace(path__u, "'", "''") + "'"
path.CursorType = 0
path.CursorLocation = 2
path.LockType = 1
path.Open()
path_numRows = 0
%>
<%if path.eof and path.bof then %>
<%else%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim path_total
Dim path_first
Dim path_last
' set the record count
path_total = path.RecordCount
' set the number of rows displayed on this page
If (path_numRows < 0) Then
path_numRows = path_total
Elseif (path_numRows = 0) Then
path_numRows = 1
End If
' set the first and last displayed record
path_first = 1
path_last = path_first + path_numRows - 1
' if we have the correct record count, check the other stats
If (path_total <> -1) Then
If (path_first > path_total) Then
path_first = path_total
End If
If (path_last > path_total) Then
path_last = path_total
End If
If (path_numRows > path_total) Then
path_numRows = path_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (path_total = -1) Then
' count the total records by iterating through the recordset
path_total=0
While (Not path.EOF)
path_total = path_total + 1
path.MoveNext
Wend
' reset the cursor to the beginning
If (path.CursorType > 0) Then
path.MoveFirst
Else
path.Requery
End If
' set the number of rows displayed on this page
If (path_numRows < 0 Or path_numRows > path_total) Then
path_numRows = path_total
End If
' set the first and last displayed record
path_first = 1
path_last = path_first + path_numRows - 1
If (path_first > path_total) Then
path_first = path_total
End If
If (path_last > path_total) Then
path_last = path_total
End If
End If
%>
<%
dim filestaoll,filespath
response.write filespath
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
for i =1 to path_total
filespath=path("文件路径")
If objFSO.FileExists(Server.MapPath(filespath)) Then
objFSO.DeleteFile Server.MapPath(filespath),True
end if
path.movenext
next
end if
%>
<%
if(request("id") <> "") then Command1__idd = request("id")
if(Session("userssdfgfhtrh") <> "") then Command1__u = Session("userssdfgfhtrh")
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "DELETE FROM 通知附件db WHERE 通知编号=" + Replace(Command1__idd, "'", "''") + " and 发送人帐号='" + Replace(Command1__u, "'", "''") + "' "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
path.Close()
Set path = Nothing
%>
<%response.redirect "admintzlistdfghwerth.asp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -