-1); $foundComic--) { if (file_exists(GenerateFileName($foundComic))) { break; } } return $foundComic; } $numberOfComics = lastcomic(); //************************************ // Check to see which comic user wants to see: if (isset($_REQUEST['nr'])) { $requestedNR = $_REQUEST["nr"]; if ($requestedNR == "random") { $requestedNR = rand(1, $numberOfComics); } else if (intval($requestedNR) < 0) { $requestedNR = $numberOfComics; } else if (intval($requestedNR) > $numberOfComics) { $requestedNR = 0; } } else { $requestedNR = $numberOfComics; } // ********************************** // Make neat the links for the buttons: $me = $_SERVER['PHP_SELF']; $linkFirst = $me."?nr=1"; $linkPrev = $me."?nr=".strval($requestedNR - 1); $linkRand = $me."?nr=random"; $linkNext = $me."?nr=".strval($requestedNR + 1); $linkNewest = $me."?nr=".$numberOfComics; $recentPicture = GenerateFileName($requestedNR); // the above is all you need later on in the html part, for links and stuff. //This function converts a number into a file name // for example: it will turn the number 1 into bunbun-comic001.gif or whatever. // leading zero's: function GenerateFileName($number) { $number = substr("000".$number, strlen($number), 3); $supposedFileName = "pic/images/guest-bunbun/guest-bunbun$number.gif"; //echo "$supposedFileName
\n"; 'uncomment this line to see what i'm looking for return $supposedFileName; } ?> Bunbun paintings
Bunbun Home
Sticker Designs
Bunbun Paintings
Bunbun Paintings
   

celing
"Ceiling" Acryl on wood 60x 40 cm 2014

dom toren
Bunbun on the Dom Acryl on wood 40x 60 cm 2014

zuperbunbun
Birth of a Carrot Acryl on cardbord 23x 18 cm 2012


zuperbunbun

Baby

brood

bengbeng

chainsaw

bier . kiss

klus

bad . piss .beer

Bread2

Gitar

Pedo . Bruce

Bread

Ace .Rocky

Bogdan

Darwin
Mummie

Warhol

Order your
verry own Bunbun painting
Here