$picfinal) { if($num < $start || $num > $end) continue; $pic = str_replace(" ", "%20", $picfinal); $picbg = $odir . "thumb_" . $pic; $picbgexplode = explode(".", $picbg); $jpgs = array("J", "P", "G", "E", "e"); $jpgsrep = array("j", "p", "g", "", ""); $picbgexplode = str_replace($jpgs, $jpgsrep, $picbgexplode); if($picbgexplode[1] != "jpg") {$picbg = "http://www.billandcarols.com/img/notjpg.gif";} if (($num % 6) == 0) { echo " \n \n"; } echo " \n"; } ; break; case 2: if (isset($_GET['imgurl'])) {$imgurl = $_GET['imgurl']; list($width, $height) = getimagesize($imgurl); if ($width < $height) { if ($height > "540") {$newheight = "540"; $newwidth = $width * $newheight / $height;} } else { if ($width > "540") {$newwidth = "540"; $newheight = $height * $newwidth / $width;} } echo ""; } ; break; } ?>