Bienvenido a www.fuentesclaras.com

 // indice /


Fotos

# uncomment this to check for uninitialized variables etc.: # error_reporting (E_ALL); #language support require_once ("lib/lib.l10n.php"); require_once("inc/config.inc.php"); require_once("inc/www.class.inc.php"); require_once("inc/funkce.inc.php"); //session_name("navstevnik"); //session_register("page"); #set the language translation l10n::set("$root/l10n/".$sclang."/main.lang"); l10n::set("$root/l10n/".$sclang."/date.lang"); # always get sorted directory entries $adr = new SortDir("$gallery_dir"); # get variables passed in from the URL: $galerie=''; if (isset($_GET['galerie'])) $galerie=$_GET["galerie"]; if (isset($_GET['gallery'])) $galerie=$_GET["gallery"]; $galerie = preg_replace('/\//', '', $galerie); if (isset($_GET["thumbsize"])) $thumbsize=$_GET["thumbsize"]; $snimek = 0; if (isset($_GET["snimek"])) $snimek=$_GET["snimek"]; if (isset($_GET["photo"])) $snimek=$_GET["photo"]; $snimek = intval($snimek); $y=''; if (isset($_GET['y'])) $y=$_GET["y"]; $cmnt=''; if (isset($_GET["cmnt"])) $cmnt=$_GET["cmnt"]; $show_thumbs=''; if (isset($_GET["show_thumbs"])) $show_thumbs=$_GET["show_thumbs"]; $page = new C_www; //default colors if (!is_dir("$gallery_dir/$galerie/thumbs")) { $galerie = ""; } //read interesting stuff from info.txt if ($galerie) { readInfo("$root/$gallery_dir/$galerie/info.txt", $galerie); //check for restricted access if ($galerielogin[$galerie]) { access_check($galerielogin[$galerie],$galeriepw[$galerie],$galerie); } } $page->process_comment_form(); //START RENDERING $page->header("Photos"); require("inc/header.inc.php"); // folder > tree //print "
" . $scnamegallery . ""; print "
" . $scnamegallery . ""; ############################# # Overall Gallery Index # ############################# if (!$galerie) { # finish off navigation bar print "
\n\n\n\n"; # I've nuked date.txt to replace it with a more generic info.txt # It optionally supplies i18n name, camera model, author and date # TODO: imgconv script support while ($file = $adr->Read()) { // checking for inc is only really needed when gallery_dir == $root // hopefully not many galleries will be named inc ;) if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") { // Use date file for gallery date if avaliable // info.txt format described in README readInfo("$root/$gallery_dir/$file/info.txt", $file); } } if (!isset($galeriemonth)) $galeriemonth = array(); if (!isset($galerieday)) $galerieday = array(); //sort within month depending on $sortinmonth if ($sortinmonth) { //alphabetically ksort($galeriemonth); reset($galeriemonth); } else {//by date arsort($galerieday); reset($galerieday); } $thisyear = 0; if (!$yearto) $yearto = date("Y"); for ($i = $yearto; $i >= $yearsince; $i--) { for ($thismonth=12; $thismonth>0; $thismonth--) { // go year by year, month by month // down foreach ($galerieday as $foldername => $day) { //using $galerieday (for when sorted) if ($galeriemonth["$foldername"] == $thismonth && $galerieyear["$foldername"] == $i) { //such Y/M exists $galerieyearordered["$foldername"]=$galerieyear["$foldername"]; $galeriemonthordered["$foldername"]=$galeriemonth["$foldername"]; } } } } $months = array(__('Enero'), __('Febrero'), __('Marzo'), __('Abril'), __('Mayo'), __('Junio'), __('Julio'), __('Agosto'), __('Septiembre'), __('Octubre'), __('Noviembre'), __('Diciembre')); $one_out = false; foreach ($galerieyearordered as $foldername => $year) { $one_out = true; if (@$thisyear!=$year) { #if the year is not equal to the current year #This is the first year if (@$thisyear) { print "
\n\n";}// end last year if this is // not the first one #This is a new year unset($thismonth); print "

$year

\n"; print ""; } $month=$galeriemonth["$foldername"]; # now months if (@$thismonth!=$month) { #first one if (@$thismonth) { print "
\n"; } // end of last month if // this is not the first one #new month $monthindex = $month - 1; $monthname = $months[$monthindex]; print "

$monthname

\n"; } #galleries within month if ($galerielogin[$foldername]) { print "

"; print $galeriename[$foldername]; print ""; } else { print " href=\"$ThisScript?galerie=$foldername\">$foldername"; } if (@$galeriedesc[$foldername]) { print "" . $galeriedesc[$foldername]; print "\n"; } if (@$galerieauthor[$foldername]) { print "by " . $galerieauthor[$foldername]; print "\n"; } if (@$galerieday[$foldername]) { print ""; print "$monthname " . $galerieday[$foldername]; print "\n"; } print "

\n"; $thisyear=$year; $thismonth=$month; } if ($one_out) print ("
\n\n\n"); ############################## # Individual Gallery Index # ############################## } elseif (!$snimek) { # finish off navigation header print "\n > "; if ($galeriename[$galerie]) { print $galeriename[$galerie]; } else { print $galerie; } print "\n\n"; //thumbnails print "

