%
'###################################################################
'# Image Gallery v1.0
'#
'# This script will automatically create links for thumbs
'# and links to the full image. You just need to upload the
'# Full Image and the Thumbnail in the right directories.
'# All underscores ('_') in directories & FileNames will be
'# replaced by Spaces. The FileName will apear on top of the
'# page when you view the full Image.
'#
'# It will create a Previous & Next link to limit the amount
'# of thumbs showed on a page and also when you view a Full
'# Image. This way you don't need to return to the thumbs.
'#
'# Created by Sebastien Morel
'# Contact me on 'Dragonfly4@desertmail.com' for bugs or comments
'###################################################################
%>
<%Option Explicit%>
<%
On Error Resume Next
Folder = Request("Folder")
FileNbr = Request("imgNbr")
ImageFilePath = myFolder + "/" + Request("Folder")
counter = 0
lImgCounter = 0
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(ImageFilePath))
For Each objFile In objFolder.Files
strFileExtension = LCase(Mid(objFile.Name, InStrRev(objFile.Name, ".", -1, 1) + 1))
If strFileExtension = "gif" Or strFileExtension = "jpg" Then
If (CLng(counter) = CLng(FileNbr)) then
imgCurrentBaseName = objFSO.GetBaseName(objFile.Name)
lImgCounter = lImgCounter + 1
ShowImageLink = "
"
CurrentFileName = objFSO.GetBaseName(objFile.Name)
FileNameSpaces = Replace(CurrentFileName,"_"," ")
End If
counter = counter + 1
End If
Next
%>
Imagen completa
<%
Response.Write ShowImageLink
ThumbNextLink = CLng(FileNbr) + 1
ThumbPreviousLink = CLng(FileNbr) - 1
%>
|
<% If (CLng(FileNbr)) > 0 Then %>
<% End If %>
<% If (CLng(FileNbr) < (CLng(counter)) - 1) Then %>
<% End If %>
|
<%
Set objFSO = Nothing
Set objFolder = Nothing
%>