hehe, acho q compliquei mais ainda, mas então vou colocar o código aqui que estou usando, ele tá meio grandin, mas pode ser q assim eu consiga me expressar melhor... ai vai...
<%
'Sistema de ThumbNails usando FSO
Dim strPicArray
Dim iLoop, limite, pagina, totalarq, i
Dim vlMaximo, vlMinimo, anterior
Dim ObjFso, ObjArq, ObjPasta, ObjSubPasta
'Número de colunas
picsInRow = 3
' Pasta de onde buscará as fotos
thumbFilePath = "img/"
' Cria o link para as fotos
imageFilePath = "img/"
' Pasta de onde buscará as fotos
strPhysicalPath="img/"
Set fso = CreateObject("Scripting.FileSystemObject")
set mainfolder = Fso.GetFolder(Server.MapPath(strPhysicalPath))
Set ObjPasta = Fso.GetFolder(Server.MapPath(strPhysicalPath))
Set filecollection = mainfolder.Files
limite = 9 ' limite de registros por página
totalarq = ObjPasta.files.count ' total de arquivos encontrados
ReDim thumb((totalarq-1))
Dim y
y = 0
' guardamos cada arquivo dentro de um array
For Each ObjArq in ObjPasta.Files
thumb(y) = objArq.Name
y = y + 1
Next
pagina = Request("pag")
IF pagina = "" Then
IF limite < UBound(thumb) Then
vlMinimo = 0
vlMaximo = (limite-1)
Else
vlMinimo = LBound(thumb)
vlMaximo = UBound(thumb)
End IF
pagina = 1
anterior = ""
Else
vlMinimo = (pagina*(limite-1))+(pagina)
vlMaximo = ((limite-1)*(pagina+1))+((pagina)*1)
IF vlMaximo > UBound(thumb) Then vlMaximo = UBound(thumb)
pagina = pagina + 1
anterior = pagina - 2
IF anterior = 0 Then anterior = ""
End IF
Response.Write "<div align='center'>"
Response.Write "<center>"
response.write "<table border='0' cellpadding='4'>"
intTotPics = 0
For Each file In filecollection
intTotPics = intTotPics + 1
Next
Redim strPicArray(2,intTotPics)
x = 0
For Each file in filecollection
strPicArray(0,x) = file.Name
x = x + 1
Next
%>
<%
' Esta linha lê a pasta e coloca as imagens dentro da tabela
For x = vlMinimo to vlMaximo
Response.Write "<td align='center'>"
Response.Write "<a href='" & imageFilePath & strPicArray(0,x) & "'><img src='" & thumbFilePath & strPicArray(0,x) & "' width='75' height='60' border='0'></a>"
Response.Write "<br></td>"
intPicNo = intPicNo + 1
If intPicNo=picsInRow Then
Response.write "</tr><tr>"
intPicNo = 0
End If
Next
%>
<%
Response.Write "</tr></table>"
Response.Write "</div></center>"
Response.Write "<font size='1' face='verdana'><center> Número total de fotos<br>" & intTotPics & "</center></font>"
%>
<%
IF vlMinimo = 0 Then
IF Not (vlMaximo >= (y-1)) Then
response.write "<font size='1' face='verdana'><center><a href='listar.asp?pag="& pagina &"'>próxima</a>-</center></font>"
End IF
Else
IF Not (vlMaximo >= (y-1)) Then
response.write "<font size='1' face='verdana'><center><a href='listar.asp?pag="& pagina &"'>Próxima</a>-</center></font>"
End IF
response.write "<td><font size='1' face='verdana'><center><a href='listar.asp?pag="& anterior &"'>anterior</a></center></font></td>"
End IF
%>
<font size="1" face="verdana"><center>
<%FOR X=0 TO (y/limite)%>
<A HREF="listar.asp?pag=<%=X%>"><%=X+1%></A>
<%NEXT%>
</center>
</font>
será q descompliquei ou compliquei;... hehe
---------------------------------
e se quiserem ver o código funcionando o link é este:
http://www.iporto.co...star/listar.asp
Edição feita por: iporto, 02/07/2004, 13:32.