qingkongfujian.asp

来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 142 行

ASP
142
字号
<!--#include file="../../Connections/oavbsconn.asp" -->
<%d=request("idd")
Dim path__u
path__u = "1"
If (Session("userssdfgfhtrh")  <> "") Then 
  path__u = Session("userssdfgfhtrh") 
End If
%>
<%
Dim path__d
path__d = "1"
If (request("idd")  <> "") Then 
  path__d = request("idd") 
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("idd") <> "") then Command1__idd = request("idd")

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 "filesupadmin/modifytzasdrgftry45taergbvcvbnegh.asp?id="&cint(d)%>






⌨️ 快捷键说明

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