$height) && ($width > $a) && ($height > $b)) { $size = $a/$width; $c = $width*$size; $d = $height*$size; if($d > $b) { $size = $b/$d; $c = $c*$size; $d = $d*$size; } } else if(($width > $height) && ($width > $a) && (($height < $b) || ($height == $b))) { $size = $a/$width; $c = $width*$size; $d = $height*$size; } else if(($width < $height) && ($width > $a) && ($height > $b)) { $size = $b/$height; $c = $width*$size; $d = $height*$size; if($c > $width) { $size = $c/$width; $c = $c*$size; $d = $d*$size; } } else if(($width < $height) && ($height > $b) && (($width < $a) || ($width == $a))) { $size = $b/$height; $c = $width*$size; $d = $height*$size; } else if(($width == $height)) { $size = $b/$height; $c = $width*$size; $d = $height*$size; } else if((($width == $a) && ($height == $b)) || (($width < $a) && ($height < $b))) { $c = $width; $d = $height; } } $pic_title = $row['title']; $pic_writer = $row['writer']; $pic_main = $row['main']; include template('index_test'); ?>