⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delthegw.asp

📁 绿叶OA 一个功能比较全面的办公OA系统
💻 ASP
字号:
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
MM_authorizedUsers=""
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
%>
<%
Dim thewrongfiels__u
thewrongfiels__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  thewrongfiels__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim thewrongfiels
Dim thewrongfiels_numRows
Set thewrongfiels = Server.CreateObject("ADODB.Recordset")
thewrongfiels.ActiveConnection = MM_oavbsconn_STRING
thewrongfiels.Source = "SELECT 文件路径  FROM 文件信息info  WHERE 有效否 = '否' and 发送人='" + Replace(thewrongfiels__u, "'", "''") + "'"
thewrongfiels.CursorType = 0
thewrongfiels.CursorLocation = 2
thewrongfiels.LockType = 1
thewrongfiels.Open()
thewrongfiels_numRows = 0
%>

<%if not thewrongfiels.eof or not thewrongfiels.bof then 
%>


<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim thewrongfiels_total
Dim thewrongfiels_first
Dim thewrongfiels_last

' set the record count
thewrongfiels_total = thewrongfiels.RecordCount

' set the number of rows displayed on this page
If (thewrongfiels_numRows < 0) Then
  thewrongfiels_numRows = thewrongfiels_total
Elseif (thewrongfiels_numRows = 0) Then
  thewrongfiels_numRows = 1
End If

' set the first and last displayed record
thewrongfiels_first = 1
thewrongfiels_last  = thewrongfiels_first + thewrongfiels_numRows - 1

' if we have the correct record count, check the other stats
If (thewrongfiels_total <> -1) Then
  If (thewrongfiels_first > thewrongfiels_total) Then
    thewrongfiels_first = thewrongfiels_total
  End If
  If (thewrongfiels_last > thewrongfiels_total) Then
    thewrongfiels_last = thewrongfiels_total
  End If
  If (thewrongfiels_numRows > thewrongfiels_total) Then
    thewrongfiels_numRows = thewrongfiels_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (thewrongfiels_total = -1) Then

  ' count the total records by iterating through the recordset
  thewrongfiels_total=0
  While (Not thewrongfiels.EOF)
    thewrongfiels_total = thewrongfiels_total + 1
    thewrongfiels.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (thewrongfiels.CursorType > 0) Then
    thewrongfiels.MoveFirst
  Else
    thewrongfiels.Requery
  End If

  ' set the number of rows displayed on this page
  If (thewrongfiels_numRows < 0 Or thewrongfiels_numRows > thewrongfiels_total) Then
    thewrongfiels_numRows = thewrongfiels_total
  End If

  ' set the first and last displayed record
  thewrongfiels_first = 1
  thewrongfiels_last = thewrongfiels_first + thewrongfiels_numRows - 1
  
  If (thewrongfiels_first > thewrongfiels_total) Then
    thewrongfiels_first = thewrongfiels_total
  End If
  If (thewrongfiels_last > thewrongfiels_total) Then
    thewrongfiels_last = thewrongfiels_total
  End If

End If
%>
<%
dim filestaoll,filespath
  Dim objFSO  
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
   for i =1 to thewrongfiels_total
   filespath=thewrongfiels("文件路径")
 
   
If objFSO.FileExists(Server.MapPath(filespath)) Then
objFSO.DeleteFile Server.MapPath(filespath),True
end if
thewrongfiels.movenext
next

if(Session("userssdfgfhtrh") <> "") then Command1__u = Session("userssdfgfhtrh")

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "DELETE FROM 文件信息info  WHERE 有效否='否' and 发送人='" + Replace(Command1__u, "'", "''") + "' "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

end if
%>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -