<%LANGUAGE="VBSCRIPT"%> <% Dim BaseGalleryDir Dim GalleryName Dim GalleryDir Dim TmpGalleryDir Dim PeviousImage Dim NextImage Dim GalleryPageDir GalleryName="Jimmy Buffet" TmpGalleryDir="/Images/Buffet" BaseGalleryDir="Buffet/" Response.Write("Creative Staging Systems " & GalleryName & " Photo Gallery") Response.Write("") %>
   

: STAGING : PRODUCTION : MANAGEMENT : SET CONSTRUCTION : PICTURES : BROCHURE : CONTACT :

<% Response.Write("") Response.Write("
Creative Staging Systems " & GalleryName & " Photo Gallery
") Response.Write("") Response.write("") Response.Write("") ' Get directory list Dim strPath ' Path of directory to read Dim objFSO ' FileSystemObject variable Dim objFolder ' Folder variable Dim objFile ' File variable used to loop through the files ' A recordset object variable and some constants Dim rstFiles Const adVarChar = 200 Const adInteger = 3 Const adDate = 7 ' Set the path to our folders. strPath= Server.MapPath(TmpGalleryDir & "/thumbnails") GalleryDir=(TmpGalleryDir & "/thumbnails") GalleryPageDir=(TmpGalleryDir & "/images") 'Response.Write(gallerydir) ' Set session variables for paths and gallery name session("GalleryPageDir")=GalleryPageDir session("albumName")=GalleryName session("TmpGalleryDir")=TmpGalleryDir ' Create our FSO and get a handle on our folder Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(strPath) ' Im ignoring and subdirectories and just dealing with the files ' in the specified folder. Build Recordset of thumbnails Set rstFiles = Server.CreateObject("ADODB.Recordset") rstFiles.Fields.Append "Name", adVarChar, 255 rstFiles.Fields.Append "Size", adInteger rstFiles.Fields.Append "Date", adDate rstFiles.Fields.Append "Type", adVarChar, 255 rstFiles.Open ' Loop through the files adding the information to our Recordset For Each objFile In objFolder.Files rstFiles.AddNew rstFiles.Fields("name").Value = objFile.Name rstFiles.Fields("size").Value = objFile.Size rstFiles.Fields("date").Value = objFile.DateCreated rstFiles.Fields("type").Value = objFile.Type Next 'objFile 'count to see how many files we have dim RecordCount RecordCount=0 rstFiles.movefirst Do Until rstFiles.EOF rstFiles.MoveNext RecordCount = RecordCount + 1 Loop 'Copy array to a session array to be used by the other pages set Session("rstFiles")= rstFiles 'response.write recordCount 'Create the table of thumb nails Response.Write("
 
") Response.Write("") RecordCount=0 rstFiles.movefirst do until rstfiles.eof Dim strInput ' String to hold our entered number Dim strCurrentName ' Var for storing each FileName without extension Dim I ' String Length with out extension 'Set strinput strInput=rstfiles.fields("name").value I= Len(strInput) - 4 strCurrentName = Mid(strInput, 1, I) Response.Write("") Response.Write("") ' Count 8 per row of the table RecordCount = RecordCount + 1 if recordCount= 8 then Response.Write("") Response.Write("") RecordCount=0 end if rstFiles.MoveNext Loop Response.Write("") ' All done! Kill off our File System Object variables. Set objFile = Nothing Set objFolder = Nothing Set objFSO = Nothing Set RstFiles = Nothing %>