[ « powrót do spisu galerii ]

/*============================================= Lazy Photo Gallery Version 2.0 by Sam Perkins-Harbin http://www.forge22.com Last Revision: 19 February, 2007 You may modify this code as you wish, but please send me any modifications you do, and keep my URL on the footer! You can specify how many thumbs are displayed per page, thumbnail size, and more. Read the options and comments below for more details. Lazy Photo Gallery - made especially for those who have years worth of photos you have been promising people to put online. =============================================*/ error_reporting('E_ALL ^ E_NOTICE'); // just good to have :) $rootname = 'Galeria pola namiotowego Knieja'; // Name of your Gallery, if not specified, it will grab its folder name. $limit = 12; // Number of thumbs to show per page. I recommend no higher than 20, or your processor may be taxed. This should also be small if your images are large. $preview = 1; // Preview image inside of gallery, 0 to link to image itself $random_pic = 1; // Display a random image from current folder in upper right $w = 180; // Max width of thumbnails. $h = 150; // Max height of thumbnails. $show_folders = 1; // Show folder list, 0 to turn off $ititle = 1; // Display image name (title) $idate = 1; // Display file date (modified) $isize = 1; // Display image filesize $idim = 1; // Display image dimensions $sub_thumbs = 1; // Scan for first pic in a subfolder and use as thumbnail $icon = '__gal-icon.jpg'; // If found, use this as icon instead of thumbnail $wSub = 90; // Width of subfolder thumbs (slightly larger than area of tag) $hSub = 90; // Height of subfolder thumbs /***** No further user set options below here. *****/ /* TODO: script execution clock */ /* $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $begintime = $time; */ // TODO: the following must also be the same in image_resize.php //$cache_thumbs = 1; // Set to 1 to store thumbs in _di-cache directory in root folder $cache_dir = '_di-cache'; // Name of cache directory if you so choose /* setup the script */ $rootdir = stripslashes(dirname($_SERVER['SCRIPT_NAME'])); $rootlink = htmlentities($rootdir, ENT_QUOTES).'/'; // If not specified, use top folder for gallery name if(!$rootname){ $rootname = explode('/', $rootdir); $rootname = htmlentities(end($rootname), ENT_QUOTES); } if ($_GET[d]) { $d = stripslashes(urldecode($_GET['d'])); // remove escape characters $d_string = 'd='.urlencode($d).'&'; // for use in passing to URL strings $d .= '/'; // put trailing slash after its converted to a string $current_dir .= $d; $replace = array ("_", "/", "\\"); $with = array (" ", " - ", ""); $title = htmlentities(str_replace($replace, $with, $_GET[d]), ENT_QUOTES); } else $title = 'Home'; if($pg = $_GET['pg']) { $start_from = (($pg-1)*$limit); $pg_string = 'pg='.$pg.'&'; } else $img = 0; if(ereg("\.\.", $_GET['d'])) // important to prevent browsing upper directories header ("Location: ?"); // additional paramaters for

(thumbnails) - based on whether name or dimensions is displayed $pwidth = $w+12; $pheight = $h+12; if($ititle) $pheight +=10; // increase height of thumbnail

element if($isize || $idim) // if displaying dimensions or size of image, increase height of thumbnail

element. $pheight +=10; /*** Get list of folders ***/ $folder_list = count_folders(); $num_folders = count($folder_list); /*** Get list of Images ***/ $img_list = array(); if ($dir = opendir("./$current_dir")) { while ($file = readdir($dir)) { if ((eregi('((.jpg)|(.gif)|(.png))', $file)) && ($file != $icon)) // Don't add the icon to the list $img_list[] = $file; } closedir($dir); } asort($img_list); // sort alpha $num_images = count($img_list); // total number of images in folder $whole_img_list = $img_list; // save it before we chunk it $paginated = array_chunk($whole_img_list, $limit); if ($pg) $img_list = $paginated[($pg-1)]; $num_remain = $num_images-$start_from; // total remaining thumbs in the array (current directory) ?> -


Warning: Invalid argument supplied for foreach() in /home/atdagranite2011/knieja.svt.pl/zdjecia,camping,nad_morzem/wyposazenie,pola/index.php on line 425