$folder_scr = "images"; $des_src = "thumbs"; $thumbx = "100"; $thumby = "100"; function mkthumb($img_src, $img_width, $img_height, $folder_scr, $des_src) { $image = imagecreatefromjpeg($folder_scr."/".$img_src); list($src_width, $src_height) = getimagesize($folder_scr."/".$img_src); if($src_width >= $src_height) { $new_image_width = $img_width; $new_image_height = $src_height * $img_width / $src_width; } if($src_width < $src_height) { $new_image_height = $img_width; $new_image_width = $src_width * $img_height / $src_height; } $new_image = imagecreatetruecolor($new_image_width, $new_image_height); imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_image_width,$new_image_height, $src_width, $src_height); imagejpeg($new_image, $des_src."/".$img_src, 100); } $filename = $_SERVER['index.php']; $verz=opendir($folder_scr); $linkl = array (); if(!$_GET['page'])$page=1;else $page=$_GET['page']; $anz=0; $anz_max=8*$page; while ($file = readdir ($verz)) { if($file != "." && $file != ".." && $file != $filename) { if($anz<$anz_max) array_push ($linkl, "$file"); $anz++; } } if($page!=1) { $linkl = array_slice($linkl,8*($page-1)); } $anzahl = count($linkl); $x = 0; $y = 0; echo "