$dir = opendir($rep);
while ($f = readdir($dir))
if(is_file($rep.$f)) {
//vérifie s'il y a un thumbnail et le place.
$tab = explode(".",$f);
if (file_exists($rep."gallery_thumb/".$tab[0].".jpg")) {
?>
">
} elseif (file_exists($rep."gallery_thumb/".$tab[0].".jpeg")) {
?>
">
} elseif (file_exists($rep."gallery_thumb/".$tab[0].".gif")) {
?>
">
} elseif (file_exists($rep."gallery_thumb/".$tab[0].".png")) {
?>
">
} else {
?>
}
}
closedir($dir); ?>