testfnames.asp

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

ASP
69
字号
<%dim fset
fset=upload.Form("f")
%>
<%    dim path
    path="../../dataandfiles/files/tz/"
  Dim objFSO1
  Set objFSO1= Server.CreateObject("Scripting.FileSystemObject")
  If  objFSO1.FolderExists(Server.MapPath(path))   Then   
Else   
objFSO1.CreateFolder(Server.MapPath(path))
Set objFSO1 = Nothing
End   If   
  dim path1
    path1="../../dataandfiles/files/tz/"&session("bumen")&"/"
  Dim objFSO11
  Set objFSO11= Server.CreateObject("Scripting.FileSystemObject")
  If  objFSO11.FolderExists(Server.MapPath(path1))   Then   
Else   
objFSO11.CreateFolder(Server.MapPath(path1))
Set objFSO11 = Nothing
End   If
  dim fp
fp=path1&File.FileName
'fp=File.FileName
Dim testfname__MMColParam
testfname__MMColParam = "1"
If (fp <> "") Then 
  testfname__MMColParam = fp
End If
%>
<%
Dim testfname
Dim testfname_numRows
Set testfname = Server.CreateObject("ADODB.Recordset")
testfname.ActiveConnection = MM_oavbsconn_STRING
testfname.Source = "SELECT ID  FROM 通知附件db  WHERE 文件路径 = '" + Replace(testfname__MMColParam, "'", "''") + "'"
testfname.CursorType = 0
testfname.CursorLocation = 2
testfname.LockType = 1
testfname.Open()
testfname_numRows = 0
%>
<%if not testfname.eof or not testfname.bof then
if fset="3" then
response.write fset
response.redirect("../gw/wrong.asp")
'response.end()
end if
%>
<%if fset="1" then
dim num1
dim rndnum
Randomize
Do While Len(rndnum)<5
num1=CStr(Chr((6-4)*rnd+4))
rndnum=rndnum&num1
loop
o1=o&date()&"-"&hour(now())&"-"&minute(now())&"-"&second(now())&"_"&rndnum&"OA自动更名"

response.write o1
'response.end()
'path1=path1&o1
end if
end if%>
<%
testfname.Close()
Set testfname = Nothing
%>

⌨️ 快捷键说明

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