rendered paste body<html><head><title>Fun with Bill and Carol</title><style type="text/css">body{background-color:#000000;}img {border-width:0px;}.pic {background-image:URL('http://www.billandcarols.com/img/picbg.gif'); background-repeat:no-repeat; text-align:center; width:90px !important; height:90px !important;}.piclink {display: block; text-decoration: none; width: 90px; height: 90px;}a {text-decoration: none;}a:link {color:#8b8a8a;}a:hover {color:#555555;}a:active {color:#999999;}a:visited {color:#555555;}</style></head><body><center><table height="100%" width="800"><tr><td width="200px"><a href="http://www.billandcarols.com/?type=1"><img src="img/homebutton.gif"></a><br><br><a href="http://www.billandcarols.com/?type=1&page=family"><img src="img/familybutton.gif"></a><br><br><?php /*if (isset($_GET['page']) == "family"){echo " <a href='http://www.billandcarols.com/?type=1&page=family&sub=dykes'>Dyke's</a><br><br> <a href='http://www.billandcarols.com/?type=1&page=family&sub=henrys'>Henry's</a><br><br> <a href='http://www.billandcarols.com/?type=1&page=family&sub=hulls'>Hull's</a><br><br>";}*/?><a href="http://www.billandcarols.com/?type=1&page=friends"><img src="img/friendsbutton.gif"></a><br><br><a href="http://www.billandcarols.com/?type=1&page=travels"><img src="img/travelsbutton.gif"></a><br><br><a href="http://www.billandcarols.com/?type=1&page=windermere"><img src="img/windermerebutton.gif"></a></td><td><table cellspacing="8" cellpadding="0" class="pictable"><tr><?phpswitch ($_GET['type']){default:echo "<td><img src='img/bclogo.gif'></td></tr></table>";break;case 1:if (isset($_GET['sub']){$sub = $_GET['sub'] . "/";}else{$sub = "";}if (isset($_GET['page'])){$predir = $_GET['page'] . "/" . $sub; $ppage = $_GET['page'];}else{$predir = "";}$rodir = $predir . "photos/";$odir = $predir . "thumbs/";ini_set(memory_limit, "6000M");if (is_dir($rodir)){ if ($dh = opendir($rodir)) { $arnum = 1; $picture = array(); while (($pic = readdir($dh)) !== false) { $count++; if ($pic != "." && $pic != "..") { if(!file_exists($odir . "thumb_" . $pic)) { $filename = $pic; list($width, $height) = getimagesize($rodir . $filename); if ($width < $height) { $newheight = "120"; $newwidth = $width * $newheight / $height; } else { $newwidth = "120"; $newheight = $height * $newwidth / $width; } $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($rodir . $filename); imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); imagejpeg($thumb, $odir . "thumb_" . $pic); } else $picture[] = $pic; } } closedir($dh); }elseecho "#2 Fail";}elseecho "#1 Fail";$start = (isset($_GET['start']) ? $_GET['start'] : 0);$end = $start+30;$thumbcounter = -1;$arrow = count($picture);foreach($picture as $num=>$picfinal){ if($num < $start || $num >= $end) continue; $thumbcounter++; $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 ($thumbcounter == 6) { $thumbcounter = 0; echo "</tr> \n <tr> \n"; } echo "<td class='pic' style='background-image:URL(" . $picbg . ") !important;'><a class='piclink' href='http://www.billandcarols.com/?type=2&page=" . $ppage . "&imgurl=" . $rodir . $picfinal . "'></a></td> \n";}echo "</tr></table><center>"; if($start >= 1) { $start = $start - 30; echo "<a href='?type=1&start=" . $start . "'><img src='http://www.billandcarols.com/img/leftarrow.gif'></a>"; $start = $start + 30;} if($count > 30 && $start+30 < $count) { $start = $start + 30; echo "<a href='?type=1&start=" . $start . "'><img src='http://www.billandcarols.com/img/rightarrow.gif'></a>"; } echo "</center>"; 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 "<td style='text-align:right;'><img width='" . $newwidth . "' src='" . $imgurl . "'><br><a href='" . $imgurl . "'><img src='http://www.billandcarols.com/img/biggerbutton.gif'></a></td>";}echo "</tr></table>";break;}?></td></tr></table></center></body></html>