$fr = "/files" ;
$truelocal = $_GET['local'];
$ext = array("jpg","jpeg","gif","png","bmp");
$outdir = "";
$br_after = "2";
$dir = str_replace("\\", "/", dirname(__FILE__))."/";
$files = "";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
foreach ($ext as $index => $e) {
if(stristr($file, ".".$e)){
$files = str_replace("|.|..|", "", $files)."|".$file;
}
}
}
closedir($dh);
}
}
$outfiles = explode ("|", $files);
sort($outfiles);
foreach ($outfiles as $b => $value) {
if($value != ""){
echo "

";
if (($b/$br_after) == round($b/$br_after)) {
echo "
";
}
}
}
?>