%
folder= Request.QueryString( "folder" )
if folder="" then
Response.Redirect( "gallery.asp" )
Response.End
end if
Set ImgListObj=Server.CreateObject( "Scripting.FileSystemObject" )
Set ImgList= ImgListObj.OpenTextFile( Server.MapPath( "gallery/" & folder & "/filelist.txt" ), 1, FALSE, FALSE)
title= ImgList.ReadLine()
%>
<%=title%>
<%
zoom=Request.QueryString( "zoom" )
if zoom="" then
%>
<%=title%>
<%
first=CInt(Request.QueryString( "first" ))
num_images= 12
if first="" then
first= 0
end if
i= 0
while not ImgList.AtEndOfStream
line= ImgList.ReadLine()
tabpos= InStr( line, chr(9) )
if tabpos>0 then
file= Left( line, tabpos-1 )
descr= Mid( line, tabpos+1 )
if i>=first and i
<%
else
i= 0
zoom=CInt(zoom)
while not ImgList.AtEndOfStream
line= ImgList.ReadLine()
tabpos= InStr( line, chr(9) )
if tabpos>0 then
file= Left( line, tabpos-1 )
descr= Mid( line, tabpos+1 )
if i=zoom then
thedescr= descr
thefile= file
end if
i= i+1
end if
wend
ImgList.Close
Set ImgList= Nothing
Set ImgListObj= Nothing
%>