<?php $ordner = opendir("bilder");
echo '<table>';
echo '<tr>';
while(true == ($dir_nam = readdir($ordner))){
if(($dir_nam != ".") AND ($dir_nam != "..")){
if(is_dir("./bilder/".$dir_nam)){
$unter = opendir("./bilder/".$dir_nam);
$namen = array();
while(true == ($bild_nam = readdir($unter))){
if(($bild_nam != ".") AND ($bild_nam != "..")){
array_push($namen, $bild_nam);
}
}
echo '<td>';
echo '<a href="index.php?section=gal&ordner='.$dir_nam.'">';
echo '<img src="./bilder/'.$dir_nam.'/'.$namen[0].'" height="100" width="100" border="1"><br>';
echo $dir_nam;
echo '</a>';
echo '</td>';
}
}
}
echo '</tr>';
echo '</table>';
?>