$srcHeight) { //Empty space on top and bottom $dw=$outWidth; $dh=($dw*$srcHeight)/$srcWidth; $dy=($outHeight-$dh)/2; } else { //Empty space on left and right $dh=$outHeight; $dw=($dh*$srcWidth)/$srcHeight; $dx=($outWidth-$dw)/2; } } imagecopyresampled($imgOut,$imgSrc,$dx,$dy,0,0, $dw,$dh,$srcWidth,$srcHeight); //imagecopyresized for lower quality //Create the thumbnail and destroy everything else imagejpeg($imgOut,"thumbs/$newpath/$newpic"); imagedestroy($imgSrc); imagedestroy($imgOut); // echo "Image created successfully: $outWidth x $outHeight, ".round(filesize("thumbs/$newpath/$newpic")/1024)." KB
"; return 1; } // END FUNCTION // +--------------------------------------------------------+ // | Get The Date And Time // +--------------------------------------------------------+ $tim = date("F j, Y @ g:i A"); // +--------------------------------+ // | show the directory listing | // +--------------------------------+ if (empty($showindex)) { if (!empty($no)) { } else { } if (!empty($nodddd)) { ?> Online Photo Gallery

"; // print ""; $x = 0; $y = 1; $z = 1; $dirpj = "/$wwwpath/photos/"; $d = pscandir($dirpj); foreach ($d as $entry) { if ($entry != "." && $entry != "..") { $x = $x + 1; $y = $y + 1; $pic[$y] = "$entry"; $oldgalleri = $entry; $galleri = str_replace("."," ",$entry); $galleri = str_replace("-"," ",$entry); $galleri = str_replace("."," ",$galleri); $ax = 0; $ay = 1; $az = 1; $ad = dir("/$wwwpath/photos/$oldgalleri"); while($aentry=$ad->read()) { if ($aentry != "." && $aentry != "..") { $ax = $ax + 1; $ay = $ay + 1; $apic[$ay] = "$aentry"; } } $ad->close(); $ay=$ay-1; // +--------------------------------------------------------- // | Begin Read In Photo Gallery Information // +--------------------------------------------------------- if (file_exists("thumbs/$oldgalleri/")) { } else { // CREATE A THUMBNAIL DIRECTORY $old = umask(000); mkdir("/$wwwpath/thumbs/$oldgalleri/", 0777); umask($old); } if (file_exists("/$wwwpath/thumbs/$oldgalleri/data.txt")) { } else { $fp = fopen ("/$wwwpath/thumbs/$oldgalleri/data.txt", "w"); fputs($fp, "0::$tim::\n"); fclose ($fp); } $fd = fopen ("/$wwwpath/thumbs/$oldgalleri/data.txt", "r"); $buffer = fgets($fd, 4096); $data = split("::",$buffer); fclose ($fd); $howpic = $data[0]; $howdate = $data[1]; $howdesc = $data[2]; if ($howpic == 0) { $howpic = rand(1, $ay); if ($howpic == 0) { $howpic = 2; } if ($howpic == 1) { $howpic = 2; } if ($howpic == $ay ) { $howpic = 2; } } if ($howpic >= $ay ) { $howpic = 2; } // +--------------------------------------------------------- // | End Read In Photo Gallery Information // +--------------------------------------------------------- print " "; print " "; print " "; print " "; print " "; print " "; // print ""; } } print "
HEADER 
 $galleri
"; print "


"; // echo "THIS IS IS photos/$oldgalleri/$apic[$howpic]

"; if (file_exists("thumbs/$oldgalleri/")) { } else { // CREATE A THUMBNAIL DIRECTORY $old = umask(000); mkdir("/$wwwpath/thumbs/$oldgalleri/", 0777); umask($old); } if (file_exists("thumbs/$oldgalleri/$apic[$howpic]")) { } else { // CREATE A THUMBNAIL FOR THIS PICTURE img_resize("photos/$oldgalleri/$apic[$howpic]", "$apic[$howpic]", "$oldgalleri"); } print "
 

"; print "
"; print "


"; print " Pictures:$ay            "; print "
Last Updated:$howdate

"; print " $howdesc

"; print "
"; print "
 

Return To Web Site   $galleri

 


 

"; // print " "; // print ""; // print "


BELLAVISTA MISSIONARY BAPTIST CHURCH
"; // print "Weekly Office Hours: 9 to 5  713-692-3944 ---- 24 Hour Prayer Line Number  713-694-7724
Tape Ministry Order Number  713-694-7132
 

"; } } // +--------------------------------------+--------------------------------------------+ // +--------------------------------+ // | show the main index right here | LION // +--------------------------------+ if (empty($showindex)) { if (empty($gallery)) { print ""; print ""; print ""; print ""; print ""; } } if (!empty($showindex)) { $ad = dir("/$wwwpath/photos/$showindex"); while($aentry=$ad->read()) { if ($aentry != "." && $aentry != "..") { $ax = $ax + 1; $ay = $ay + 1; } } $ad->close(); $gallery = str_replace("."," ",$showindex); $gallery = str_replace("-"," ",$showindex); ?> Online Photo Gallery "; ?>
 Return To Web Site   $gallery ($ax Pictures) 

"; $x = 0; $y = 1; $z = 1; $d = dir("/$wwwpath/photos/$showindex"); while($entry=$d->read()) { if ($entry != "." && $entry != "..") { $x = $x + 1; $y = $y + 1; $pic[$y] = "$entry"; } } $d->close(); $d = dir("/$wwwpath/photos/$showindex"); $last = "none"; $x = 0; while($entry=$d->read()) { if ($x == "5") { $x = 0; print ""; } if ($entry != "." && $entry != "..") { $x = $x + 1; $z = $z + 1; $zb = $z -1; $zn = $z +1; if (file_exists("thumbs/$showindex/$entry")) { } else { // CREATE A THUMBNAIL FOR THIS PICTURE img_resize("photos/$showindex/$entry", "$entry", "$showindex"); } // blahs if ($page == 0) { $page = 1; } $ch2 = $page*20; $ch1 = $ch2-20; if ($zb > $ch1 && $zb <= $ch2) { print ""; } } } $d->close(); ?>



 


Page  $i "; } ?>
 

 

Online Photo Gallery "; ?>
read()) { if ($entry != "." && $entry != "..") { $x = $x + 1; $y = $y + 1; $pic[$y] = "$entry"; } } $d->close(); $hay = $y; $hay = $hay-1; print "

 Return To Web Site   $gallery ($hay Pictures) 

 
"; print "
 "; $ano = $no; $ay = $y; $ano = $ano-1; $ay = $ay-1; //print "hi $ano $ay"; if ($no == "2") { $zb = "2"; } if ($no >= $y) { // print " "; //print "


 

"; print "

"; //print "
[
Previous Photo ] [ Photo Gallery ] [ Index Page ] [ Photo 4 of 31 ] [ Next Photo ]
 

"; print ""; print ""; } else { print " "; //print "


"; print "[
Previous Photo ] "; print "[ Photo Gallery ] [ Index Page ] [ Photo $ano of $ay "; print "] [ Next Photo ]
 

"; print "

"; //print "
[
Previous Photo ] [ Photo Gallery ] [ Index Page ] [ Photo 4 of 31 ] [ Next Photo ]
 

"; print ""; print ""; } } ?>


"; print "[
Previous Photo ] "; print "[ Photo Gallery ] [ Index Page ] [ Photo $ano of $ay "; print "] [ Next Photo ]