verzeichnis); $foldername="./galerie/". $rsAdr->verzeichnis; chmod_ftp("galerie/". $rsAdr->verzeichnis,"0777"); $bilder=array(); umask(0077); while ($entry = $folderspec->read()) { if (strpos($entry,".") && $entry !="." && $entry!=".." && substr($entry,0,3)!="TN_") { $dateiname=realpath("./galerie/". $rsAdr->verzeichnis . "/TN_" . $entry); if (!file_exists($dateiname)) { $source_file = "./galerie/". $rsAdr->verzeichnis . "/".$entry; $original_jpg = imagecreatefromjpeg($source_file); $original_size = getimagesize($source_file); $original_width = $original_size[0]; $original_height = $original_size[1]; $thumb_width=$thumbnail_width; $img_width=$image_width; $faktor = $original_width / $thumbnail_width; $faktor_b = $original_width / $image_width; $thumb_height = $original_height / $faktor; $img_height = $original_height / $faktor_b; if ($thumb_height > $thumbnail_height) { $faktor = $original_height / $thumbnail_height; $faktor_b = $original_height / $image_height; $thumb_width = $original_width / $faktor; $thumb_height = $original_height / $faktor; $img_height = $original_height / $faktor_b; $img_width = $original_width / $faktor_b; } else { $thumb_height = $original_height / $faktor; $img_height = $original_height / $faktor_b; } $source_file_name = $entry; //substr($source_files[0], strrpos($source_files[$index], "/") + 1); $thumbnail_jpg = imagecreatetruecolor($thumb_width, $thumb_height); imagecopyresized($thumbnail_jpg, $original_jpg, 0, 0, 0, 0, $thumb_width, $thumb_height, $original_width, $original_height); imagejpeg($thumbnail_jpg, $foldername . "/TN_" . $source_file_name); imagedestroy($thumbnail_jpg); chmod_ftp("galerie/". $rsAdr->verzeichnis. "/" . $source_file_name,"0777"); $image_jpg = imagecreatetruecolor($img_width, $img_height); imagecopyresized($image_jpg, $original_jpg, 0, 0, 0, 0, $img_width, $img_height, $original_width, $original_height); imagejpeg($image_jpg, $foldername . "/" . $source_file_name); chmod_ftp("galerie/". $rsAdr->verzeichnis. "/" . $source_file_name,"0755"); imagedestroy($image_jpg); imagedestroy($original_jpg); } $bilder[]=$entry; } } sort($bilder); chmod_ftp("galerie/". $rsAdr->verzeichnis,"0755"); ?>

Galerie -

Zurück zur Übersicht
\n"; } ?>
Zurück zur Übersicht