

Dyke's
Henry's
Hull's
";
}*/
?>


 |
";
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);
}
else
echo "#2 Fail";
}
else
echo "#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 " |
\n