Ok ich hoffe es geht aus (Zeile 53+)
while($f = readdir($o)) {
if ($f == '.' OR $f == '..') { continue; }
$imgpath = $_POST['dir'].'/'.$f;
$size = getimagesize($imgpath);
if ($size[2] == 2 OR $size[2] == 3) {
$name = basename($imgpath);
$tmp = explode('.',$name);
$tm1 = count($tmp) -1;
$endung = $tmp[$tm1];
unset($tmp[$tm1]);
$name = implode('',$tmp);
$id = db_result(db_query("SHOW TABLE STATUS FROM `". DBDATE ."` LIKE 'prefix_gallery_imgs'"),0,'Auto_increment');
$bild_url = 'include/images/gallery/img_'.$id.'.'.$endung;
if (@copy ($imgpath,$bild_url)){
db_query("INSERT INTO prefix_gallery_imgs (cat,datei_name,endung,besch) VALUES (".$menu->get(2).",'".$name."','".$endung."','')");
$msg .= '- '.$imgpath.'<br />';
$bild_thumb = 'include/images/gallery/img_thumb_'.$id.'.'.$endung;
$bild_norm = 'include/images/gallery/img_norm_'.$id.'.'.$endung;
create_thumb ($bild_url, $bild_thumb, $allgAr['gallery_preview_width']);
create_thumb ($bild_url, $bild_norm , $allgAr['gallery_normal_width']);
}
}
}
musst du
while($f = readdir($o)) {
if ($f == '.' OR $f == '..') { continue; }
$bilder[] = $f;
}
sort($bilder);
foreach ($bilder as $f) {
$imgpath = $_POST['dir'].'/'.$f;
$size = getimagesize($imgpath);
if ($size[2] == 2 OR $size[2] == 3) {
$name = basename($imgpath);
$tmp = explode('.',$name);
$tm1 = count($tmp) -1;
$endung = $tmp[$tm1];
unset($tmp[$tm1]);
$name = implode('',$tmp);
$id = db_result(db_query("SHOW TABLE STATUS FROM `". DBDATE ."` LIKE 'prefix_gallery_imgs'"),0,'Auto_increment');
$bild_url = 'include/images/gallery/img_'.$id.'.'.$endung;
if (@copy ($imgpath,$bild_url)){
db_query("INSERT INTO prefix_gallery_imgs (cat,datei_name,endung,besch) VALUES (".$menu->get(2).",'".$name."','".$endung."','')");
$msg .= '- '.$imgpath.'<br />';
$bild_thumb = 'include/images/gallery/img_thumb_'.$id.'.'.$endung;
$bild_norm = 'include/images/gallery/img_norm_'.$id.'.'.$endung;
create_thumb ($bild_url, $bild_thumb, $allgAr['gallery_preview_width']);
create_thumb ($bild_url, $bild_norm , $allgAr['gallery_normal_width']);
}
}
}
machen, in der admin/gallery.php, achte dabei auf die Anzahl der vorhandenen }