\n"; $path = "$gallery_dir/$galerie/thumbs"; $imgfiles = new SortDir($path); check($galerie); // check for nasty input while ($file = $imgfiles->read()) { if (is_file("$path/$file") && eregi("^img-([0-9]+)\.(png|jpe?g)", $file, $x)) { $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}"; $imgsize = getimagesize("$root/$thumb"); //check for portraits $portrait = "false"; $class = ""; if($imgsize[0]<100) { //portraits need a special class for styling $class = "portrait"; } //check for number of comments per photo if ($comments) { //there probably won't be user comments if it's off $NumOfComments = 0; if (file_exists("$gallery_dir/$galerie/comments/user_${x[1]}.txt")) { if ($class) $class .= " "; $class .= "hascomments"; //now let's count'em $fh = fopen("$gallery_dir/$galerie/comments/user_${x[1]}.txt","r"); while (!feof($fh)) { $line = fgets($fh); if (eregi("commententry",$line)) $NumOfComments++; } fclose($fh); } if ($NumOfComments==1) { $NumOfComments = $NumOfComments . " " . __('Comment'); } else { $NumOfComments = $NumOfComments . " " . __('Comments'); } } if (file_exists("$gallery_dir/$galerie/comments/${x[1]}.txt") && $title = file_get_contents("$gallery_dir/$galerie/comments/${x[1]}.txt")) { $title = ereg_replace("(\"|\')","",trim(strip_tags($title))); $title = ereg_replace("(.{77}).*","\\1",$title); } else $title = "Photo ${x[1]}"; print " "; print ""; print "\n"; } } print "

\n"; //info print "
\n"; if ($galeriedesc[$galerie]) { print "

"; print ""; print $galeriedesc[$galerie] . "

\n"; } if ($galerieauthor[$galerie]) { print "

Author: "; print ""; print $galerieauthor[$galerie] . "

\n"; } print "
\n"; //and links to archived images: print "\n

\n"; if (file_exists("$gallery_dir/$galerie/zip/mq.zip")) { print "[ " . __('Fotos Calidad Media MQ zip') . " ] "; } if (file_exists("$gallery_dir/$galerie/zip/mq.tar.bz2")) { print "[ " . __('MQ images tarball') . " ] "; } if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) { print "[ " . __('Fotos Calidad Alta HQ zip') . " ]"; } if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) { print "[ " . __('Fotos Calidad Alta HQ images tarball') . " ]"; } print "

"; ####################### # Individual Image # ####################### } else { //low-res image # finish off header print "\n > "; if ($galeriename[$galerie]) { print $galeriename[$galerie]; } else { print $galerie; } print "\n > Photo"; print " $snimek"; $path = "$gallery_dir/$galerie/thumbs"; $imgfiles = new SortDir("$path"); check($galerie); $path = "$gallery_dir/$galerie/lq"; $file = "$path/img-$snimek.jpg"; if (!file_exists($file)) { print __('No such image'); $page->footer(); exit; } if (!$picture) { //picture may have been created if commentform submitted require_once("$root/inc/photo.class.inc.php"); $picture = new C_photo($file, $snimek); } // mini thumbnail roll if ($show_thumbs) { print "\n\n
"; print ""; print "\n"; print " : \n"; while ($thumbfile = $imgfiles->read()) { if ( eregi("^img-([0-9]+)\.(png|jpe?g)", $thumbfile, $x)) { $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}"; print " "; print ""; print " \n"; } } if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) { print ""; print "zip"; } if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) { print ""; print "zip"; } print "
\n"; } else { // show the popup button print "\n\n
"; print ""; print "\n"; print "
\n"; } /* main image + thumbnail navigation (prev/next) */ $picture->renderPreview(); $page->navigation($galerie, $snimek, "prev"); $page->navigation($galerie, $snimek, "next"); print "\n"; //end image div if (function_exists(exif_read_data)) require("$root/inc/exif.inc.php"); /* Image comment really poor naming here, it is caption. */ $picture->renderCaption(); //show page counter if ($log_access) { $picture->renderCounter(); } $picture->renderBigSize(); $page->user_comments($picture->number); $page->navigation($galerie, $snimek, null); } require("inc/footer.inc.php"); $page->footer();

Ultima actualización 07.12.2012

 Noticia 07.12.2012
Próxima verbena sábado 8 de diciembre de 2012
 Noticia 24.08.2012
 Noticia 02.08.2012
 Noticia 02.04.2012
Fiestas 2012 del 4 al 9 de septiembre!!! Cambiadas bases del concurso de cartel de fiestas
 Noticia 13.01.2012
 Noticia 29.08.2010
 Noticia 27.01.2010
 Noticia 09.09.2009
 Noticia 30.08.2009
 Noticia 14.08.2009
 Noticia 11.05.2009
 Noticia 27.04.2009
 Noticia 08.02.2008
 Noticia 17.02.2009
-->

© 2008 fuentesclaras.com