 |
 |
| |
<%
Dim oFSO, oFolder, oFolders, oFile, strPhysicalPath
'Initialize counter for file counting
intCount = 0
'Get a reference to the scripting library
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
'Set the path to the images
strPhysicalPath = Server.MapPath("fGaleria")
'Set a reference to the folder with the images
Set oFolder = oFSO.GetFolder(strPhysicalPath)
iNumFicheros = oFolder.Files.Count - 1
Response.Write("Nº Fotos: " & _
iNumFicheros & " " & iContador & " de " & iNumFicheros & "")
ReDim aNomImagenes(CInt(iNumFicheros))
'Create a files collections
Set oFolders = oFolder.Files
'Begin enumerating through the files
For Each oFile in oFolders
aNomImagenes(intCount) = oFile.Name
intCount = intCount + 1
Next
For iContador1 = CInt(iContador) To iNumFicheros
If (iContador1 <= (iContador + 19)) Then
Response.Write("")
'Response.Write("
")
Else
If (CInt(iContador - 20) < 0) Then
iContadorI = 0
Else
iContadorI = iContador - 20
End If
If (CInt(iContador + 20) > CInt(iNumFicheros)) Then
iContadorF = iContadorI
Else
iContadorF = iContador + 20
End If
Exit For
End If
If (CInt(iContador1) = CInt(iNumFicheros-1)) Then
iContadorF = iContador
iContadorI = iContador - 20
Exit For
End If
Next
'Destory the objects and clean up
Set oFSO = Nothing
Set oFolder = Nothing
Set oFolders = Nothing
Set oFile = Nothing
%>
|
|
 |
|
 |
|
|
 |
|