<% if request.QueryString("Path")="" then URL_start="gallery.asp?Path=images&Series=superbowl&ImageNumber=1" 'response.Redirect(URL_start) 'response.end() end if %> <%'Option Explicit%> <%Response.Buffer = "True"%> <% DIM count_files, album, year_albums() ' dictionary of names Set nombres = Server.CreateObject("Scripting.Dictionary") nombres.Add "Superbowl 2019 select compressed", "Superbowl 2019" nombres.Add "Superbowl 2018 select compressed", "Superbowl 2018" nombres.Add "Superbowl 2017 select compressed", "Superbowl 2017" nombres.Add "Superbowl 2016 select compressed", "Superbowl 2016" nombres.Add "Superbowl 2015 select compressed", "Superbowl 2015" nombres.Add "Superbowl 2014 select compressed", "Superbowl 2014" nombres.Add "Superbowl 2013 select compressed", "Superbowl 2013" nombres.Add "Superbowl 2012 select compressed", "Superbowl 2012" nombres.Add "Superbowl 2011 select compressed", "Superbowl 2011" nombres.Add "Superbowl 2010 select compressed", "Superbowl 2010" nombres.Add "Superbowl 2009 select compressed", "Superbowl 2009" nombres.Add "Superbowl 2008 select compressed", "Superbowl 2008" function MapURL(path) dim rootPath, url 'Convert a physical file path to a URL for hypertext links. rootPath = Server.MapPath("/") url = Right(path, Len(path) - Len(rootPath)) MapURL = Replace(url, "\", "/") end function FUNCTION list_images(path,album) dim fs, folder, file, item, url,images set fs = CreateObject("Scripting.FileSystemObject") set folder = fs.GetFolder(path&"/"&album) for each item in folder.Files FileExtention = LCase(Right((item.Name), 4)) If FileExtention = ".jpg" Then images= images & "" 'images = images & "" & vbCrLf 'images = images & "" & vbCrLf 'images = images &"" & vbCrLf count_files = count_files+1 END IF next list_images=images END FUNCTION FUNCTION folders2_cats(path) 'Set fso = CreateObject("Scripting.FileSystemObject") ' Set f = fso.GetFolder(path) ' Set fc = f.Files ' Set ff = f.SubFolders ' For Each f1 in ff ' Response.Write ff &"
" ' Next '----------------------- 'Set FSO = CreateObject("Scripting.FileSystemObject") 'Set folder = FSO.GetFolder(path) 'For each subfolder in folder.SubFolders 'SubCNombre = Subfolder.Name ''Response.Write SubCNombre &"
" 'albums=albums& "
"&SubCNombre&"
" 'folders2_cats=albums 'next Set nombres2 = Server.CreateObject("Scripting.Dictionary") nombres2.Add "Superbowl 2019 select compressed", "Superbowl 2019" nombres2.Add "Superbowl 2018 select compressed", "Superbowl 2018" nombres2.Add "Superbowl 2017 select compressed", "Superbowl 2017" nombres2.Add "Superbowl 2016 select compressed", "Superbowl 2016" nombres2.Add "Superbowl 2015 select compressed", "Superbowl 2015" nombres2.Add "Superbowl 2014 select compressed", "Superbowl 2014" nombres2.Add "Superbowl 2013 select compressed", "Superbowl 2013" nombres2.Add "Superbowl 2012 select compressed", "Superbowl 2012" nombres2.Add "Superbowl 2011 select compressed", "Superbowl 2011" nombres2.Add "Superbowl 2010 select compressed", "Superbowl 2010" nombres2.Add "Superbowl 2009 select compressed", "Superbowl 2009" nombres2.Add "Superbowl 2008 select compressed", "Superbowl 2008" allKeys = nombres2.Keys 'Get all the keys into an array allItems = nombres2.Items 'Get all the items into an array For i = 0 To nombres2.Count - 1 'Iterate through the array myKey = allKeys(i) 'This is the key value myItem = allItems(i) 'This is the item value ' Response.Write("The " & i & " value in the Dictionary is " & myItem & "
") albums=albums& "
"&myItem&"
" folders2_cats=albums Next 'remove all the items 'objDict.RemoveAll 'free up resources 'set objDict=nothing END FUNCTION FUNCTION nueva_folder(carpeta) Set fso = CreateObject("Scripting.FileSystemObject") if (Not fso.FolderExists(path&"\"&carpeta)) then Set fol = fso.CreateFolder(path&"\"&carpeta) ELSE response.Write("already exist") end if END FUNCTION '------------------------------ path= Server.MapPath("images/gallery") IF REQUEST.QueryString("album")="" THEN album="Superbowl 2019 select compressed" ELSE album= REQUEST.QueryString("album") END IF navigation= list_images(path,album) 'response.Write(list_images(path,album) ) IF request.QueryString("nueva")<>"" THEN nueva_folder(request.QueryString("nueva")) END IF albumes=folders2_cats(path) %> Super Bowl Party
 
  gallery
 

Select Album Year

<%= albumes %>

<%=nombres.Item(album) %>

<%=navigation%>
 
 
 
 
 
© 1999-2020 Jai Sawhney. All Rights Reserved.