Voorpagina
Agenda
Foto's
Gastenboek
Video
Ledenhoek
Ledeninfo
Tranendal
Contact
Fotoalbum
Fotoalbum Ochaarm
»
Vierdaagsefeesten Cuijk 2013
[Show as slideshow]
function read_galleries() { $dir = opendir('/public/sites/www.ochaarm.nl/wp-content/nggallery/'); $i=0; while($imgfile=readdir($dir)) { if ($imgfile != "." && $imgfile!=".." && $imgfile != "thumbs" && $imgfile != "dynamic") { $imgarray[$i]=$imgfile; $i++; } } closedir($dir); $rand=rand(0,count($imgarray)-1); //$url = explode('/',$dir2); //echo $url[7]; if($rand >= 0) { return $imgarray[$rand]; } empty($imgfile); empty($imgarray); empty($rand); empty($dir); empty($dir2); } function foto_show() { $album = read_galleries(); //var_dump($album); $dir2 = '/public/sites/www.ochaarm.nl/wp-content/nggallery/'.$album.'/'; //echo $dir2; $dir=opendir($dir2); $i=0; while($imgfile=readdir($dir)) { if ($imgfile != "." && $imgfile!=".." && $imgfile != "thumbs" && $imgfile != "dynamic") { $imgarray[$i]=$imgfile; $i++; } } closedir($dir); $rand=rand(0,count($imgarray)-1); //$url = explode('/',$dir2); //echo $url[7]; if($rand >= 0) { echo '
'; //replace path, width & height sizes to fit your needs } empty($imgfile); empty($imgarray); empty($rand); empty($dir); empty($dir2); } foto_show(); foto_show(); foto_show(); ?>