$folder = dir("."); $next[] = $folder->read(); $i=0; while ($next[sizeof($next)-1]) { $next[] = $folder->read(); // $i++; // echo $next[$i]."
"; } sort($next); // for($i = 0; $i <= sizeof($next)-1; $i++) { // echo $next[$i]."
"; // } $index = 0; $index2= 0; ?>
while ($index < sizeof($next)) { for($i = 1; $i <= 4; $i++) { //echo $next[$index].(ereg("DSC.*", $next[$index], $res))."xxx"; while ((!ereg("DSC[^_]*", $next[$index], $res)) || (ereg("thumb",$next[$index], $res)) || (ereg("_1",$next[$index], $res))) { //echo " not\n"; $falsemeet++; $index++; if ($index >= sizeof($next)) break; } if ($index >= sizeof($next)) { $index2 = $index2 + 5 - $i; break; } $rightnr[$i] = $index; echo "
\n"; //echo $next[$index]."
"; $index++; $index2++; } ?>
//echo "
".$index2."
"; if ($i > 1) echo "
Bild ".$next[$rightnr[1]]."
"; if ($i > 2) echo "
Bild ".$next[$rightnr[2]]."
"; if ($i > 3) echo "
Bild ".$next[$rightnr[3]]."
"; if ($i > 4) echo "
Bild ".$next[$rightnr[4]]."
"; ?>
if ($i > 1) echo "
Download
"; if ($i > 2) echo "
Download
"; if ($i > 3) echo "
Download
"; if ($i > 4) echo "
Download
"; ?>
} ?>