'ǝɯɐu$ ıɥ
ich mach nochmal die ingrid :-))
<?php
if (array_key_exists ('sono', $_GET)) {
if (file_exists('pics/sono_'.$_GET ['sono'].'.jpg')) {
$size = getimagesize('pics/sono_'.$_GET ['sono'].'.jpg');
$height = $size['1'];
$width = $size['0'];
//sonoanzeige
echo '<img src="pics/sono_'.$_GET ['sono'].'.jpg" width="'.$size['0'].'" height="'.$size['1'].'" alt="" />';
}
$files = scandir('pics');
$items = count($files);
$forward = $_GET ['sono'] +1;
$back = $_GET ['sono'] -1;
// vor
if ($items > $forward){
$forward = 01;
echo '<a href="'.$SERVER['PHP_SELF'].'?sono='.$forward.'" >Nächstes Bild</a>';
} else echo '<a href="'.$SERVER['PHP_SELF'].'?sono='.$forward.'" >Nächstes Bild</a>';
//zurück
if ($items = 0){
$back = $items;
echo '<a href="'.$SERVER['PHP_SELF'].'?sono='.$back.'" >Vorheriges Bild</a>';
} else echo '<a href="'.$SERVER['PHP_SELF'].'?sono='.$back.'" >Vorheriges Bild</a>';
} else die();
?>
so funzt[TM] jetzt alles, habs getestet :-))
ssnɹƃ
ʍopɐɥs
--
Answers: $1, Short: $5, Correct: $25, dumb looks are still free ...
Answers: $1, Short: $5, Correct: $25, dumb looks are still free ...