<%@ Language=VBScript %> <% Response.Buffer=true%> <% 'response.write connectstr & "
" 'response.end Set rst_filesread=nothing Set rst_filesread=Server.CreateObject("ADODB.recordset") strquery="truncate allfiles;" 'rst_filesread.Open strQuery, connectstr on error resume next 'Make each a link to run the list_pdf.asp which accepts the location then displays the photos of that folder. response.write "Search
" 'Change the following to the correct start location: ListFolder "uploads\" ' -- Main Functions ---------------------------------------------------- Sub ListFolder(path) Dim fs, rootPath Set fs = CreateObject("Scripting.FileSystemObject") rootPath = path ListFolderContents fs.GetFolder(Server.MapPath("/coslintranet/agreements/uploads")), PathEncode(rootPath) End Sub ' ---------------------------------------------------------------------- Sub ListFolderContents(folder, relativePath) Dim child Say "" End Sub ' -- Helper Functions / Shorthands --------------------------------------- Sub Say(s) Response.Write s & vbNewLine End Sub Function h(s) h = Server.HTMLEncode(s) End Function Function PathEncode(s) ' this creates a more correct variant of what Server.URLEncode would do PathEncode = Replace(s, "\", "/") PathEncode = Server.URLEncode(PathEncode) PathEncode = Replace(PathEncode, "+", "%20") PathEncode = Replace(PathEncode, "%2F", "/") PathEncode = Replace(PathEncode, "%2E", ".") PathEncode = Replace(PathEncode, "%5F", "_") End Function Function IsHidden(File) IsHidden = File.Attributes And 2 = 2 End Function %>