/? $dir = "img/galerie";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
?>
/?
$i=0;
$images = array();
while (($file = readdir($dh)) !== false) {
if ( $file !="zoom" && $file !="." && $file !="Thumbs.db" && $file !="thumbs.db" && $file !=".." && $file !="_notes" && $file !="_notes"){
$images[$i] = $file;
$i++;
}
}
$rand_image = array_rand($images, 40);
for ( $j=0; $j<40 ; $j++){
?>

/? }} ?>
/? } ?>