*/ // If admin-view is requested, include authentification! if (isset($admin)) INCLUDE "auth.php"; // get the configuration INCLUDE "config.php"; ?> platz43.de
$newgaleries ) { $archivlink = "true"; $ende = $current - $newgaleries + 1; } } else { if ( $current+1 > $newgaleries ) { $current = $current - $newgaleries; } else { print "Kein Archiv vorhanden!"; exit; } } if (isset($admin)) print "

Aktive Galerie auswählen:

"; // generate HTML-formatted links to directories while ($current>=$ende) { print "\n\n"; print ""; print "\n"; if (isset($admin)) { print ""; print "[delete]"; print ""; } print " \n"; $current--; }; /*if (!isset($archiv) && isset($archivlink)) { if (!isset($admin)) print "

\n\n   "; else print "

\n\n   "; print "// Archiv

\n"; } elseif (isset($archiv)) { if (!isset($admin)) print "

\n\n   "; else print "

\n\n   "; print "// Neue Events

\n"; }*/ // Form for creating a new galery when admin-mode is set if (isset($admin)) { print "

\n"; print "

Neue Galerie anlegen:

"; print "Tag  /  Monat  /  Jahr:
"; print " / "; print " / "; print "
"; print "DJ bzw. Bezeichnung:
"; print "
"; print ""; print "
"; } // if parameter gal has been posted create selected galery: } else { if (strcmp($gal, "init")==0) $gal=$initdir; if (strcmp($gal, "")==0) { print "Die Galerie ist zur Zeit leer!"; exit; } if (!is_dir("$basedir/$gal")) { print "Initialisierungs-Galerie ungültig!! Seite bitte erneut laden, um das Problem zu beheben."; exit; } // determine the number of pictures required for setting the size of the thumbnail table $handle=opendir("$basedir/$gal"); $anzahl=0; while ($file = readdir($handle)) { if (eregi("jpg$",$file)) $anzahl++; }; closedir($handle); $rows=ceil(sqrt($anzahl)); $count=0; // looking for thumbnail directory / creating if necessary with maximum access rights //$subdir=ereg_replace(" ", "\ ", $gal); // replace whitespaces in directory for system-calls umask(0000); if (!is_dir("$basedir/$gal/$tndir")) mkdir("$basedir/$gal/$tndir", 0777); //system("mkdir $basedir/$subdir/$tndir"); // Upload-form for the admin-mode if (isset($admin)) { print "

Picture-Upload:

"; print "Aktive Galerie: $gal
"; print "

\n"; print "Es können entweder einzelne Bilder im JPEG-Format (640*480, JPEG-quality: 70%) oder
"; print "ZIP-Archive mit mehreren JPEG's zum einfügen in die aktive Galerie ausgewählt werden.
"; print "\n"; print "Datei auswählen: \n"; print "\n"; print "

"; } // create the table print ""; print ""; print ""; print ""; print "
"; print ""; print ""; print ""; print ""; print "
"; print ""; $handle=opendir("$basedir/$gal"); while ($file = readdir($handle)) { if (eregi("jpg$",$file)) { if (($count/$rows)==floor($count/$rows)) print ""; print "\n"; $count++; }; }; closedir($handle); print "

"; if (!is_file("$basedir/$gal/$tndir/tn_$file")) { //system("djpeg $basedir/$subdir/$file | pnmscale -xy 80 60 | cjpeg -smoo 10 -qual 70 > $basedir/$subdir/$tndir/tn_$file; chmod 777 $basedir/$subdir/$tndir/tn_$file"); $dst_img = imagecreate( $tnwidth, $tnheight ); $src_img = imagecreatefromjpeg("$basedir/$gal/$file"); imagecopyresized($dst_img,$src_img,0,0,0,0,$tnwidth,$tnheight,ImageSX($src_img),ImageSY($src_img)); imagejpeg($dst_img, "$basedir/$gal/$tndir/tn_$file", 90); imagedestroy($dst_img); } print ""; print ""; if (isset($admin)) { print "
"; print "[delete]"; print ""; } print "

"; print ""; print ""; print ""; print ""; print "
"; if (isset($archiv)) { print ""; } else { print ""; } print "


"; print "
"; }; ?>