Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ae galera beleza? Bom estou tentando fazer com que esse "script" liste todas as imagens de um diretorio..
só que é o seguinte...
eu gostaria que quando ele listasse as fotos, ja listasse elas da seguinte maneira
foto01 | foto02 | foto03 | foto04
------------------------------------
foto05 | foto06 | foto07 | foto08
só que deste jeito que o script se encontra.. ele lista da seguinte maneira...
foto01 | foto01 | foto01 | foto01
------------------------------------
foto02 | foto02 | foto02 | foto02
------------------------------------
foto03 | foto03 | foto03 | foto03
abaixo segue o cod.
<html>
<head>
<script type="text/javascript" language="javascript" src="lytebox.js"></script>
<link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />
</head>
<body>
<table width="80%" border="0" cellspacing="3" cellpadding="3">
<?php
$dirhandle = opendir("$dir");
while ($arquivos = readdir($dirhandle)) {
if($arquivos != "." && $arquivos != ".."){
?><tr>
<td><a href="<? echo "$dir/$arquivos" ?>" rel="lytebox" title="IMG"><img src="thumb.php?imagem=<? echo $arquivos ?>&wt=100&ht=100" border="0"></a></td>
<td><a href="<? echo "$dir/$arquivos" ?>" rel="lytebox" title="IMG"><img src="thumb.php?imagem=<? echo $arquivos ?>&wt=100&ht=100" border="0"></a></td>
<td><a href="<? echo "$dir/$arquivos" ?>" rel="lytebox" title="IMG"><img src="thumb.php?imagem=<? echo $arquivos ?>&wt=100&ht=100" border="0"></a></td>
<td><a href="<? echo "$dir/$arquivos" ?>" rel="lytebox" title="IMG"><img src="thumb.php?imagem=<? echo $arquivos ?>&wt=100&ht=100" border="0"></a></td>
</tr>
<?
}
}
?>
</table>
</body>
</html>
PS: Sei que esta cheio de lixo, mas to tentando faze funciona isso.. ai depois que estiver OK
eu melhoro o cod e tudo mais..
valeu!
Carregando comentários...