<%@ Language=VBScript %> <% Option Explicit Response.Expires = -1 Dim folpath, goingup, ImageGalleryPath folpath = Request.QueryString("loc") goingup = Request.QueryString("u") ImageGalleryPath = Request.QueryString("GP") If Right(ImageGalleryPath,1) <> "/" Then ImageGalleryPath = ImageGalleryPath & "/" End If If folpath <> "" And goingup <> "y" Then folpath = folpath & "/" End If Function Showbrowse_Img(spec) Dim f, sf, fol, fc, fil, s, ext, counter Dim fso Set fso = Server.CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(spec) Set sf = f.SubFolders s = s & "" For Each fol In sf 'add the html for the folders s = s & "" & vbcrlf Next Set fc = f.Files For Each fil In fc 'add the html for the files If (InStr(fil.name, ".gif" ) <> 0) Or (InStr(fil.name, ".jpg" ) <> 0) Or (InStr(fil.name, ".png" ) <> 0 ) Or (InStr(fil.name, ".bmp" ) <> 0 )Then s = s & "" & vbcrlf End If Next s = s & "
" & vbcrlf s = s & " " & fol.name & "  
" & vbcrlf s = s & "
" s = s & fil.name & "
" Showbrowse_Img = s set f=nothing set fso=nothing End Function Function GetExtension(str_FileName) GetExtension = LCase(Right(str_FileName,(Len(str_FileName)-InStrRev(str_FileName,".")))) End Function %> <% Response.Write Showbrowse_Img(Server.MapPath(ImageGalleryPath & folpath)) %>