Codice PHP:
<?php
if (!$limit) $limit=0;
$cartella="nome_della_cartella/";
$colonne=5;
$made=0;
$da_prendere=15;
$dir = dir($cartella);
$i=0;
while ($file = $dir->read()) {
if($file != "." && $file != "..") {
if (!is_dir($cartella.$file)) {
if (strpos($file,".jpg")) {
if ($limit==$made) {
$file=substr($file,0,strpos($file,".jpg"));
$i++;
if ($i==1) echo "<tr>";
echo "<td align=\"center\" bgcolor=\"#e6e6e6\">
<a href=\"#\"onClick=\"window.open ('$cartella$file.jpg','foto', 'scrollbars=yes,status=yes,resizable=yes,top=100,l eft=150,width=550,height=500');\">
<img border=\"0\" src=\"$cartella$file.jpg\" height=\"100\" alt=\"Open Foto N° $file\"></a><br><font size=\"1\">Foto N°$file</font></td>";
if ($i>=$colonne) { echo "</tr>"; $i=0; }
}
else $made++;
}
}
}
}
$dir->close();
if ($limit) echo "<a href=nome_pagina.php?limit=".$limit-$da_prendere.">indietro</a>";
echo "<a href=nome_pagina.php?limit=".$limit+$da_prendere.">avanti</a>";
?>
(non l'ho provato...)