IMET Bratislava - A turnaj - 04.12.2010

Zatvoriť galériu

$error

\n
\n\n\n"; exit; } // get image size function function getimgsize($image) { $size = GetImageSize($image); echo "width=$size[0] height=$size[1]"; } // check for directories if(!is_dir($thumbs_dir)) { error_page('Directory "'.$thumbs_dir.'" does not exist.'); } if(!is_dir($full_dir)) { error_page('Directory "'.$full_dir.'" does not exist.'); } // get $thumbs_dir $dir = @opendir($thumbs_dir) or error_page('Can\'t open $thumbs_dir directory'); $thumbs = array(); while($thumb = readdir($dir)) { if(eregi('jpg$|jpeg$|gif$|tif$|bmp$|png$', $thumb)) array_push($thumbs, $thumb); } sort($thumbs); // lowest displayed image in the array if (!isset($i)) $i = 0; // check to see if all thumbs are meant to be displayed on one page if ($max_thumbs == 0) { $max_thumbs = sizeof($thumbs); $mt_check = 1; } // thumbnail view if (is_numeric($i)) { ?>

  

0) { $start = $max_thumbs * ($i - 1); } else { $start = 0; } // loop through $thumbs and display $max_thumbs per page for($count = 1; $count <= $max_thumbs; $start++) { // break if past max_thumbs if ($start >= sizeof($thumbs)) { break; } // print new row after predefined number of thumbnails if(($count % $cols == 1) && $count != 1 && $cols > 1) { print "\n\n\n"; } else if ($cols == 1) { print "\n\n\n"; } // open cell print '\n"; $count++; } ?>
'; // insert thumb print "\"$thumbs[$start]\"\n"; // image title if($thumb_title) { print "$thumbs[$start]"; } // close cell print "
$count"; } } else { if ($count == $i) { print " | $count"; } else { print " | $count"; } } } } } // single image view else if (file_exists("$full_dir/$i")) { // find where it is in the array $key = array_search($i, $thumbs); // navigation print '

'; // previous if($key >= 1) { print "« predchádzajúci | "; } else { print '« predchádzajúci | '; } // home if ($script) { print "náhľady"; } else { print 'náhľady'; } // next if($key != (sizeof($thumbs) - 1)) { print " | ďalší »
"; } else { print ' | ďalší »'; } if($full_title) { print "$i\n
"; } else { print '
'; } // numerically show what image it is in the series // add 1 so that the first image is image 1 in the series, not 0 print ($key + 1) . ' z ' . sizeof($thumbs) . "

"; // caption (optional) if (file_exists("$captions_dir/$i.$cext")) { print '
'; include("$captions_dir/$i.$cext"); print '
'; } // image print "\"$i\"\n\n"; } // no image found else { ?>

Zatvoriť galériu