Hallo,
das ist eine bildergalerie
ich möchte die bilder mit originalnamen auslesen
aber meine liest jedes bild mit "bild000.jpg" aufwärts aus
bitte danke
LG
das ist eine bildergalerie
ich möchte die bilder mit originalnamen auslesen
aber meine liest jedes bild mit "bild000.jpg" aufwärts aus
bitte danke
LG
PHP-Code:
$caption = "eroeffnung";
$lastimage = 445;
$imagesperpage = 100;
$offset = $_GET['offset'];
if ($offset > $lastimage) { $offset = 0; }
function pagination($offset, $gallery, $lastimage, $imagesperpage) {
$lastoffset = $offset - $imagesperpage;
if ($offset >= $imagesperpage) { echo '<a href="index.php?content=gallery2010&gal='.$gallery.'&offset='.$lastoffset.'"><< zurück</a> | '; }
$nextoffset = $offset + $imagesperpage;
$lastpic = $nextoffset;
if ($nextoffset > $lastimage) { $lastpic = $lastimage; }
echo 'Sie sehen Bilder '.$offset.' bis '.$lastpic;
if ($nextoffset < $lastimage) { echo ' | <a href="index.php?content=gallery2010&gal='.$gallery.'&offset='.$nextoffset.'">mehr >></a>'; }
}
function gallery($offset, $caption, $lastimage, $imagesperpage) {
//$imagepath = "2009/gallery/fotos/".$caption."/bild";
//$thumbnailpath = "2009/gallery/fotos/".$caption."/thumb/bild";
$limit = $offset + $imagesperpage;
for ($number = $offset; $number <= $limit; $number++) {
if ($number <= $lastimage) {
if ($number < 100) { $number = "0".$number; }
if ($number < 10) { $number = "0".$number; }
$imagepath = "2010/gallery/fotos/".$caption."/bild".$number.".jpg";
$thumbnailpath = "2010/gallery/fotos/".$caption."/thumb/bild".$number.".jpg";
echo '<a href="'.$imagepath.'" rel="lightbox[grf]"><img class="gallery" src="'.$thumbnailpath.'" alt="GRF Foto"></a>';
}
}
}
?>
Kommentar