X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_img.php;h=a96d5e6f41c1d4ed86dd46933c36bdb9faf441e2;hp=194b534ba63e61d9258ea0a1ce621d35673581f4;hb=758887b79c875b31b86d427e27f515e2c3d2a257;hpb=7cd411d39455615dbf2069cc7304ed68c8696636 diff --git a/phpfspot_img.php b/phpfspot_img.php index 194b534..a96d5e6 100644 --- a/phpfspot_img.php +++ b/phpfspot_img.php @@ -56,6 +56,9 @@ class PHPFSPOT_IMG { */ public function show($idx, $width = 0) { + if($idx == 'rand') + $idx = $this->parent->get_random_photo(); + $details = $this->parent->get_photo_details($idx); if(!$details) { @@ -112,7 +115,7 @@ class PHPFSPOT_IMG { } -if(isset($_GET['idx']) && is_numeric($_GET['idx'])) { +if(isset($_GET['idx']) && (is_numeric($_GET['idx']) || $_GET['idx'] == 'rand')) { $img = new PHPFSPOT_IMG;