= $im_height) { $factor = GALLERY_THUMB_SIZE / $im_width; $new_width = GALLERY_THUMB_SIZE; $new_height = $im_height * $factor; } else { $factor = GALLERY_THUMB_SIZE / $im_height; $new_height = GALLERY_THUMB_SIZE; $new_width = $im_width * $factor; } // resize $new_im = ImageCreate($new_width,$new_height); ImageCopyResized($new_im, $im, 0, 0, 0, 0, $new_width, $new_height, $im_width, $im_height); Imagepng($new_im, '', 100); // quality 100 Imagepng($new_im, $file . '_thumb', 100); // quality 100 // cleanup ImageDestroy($im); ImageDestroy($new_im); } function showHtmlPointers() { global $gallery, $filedb; if (($_GET['from'] - GALLERY_MAX) >= 1) { $x = 'Terug '; } $total = ($filedb['count'] / GALLERY_MAX); if ($total > 1) { for ($i = 0; $i < $total; $i++) { $x .= '' . ($i +1) . ' '; } } if ($_GET['from'] + GALLERY_MAX <= $filedb['count']) { $x .= 'Volgende '; } return $x; } function previewPicture($picture) { $x = getimagesize($picture); $width = $x[0]; $height = $x[1]; if ($height > $width) { $percentheight = 100; $percentwidth = round($width / ($height / 100)); $newimageheight = GALLERY_THUMB_SIZE; $newimagewidth = round((GALLERY_THUMB_SIZE / 100) * $percentwidth); } else { $percentheight = round($height / ($width / 100)); $percentwidth = 100; $newimagewidth = GALLERY_THUMB_SIZE; $newimageheight = round((GALLERY_THUMB_SIZE / 100) * $percentheight); } return ''; // load picture } function fileSizeDisplay($file_size) { if ($file_size >= 1073741824) { $file_size = round($file_size / 1073741824 * 100) / 100 . " Gb"; } elseif ($file_size >= 1048576) { $file_size = round($file_size / 1048576 * 100) / 100 . " Mb"; } elseif ($file_size >= 1024) { $file_size = round($file_size / 1024 * 100) / 100 . " Kb"; } else { $file_size = $file_size . " bytes"; } return $file_size; } function showPicture($picture) { $filesize = fileSizeDisplay(filesize($picture)); $filepix = getimagesize($picture); $filename = substr($picture, strrpos($picture, "/")+1, strlen($picture)); echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; echo "

\n"; echo " \n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; echo "

\n"; echo "

\n"; ?>

\n"; echo "

\n"; echo " \n"; echo " !Sla \n"; echo " de plaatjes op, rechter muisknop kies opslaan als en sla op!

\n"; echo "

\n"; echo " \n"; echo " Klik op terug en U komt weer bij de index pagina\n"; echo "

\n"; echo "

\n"; echo " \n"; echo " Hoofdpagina\n"; echo " \n"; echo " \n"; echo "

\n"; echo "
\n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; //echo ""; echo "

$filename

"; echo "
$filesize, $filepix[0] x $filepix[1]
"; echo "
"; echo "
Terug
"; } function loaddirs() { global $filedirdb; $handle = opendir("."); while (false !== ($file = readdir($handle))) { if (is_dir($file)) { // dir?! $filedirdb['count']++; $filedirdb['dir'][$filedirdb['count']] = $file; } } closedir($handle); sort($filedirdb['dir']); } function loaddir($dir) { global $filedb; $filedb['count'] = 0; $handle = opendir($dir); while (false !== ($file = readdir($handle))) { if(!is_dir($dir . $file) && eregi(".nol|.gif|.bmp|.png|.jpg", $file) && !stristr($file, '_thumb')) { $filedb['count']++; $filedb['file'][$filedb['count']] = $file; $filedb['size'][$filedb['count']] = filesize($dir . $file); $testArray = getimagesize("./" . $dir . $file); $filedb['height'][$filedb['count']] = $testArray[1]; $filedb['width'][$filedb['count']] = $testArray[0]; } } closedir($handle); arsort($filedb['file']); } // // prog // define("GALLERY_CELLS", 3); define("GALLERY_MAX", 30); define("GALLERY_THUMB_SIZE", 250); define("GALLERY_THUMB", false); // are u using GD then this is true, else false if (strlen($_GET['thumb']) > 0) { makeThumb($_GET['thumb']); exit(); } elseif(strlen($_GET['display']) > 0) { showPicture($_GET['display']); exit(); } if (strlen($gallery) > 0) { if (is_dir($gallery)) { loaddir("./" . $gallery . "/"); } else { echo "Sorry the gallery dir does not exists"; exit(); } } //echo ""; $header_title = str_replace("_", " ", $gallery); //echo "

" . $header_title . "

"; if ($filedb['count'] > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; echo "

\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; echo "

\n"; echo "

\n"; ?>

\n"; echo "

\n"; echo " \n"; echo " !Sla \n"; echo " de plaatjes op, rechter muisknop kies opslaan als en sla op!

\n"; echo "

\n"; echo " \n"; echo " Klik op het plaatje en het originele plaatje verschijnt !!!\n"; echo "

\n"; echo "

\n"; echo " \n"; echo " Hoofdpagina\n"; echo " \n"; echo " \n"; echo "

\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

\n"; echo " \n"; echo "

" . $header_title . "


"; //echo "
index

"; echo "
"; echo ""; echo ""; $left = round(($filedb['count'] - (int)$_GET['from'])); for ($i = 0; $i < GALLERY_MAX; $i++) { $tmp = ((int)$_GET['from'] + $i) + 1; if ($tmp > $filedb['count']) { break; } $image = $gallery . "/" . $filedb['file'][$tmp]; echo " "; $x++; if ($x >= GALLERY_CELLS) { $x = 0; echo ''; } } echo " "; echo "
"; echo " " . previewPicture($image) . ""; echo "
"; echo showHtmlPointers(); if ((int)$_GET['from'] + GALLERY_MAX > $filedb['count']) { echo "

Getoonde plaatjes " . (int)$_GET['from'] . " tot " . $filedb['count'] . " totaal " . $filedb['count'] . " Plaatjes

"; } else { echo "

Getoonde plaatjes " . (int)$_GET['from'] . " tot " . ((int)$_GET['from'] + GALLERY_MAX) . " totaal " . $filedb['count'] . " Plaatjes

"; } echo "
\n"; echo " \n"; echo " \n"; echo " Hoofdpagina\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "

\n"; ?>  

Google

\n"; echo "  
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "  
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " Linken\n"; echo " \n"; echo " Gastenboek\n"; echo " \n"; echo " Mailformulier
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo "

 

\n"; echo "

\n"; echo " \n"; echo " \n"; echo "

\n"; echo "  
\n"; ?>
Drukste dag tegelijk online Kerstman/Vrouw(en) \n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo ""; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; exit(); } else { loaddirs(); echo "

Gallery's

"; for ($i = 2; $i < $filedirdb['count']; $i++) { echo "
" . $filedirdb['dir'][$i] . "
"; } } ?>
\n"; echo "

\n"; echo " \n"; echo "