Fredi Bach - IMG Log +';
?>
Fredi Bach - IMG Log
$v ) $orderedfiles[] = $files[$k];
// Img count
$imgs = count($orderedfiles);
// Now let us find out which image to show based on the url string
if (isset($_GET['pic']) && $_GET['pic'] != ''){
if ($_GET['pic'] == 'r'){
// random img
$pos = rand(0,($imgs-1));
$pic = $orderedfiles[$pos];
} else {
// specific img
$pic = $_GET['pic'];
$pos = 0;
foreach($orderedfiles as $k => $v){
if ($v == $pic){
$pos = $k;
}
}
}
} else {
// first img
$pic = $orderedfiles[0];
$pos = 0;
}
// Check img size ...
list($width, $height, $type, $attr) = getimagesize($imgfolder.'/'.$pic);
// Store the original img size
$origwidth = $width;
$origheight = $height;
// Downscale the image if needed
$divideby = 1;
while (($width/$divideby) > $xmax || ($height/$divideby) > $xmin){
$divideby = $divideby + $scalesteps;
}
$width = round($width / $divideby);
$height = round($height / $divideby);
// Now generate the top bar with the titlestring and navigation
echo ''."\n";
echo '
'."\n";
echo ' '."\n";
echo ' '.$titlestring.' '."\n";
echo '
'."\n";
echo '
'."\n\n";
// And last but not least, display the image container
echo ''."\n";
echo '

'."\n";
echo '
'.$pic.' 1/'.$divideby.' ¤ '.date('j. n. Y', filemtime($imgfolder.'/'.$pic)).'
'."\n";
echo '
'."\n";
?>