50 && $height > 50){ $files[] = $filename; } } } $count = 20; /* if (count($files) == 0) { throw new Exception("No image files were found"); } */ shuffle($files); if (count($files) > $count) { array_splice($files, $count); } closedir($dh); ?>
400){ $wide = floor(600 * (400/$high)); $high = 400; } /* error_log($imgsize.' '.$wide.'px '.$high.'px '.$file); */ $left = floor((600-$wide)/2); If($left < 0 ) $left = 0; echo ''; $first = false; } ?>