';
$handle=opendir('photos/'.$_GET['gal_id'].'/');
while (($file = readdir($handle))!==false) {
if($file!=".." AND $file!="." AND $file) {
$photos[] = $file;
}
}
closedir($handle);
arsort($photos);
foreach($photos as $file){
$photo = $_GET['gal_id']."/".$file;
//$exif = exif_read_data('photos/'.$photo, 0, true);
$norm_height=384;
list($width, $height, $type, $attr) = getimagesize("photos/".$photo);
$new_width= ($norm_height/$height)*$width;
// echo '

';
echo '

';
}
echo '