%
Dim selected_folder
selected_folder = Request.querystring("folder")
if selected_folder <> "" then
selected_folder = selected_folder & "/"
end if
Function showFolders()
''if this is a subfolder view, just print a "back" link
if selected_folder <> "" then
Response.Write ("
Back to main Photo Album page")
else
Application.Lock
'Set up file getter and counter
Dim objFSO, objFile, objFileItem
dim strFSO, strFile, strFolderItem
dim textFile
'initialize the objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
set objFolder = objFSO.GetFolder(server.MapPath("./" & selected_folder ))
dim objFolderContents
set objFolderContents = objFolder.SubFolders
for each objFileItem in objFolderContents
folderstr = objFileItem.Name
if folderstr <> "_vti_cnf" then
Response.Write("
" & folderstr & " " & vbNewline )
end if
next
set FSO = nothing
application.unlock
end if
end function
Function showPictures()
application.lock
'Set up file getter and counter
Dim objFSO, objFile, objFileItem
dim strFSO, strFile, strFolderItem
dim textFile
'initialize the objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
set objFolder = objFSO.GetFolder(server.MapPath("./" & selected_folder ))
dim objFolderContents
set objFolderContents = objFolder.files
dim strFolderCount
strFolderCount=objFolderContents.Count
for each objFileItem in objFolderContents
imgstr = objFileItem.Name
if imgstr <> "default.asp" then
Response.Write("" & vbNewline )
end if
next
set FSO = nothing
application.unlock
end function
%>
TIKARO: dynamic photo album
PHOTO ALBUM
This is a dynamic script that shows all photos in the folder. I don't give
this URL out. Therefore, if you've found this page your own, you're welcome to draw whatever conclusions
you like about my darkest secrets (monocle fetish, etc.)Other Folders:
<% showFolders() %>
Images in <%= selected_folder %>:
<% showPictures() %>