<%' Now to the Runtime code: Dim strPath 'Path of directory to show Dim objFSO 'FileSystemObject variable Dim objFolder 'Folder variable Dim objItem 'Variable used to loop through the contents of the folder ' NOTE: As currently implemented, this needs to end with the / %> <% if session ("sessvar") <> 1 then response.redirect ("./includes/config.asp") end if %> <% dim ActDir,MyFile MyFile=Split(Request.ServerVariables("PATH_INFO"),"/") galname=MyFile(UBound(MyFile)-1) ActDir= "/" & galname & "/" strPath = ActDir ' Create our FSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") ' Get a handle on our folder Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) ' Show a little description line and the title row of our table %> <% =title %>
<% ' Album - Index main %> <% ' First I deal with any subdirectories. I just display them and when you ' click you go to them via plain HTTP. You might want to loop them back ' through this file once you've set it up to take a path as input. It seems ' like the logical thing to do to me at least! For Each objItem In objFolder.SubFolders ' Deal with the stupid VTI's that keep giving our visitors 404's If InStr(1, objItem, "_hidden_", 1) = 0 and InStr(1, objItem, "includes", 1) = 0 and InStr(1, objItem, "_vti", 1) = 0Then %> > <% End If Next 'objItem ' All done! Kill off our object variables. Set objItem = Nothing Set objFolder = Nothing Set objFSO = Nothing %>
<%= objItem.Name %>
> >
   

1926 Savannah Highway - Charleston, South Carolina 29407
(843) 571-5720 Fax (843) 571-3216 – info@signaturekitchenscharleston.com

© 2003 Copyright Signature Kitchens & Baths of Charleston, Inc. All Rights Reserved

Site Created by TMI Innovations Inc.