All pastes #783661 Raw Edit

Stuff

public php v1 · immutable
·published 2007-11-19 09:03 UTC
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/"><img src="img/homebutton.gif"></a><br><br><a href="http://www.billandcarols.com/?page=family"><img src="img/familybutton.gif"></a><br><br><a href="http://www.billandcarols.com/?page=friends"><img src="img/friendsbutton.gif"></a><br><br><a href="http://www.billandcarols.com/?page=travels"><img src="img/travelsbutton.gif"></a><br><br><a href="http://www.billandcarols.com/?page=windermere"><img src="img/windermerebutton.gif"></a></td><td><table cellspacing="8" cellpadding="0" class="pictable"><tr><?phpswitch ($_GET['type']){default:if (isset($_GET['page'])){$predir = $_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;  while (($pic = readdir($dh)) !== false)   {    if ($pic != "." && $pic != "..")    {    $piccount0 = $piccount0 + "1";     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); 	   $picture[] = $odir . $pic;      }    }  } closedir($dh); }elseecho "#2 Fail";}elseecho "#1 Fail";foreach($picture as $picfinal){	 $pic = str_replace(" ", "%20", $pic);	 $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 (($piccount0 % 6) == 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&imgurl=photos/" . $picfinal .  "'></a></td> \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 "<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>";};break;}?></tr></table></td></tr></table></center></body></html>