= $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 ""; foreach($linkl as $key => $value) { if($y==8) break; if(!file_exists($des_src."/".$value)) { // erstelle ein thumb mkthumb($value, $thumbx, $thumby, $folder_scr, $des_src); } if($x==2) { echo ""; $x=0; } echo ""; $x++; $y++; } if($x!=0)echo ""; echo "

".substr($value,0,strlen($value)-4)." 
"; closedir($verz); for($i=1;$i<=ceil($anz/8);$i++)echo "$i "; ?>