<% Sub show_main_dir ' dirtowalk="../" ' dirtowalk="/misc/" script = request.servervariables("SCRIPT_NAME") length = len(script) - len("album.asp") dirtowalk = left(cstr(script),length) Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(server.mappath(dirtowalk)) Set fc = f.SubFolders response.write "" &vbCrLf response.write "" &vbCrLf ' response.write "" &vbCrLf response.write "" &vbCrLf For Each whatever in fc ' lthumbdir = dirtowalk & whatever.name & "/lthumbs" lthumbdir = dirtowalk & whatever.name & "" If fs.FolderExists(server.mappath(lthumbdir)) Then sn = request.servervariables("SCRIPT_NAME") response.write "" &vbCrLf ' response.write "" & vbCrLf End If Next response.write "
NameOther
"&whatever.name&"------ lthumbs [" & lthumbdir & "]
" & vbCrLf End Sub Sub show_album(a_name) response.write "
" response.write "
Album DirectoryAlbum: " & Request.Querystring("album") & "" response.write "
" & vbCrLf response.write "" &vbCrLf response.write "" response.write "" response.write "
" response.write "


" & vbCrLf ' dirtowalk="../" ' dirtowalk="/misc/" script = request.servervariables("SCRIPT_NAME") length = len(script) - len("album.asp") dirtowalk = left(cstr(script),length) Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(server.mappath(dirtowalk)) Set fc = f.SubFolders if fs.folderexists(server.mappath(dirtowalk & a_name)) then ' if fs.folderexists(server.mappath(dirtowalk & a_name & "/lthumbs")) then if fs.folderexists(server.mappath(dirtowalk & a_name & "")) then ' Set f = fs.GetFolder(server.mappath(dirtowalk & a_name & "/lthumbs")) Set f = fs.GetFolder(server.mappath(dirtowalk & a_name & "")) Set fc = f.Files response.write "" &vbCrLf if request.querystring("idx") = "" then idx=1 else idx = cint(request.querystring("idx")) end if if request.querystring("cnt") = "" then cnt=10 else cnt = cint(request.querystring("cnt")) end if cidx=1 for each img in fc if (cidx >= idx) then ' if (cidx < idx+cnt) then if (cidx < idx+cnt) and lcase(right(img.name,4))=".jpg" then base = Mid(img.name, 3) response.write "" & vbCrLf end if end if cidx = cidx+1 Next response.write "
" response.write "" response.write "#" & cidx & " " & base if ((cidx+1) < idx+cnt) then response.write " NEXT " else nxtpg = request.servervariables("SCRIPT_NAME") nxtpg = nxtpg & "?album="&a_name& "&idx=" & (idx+cnt) & "&cnt=" & cnt response.write " NEXT " end if ' response.write "" response.write "
" response.write "
" else response.write "INVALID" show_main_dir end if else response.write "INVALID" show_main_dir end if End Sub If Request.Querystring("album") = "" Then response.write "Album List

" show_main_dir Else show_album(Request.Querystring("album")) End If %>