From 6ebef5c9743cc1e6f7dea5c732cf9bb06cd22c0a Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Tue, 29 Mar 2022 12:51:24 +0200 Subject: [PATCH] 29-03-2022 --- functions.php | 34 +++ index.php | 13 +- insert_bdd.php | 354 ++++++++++++++++++++++----- lib2/localize.php | 119 --------- locales/de_DE/LC_MESSAGES/.DS_Store | Bin 6148 -> 0 bytes locales/de_DE/LC_MESSAGES/sentier.mo | Bin 1389 -> 0 bytes locales/de_DE/LC_MESSAGES/sentier.po | 193 --------------- locales/en_US/LC_MESSAGES/sentier.mo | Bin 412 -> 0 bytes locales/en_US/LC_MESSAGES/sentier.po | 73 ------ locales/es_ES/LC_MESSAGES/sentier.mo | Bin 1918 -> 0 bytes locales/es_ES/LC_MESSAGES/sentier.po | 176 ------------- locales/fr_FR/LC_MESSAGES/sentier.mo | Bin 1364 -> 0 bytes locales/fr_FR/LC_MESSAGES/sentier.po | 183 -------------- locales/sentier.pot | 175 ------------- photo-du-mois-lc.php | 274 --------------------- photo-du-mois.php | 233 ++++++++++-------- 16 files changed, 467 insertions(+), 1360 deletions(-) delete mode 100644 lib2/localize.php delete mode 100644 locales/de_DE/LC_MESSAGES/.DS_Store delete mode 100644 locales/de_DE/LC_MESSAGES/sentier.mo delete mode 100644 locales/de_DE/LC_MESSAGES/sentier.po delete mode 100644 locales/en_US/LC_MESSAGES/sentier.mo delete mode 100644 locales/en_US/LC_MESSAGES/sentier.po delete mode 100644 locales/es_ES/LC_MESSAGES/sentier.mo delete mode 100644 locales/es_ES/LC_MESSAGES/sentier.po delete mode 100644 locales/fr_FR/LC_MESSAGES/sentier.mo delete mode 100644 locales/fr_FR/LC_MESSAGES/sentier.po delete mode 100644 locales/sentier.pot delete mode 100644 photo-du-mois-lc.php diff --git a/functions.php b/functions.php index f928e93..5e94556 100644 --- a/functions.php +++ b/functions.php @@ -234,4 +234,38 @@ function host() { return $host; } + +class AdvancedFilesystemIterator extends ArrayIterator + { + public function __construct(string $path, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS) + { + parent::__construct(iterator_to_array(new FilesystemIterator($path, $flags))); + } + + public function __call(string $name, array $arguments) + { + if (preg_match('/^sortBy(.*)/', $name, $m)) return $this->sort('get' . $m[1]); + throw new MemberAccessException('Method ' . $methodName . ' not exists'); + } + + public function sort($method) + { + if (!method_exists('SplFileInfo', $method)) throw new InvalidArgumentException(sprintf('Method "%s" does not exist in SplFileInfo', $method)); + + $this->uasort(function(SplFileInfo $a, SplFileInfo $b) use ($method) { return (is_string($a->$method()) ? strnatcmp($a->$method(), $b->$method()) : $b->$method() - $a->$method()); }); + + return $this; + } + + public function limit(int $offset = 0, int $limit = -1) + { + return parent::__construct(iterator_to_array(new LimitIterator($this, $offset, $limit))) ?? $this; + } + + public function match(string $regex, int $mode = RegexIterator::MATCH, int $flags = 0, int $preg_flags = 0) + { + return parent::__construct(iterator_to_array(new RegexIterator($this, $regex, $mode, $flags, $preg_flags))) ?? $this; + } + } + ?> \ No newline at end of file diff --git a/index.php b/index.php index 26453de..61647a6 100644 --- a/index.php +++ b/index.php @@ -40,19 +40,24 @@ $host = $pv_URIprotocol . $_SERVER['HTTP_HOST']; $wp = (($_SERVER['SERVER_NAME'] == "sur-le-sentier.fr") ? "blog" : "wordpress"); -$root = dirname($_SERVER['SCRIPT_FILENAME']); +//if ($_SERVER['SERVER_NAME'] == 'airbook.local') +$root = $_SERVER['DOCUMENT_ROOT']; +//$root = dirname($_SERVER['SCRIPT_FILENAME']); // /Users/bruno/Sites/sls include($root.'/lib2/localize.php'); -$dir_locales = $root . '/locales'; +$dir_locales = $root . '/Locale'; $liste_locale = list_dir($dir_locales); if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages); else $langue = $_REQUEST['lang']; + $domain = 'sentier'; putenv('LC_ALL=' . $langue); $loc = setlocale(LC_ALL, $langue); -bindtextdomain($domain, $root . '/locales/'); + +bindtextdomain($domain, $root . '/Locale/'); bind_textdomain_codeset($domain, 'UTF-8'); textdomain($domain); + $nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') ); ?> @@ -139,7 +144,7 @@ foreach($fileList as $filename){
Piwigo gallery...'); ?>
-
Latest images...'); ?>
+
month ...'); ?>
diff --git a/insert_bdd.php b/insert_bdd.php index b45fc90..69c7191 100644 --- a/insert_bdd.php +++ b/insert_bdd.php @@ -12,7 +12,29 @@ - + gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') ); + + include 'functions.php'; + ?> @@ -20,16 +42,18 @@ match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/'); -echo '

Creation de la base ' . $base . ' et de la table photo (si nécessaire)...

'; +echo '

' . count($dir) . gettext(' images found in folder') . ' photos/img/ ...

'; + +echo '

' . gettext("Creation of the database") . ' ' . $base . ' ' . gettext("and the table") . ' photo (' . gettext("if necessary") . ')...

'; // Création de la base et de la table photos $conn = new PDO("sqlite:db_photo.sqlite3"); @@ -39,7 +63,7 @@ $query = "CREATE TABLE IF NOT EXISTS photos ( filename TEXT NOT NULL, date TEXT, lens TEXT, - exposure INTEGER, + speed TEXT, iso INTEGER, width INTEGER, height INTEGER, @@ -51,40 +75,224 @@ $query = "CREATE TABLE IF NOT EXISTS photos ( alt REAL, legende TEXT, copyright TEXT, - titre TEXT, - createur TEXTr, + title TEXT, + creator TEXTr, keywords TEXT, + metering TEXT, + flash TEXT, + focal TEXT, + wb TEXT, + program TEXT, UNIQUE(filename) )"; $conn->exec($query); -echo '

Lecture des fichiers images dans le dossier photos/img/...

'; +echo '

' . gettext('Read image files in the folder') . ' photos/img/...

'; $i = 1; +$photos = array(); -// Ajout de données dans la table -foreach($fileList as $file){ - +foreach($dir as $file){ + /* + $file->getFilename() + pathName() + */ + $file = $file->getpathName(); + $x = in_bdd($file); if ($x == false) { //false if ($exif = @exif_read_data($file, 0, true )) { - + //_pr($exif); + //if (($file == 'photos/img/12_2007.jpg') || ($file == 'photos/img/11_2007.jpg') || ($file == 'photos/img/10_2020.jpg')) { + if (($file == 'photos/img/4_2008.jpg') || ($file == 'photos/img/10_2020.jpg')) { + _pr($exif); + } + $mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : ''; + //_pr($exif); # YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12 $da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : ''; - $obj = isset($exif['EXIF']['UndefinedTag:0xA434']) ? $exif['EXIF']['UndefinedTag:0xA434'] : ''; - $ex = isset($exif['EXIF']['ExposureTime']) ? $exif['EXIF']['ExposureTime'] : ''; + + if (isset($exif['EXIF']['UndefinedTag:0xA434'])) { + $w = $exif['EXIF']['UndefinedTag:0xA434']; + + $arr = array("100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "Sigma 500mm f/4.5 EX HSM ", "500mm" => "Sigma 500mm f/4.5 EX HSM "); + + if (array_key_exists($w, $arr)) $obj= $arr[$w]; + else $obj = $w; + + } else { + $obj = ''; + } + + if (isset($exif['EXIF']['ExposureTime'])) { + $q = explode('/', $exif['EXIF']['ExposureTime']); + $sp = ($q[0] > 1) ? ($q[0] / $q[1]) . "s" : $exif['EXIF']['ExposureTime']; + } else { + $sp = ''; + } + $iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : ''; + if (isset($exif['EXIF']['MeteringMode'])) { + $mm = $exif['EXIF']['MeteringMode']; + + switch ($mm) { + case 1: $mm = gettext("Average"); + break; + case 2: $mm = gettext("Center-weighted average"); // Moy. à pred. centrale + break; + case 3: $mm = gettext("Spot"); + break; + case 4: $mm = gettext("Multi-Spot"); + break; + case 5: $mm = gettext("Pattern"); // Mesure évaluative + break; + case 6: $mm = gettext("Partial"); // Mesure sélective + break; + default: $mm = gettext("Unknown") . ': ' . $mm; + // Evaluative Mesure évaluative + // Centre-weighted Average Moy. à pred. centrale + // Partial Mesure sélective + // Spot Spot + + // Pattern =Mesure évaluative (30D) + // Average Mesure évaluative + } + + } else { + $mm = ''; + } + + if (isset($exif['EXIF']['Flash'])) { + $fla = $exif['EXIF']['Flash']; + + switch ($fla) { + case 0: $fla = gettext("Off"); + break; + case 1: $fla = gettext("Auto"); + break; + case 2: $fla = gettext("On"); + break; + case 3: $fla = gettext("Red Eye Reduction"); + break; + case 4: $fla = gettext("Slow Synchro"); + break; + case 5: $fla = gettext("Auto + Red Eye Reduction"); + break; + case 6: $fla = gettext("On + Red Eye Reduction"); + break; + case 16: $fla = gettext("External Flash"); + break; + default: $fla = gettext("Unknown"); + } + + } else { + $fla = ''; + } + + if (isset($exif['EXIF']['FocalLength'])) { + $k = explode('/', $exif['EXIF']['FocalLength']); + $fl = $k[0] . " mm"; + } else { + $fl = ''; + } + + /* + if (isset($exif['EXIF']['ExposureMode'])) { + $em = $exif['EXIF']['ExposureMode']; + echo $em; + $em = hexdec(intel2Moto($exif['EXIF']['ExposureMode'])); + echo $em; + + switch ($em) { + case 0: $em = gettext("EasyShoot"); + break; + case 1: $em = gettext("Program"); + break; + case 2: $em = gettext("Tv"); + break; + case 3: $em = gettext("Av"); + break; + case 4: $em = gettext("Manual"); + break; + case 5: $em = gettext("Auto-DEP"); + break; + default: $em = gettext("Unknown"); + } + + } else { + $em = ''; + } + */ + + if (isset($exif['EXIF']['WhiteBalance'])) { + $wb = $exif['EXIF']['WhiteBalance']; + + switch ($wb) { + case 0: $wb = gettext("Auto"); + break; + case 1: $wb = gettext("Daylight"); + break; + case 2: $wb = gettext("Cloudy"); + break; + case 3: $wb = gettext("Tungsten"); + break; + case 4: $wb = gettext("Fluorescent"); + break; + case 5: $wb = gettext("Flash"); + break; + case 6: $wb = gettext("Custom"); + break; + case 7: $wb = gettext("Black & White"); + break; + case 8: $wb = gettext("Shade"); + break; + case 9: $wb = gettext("Manual Temperature (Kelvin)"); + break; + default: $wb = gettext("Unknown"); + } + + } else { + $wb = ''; + } + if (isset($exif['EXIF']['ExposureProgram'])) { + $ep = $exif['EXIF']['ExposureProgram']; + + switch ($ep) { + case 1: $ep = gettext('Manual'); + break; + case 2: $ep = gettext('Program'); + break; + case 3: $ep = gettext('Aperture Priority'); + break; + case 4: $ep = gettext('Shutter Priority'); + break; + case 5: $ep = gettext('Program Creative'); + break; + case 6: $ep = gettext('Program Action'); + break; + case 7: $ep = gettext('Portrait'); + break; + case 8: $ep = gettext('Landscape'); + break; + default: $ep = gettext('Unknown') . ': ' . $data; + break; + } + + } else { + $ep = ''; + } + + ///echo "File: " . basename($file) . " - Objectif: " . $obj . " - Model: " . $mod . " - Metering: " . $mm . " - Flash: " . $fla. " - Focal: " . $fl. " - Exposure: " . " - Balance: " . $wb. " - Program: " . $ep . "
"; + $wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : ''; $he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : ''; $ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : ''; $ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : ''; - $mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : ''; - $gps = get_gps($exif); $photos[$i] = array( @@ -92,7 +300,7 @@ foreach($fileList as $file){ 'date' => $da, 'lens' => $obj, - 'exposure' => $ex, + 'speed' => $sp, 'iso' => $iso, 'width' => $wi, @@ -104,19 +312,29 @@ foreach($fileList as $file){ 'lat' => $gps['latitude'], 'long' => $gps['longitude'], - 'alt' => $gps['altitude'] + 'alt' => $gps['altitude'], + 'metering' => $mm, + 'flash' => $fla, + 'focal' => $fl, + 'wb' => $wb, + 'program' => $ep + ); } - if ($iptc = getimagesize($file, $info)) { + //$qq = getimagesize($file, $info); + //_pr($qq); + + if ($iptc = @getimagesize($file, $info)) { + //_pr($iptc); if (isset($info["APP13"])) { $mots = ""; $iptc = iptcparse ($info["APP13"]); $legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : ''; $copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : ''; - $titre = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : ''; - $createur = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : ''; + $title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : ''; + $creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : ''; $mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : ''; if (!empty($mots_cles)) { foreach ($mots_cles as $key => $val) { @@ -127,54 +345,54 @@ foreach($fileList as $file){ $photos[$i]['legende'] = $legende; $photos[$i]['copyright'] = $copyright; - $photos[$i]['titre'] = $titre; - $photos[$i]['createur'] = $createur; + $photos[$i]['title'] = $title; + $photos[$i]['creator'] = $creator; $photos[$i]['mots_cles'] = $mots; } + else { + $photos[$i]['legende'] = ''; + $photos[$i]['copyright'] = ''; + $photos[$i]['title'] = ''; + $photos[$i]['creator'] = ''; + $photos[$i]['mots_cles'] = ''; + } } } $i++; } +//_pr($photos); +$z = count($photos); +if ($z == 0) { + echo '

' . gettext('No new image files to add') . '...

'; + die(); + } + $query5 = "SELECT MAX(id) FROM photos"; -//$conn->$stmt->execute($query5); $stmt = $conn->prepare($query5); $stmt->execute(); -//$resultat = $stmt->fetchAll(PDO::FETCH_ASSOC); -/* -Array - ( - [0] => Array - ( - [MAX(id)] => 5 - ) - - ) -*/ $resultat = $stmt->fetch(PDO::FETCH_ASSOC); -/* -Array - ( - [MAX(id)] => 5 - ) -*/ -//_pr($resultat); -$nb_avant = $resultat['MAX(id)']; +$avant = $resultat['MAX(id)']; + +$nb_avant = (isset($avant)) ? $avant : 0; -echo '

Création des vignettes dans le dossier photos/thumb/ et insertion dans la base...

'; +echo '

' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' photos/thumb/.

'; +//$b = ($z > 1) ? 'nouvelles images' : 'nouvelle image'; +$b = ($z > 1) ? gettext('new images') : gettext('new image'); +echo '

' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...

'; // Insertion des photos dans la base // Création des vignettes try { - $query2 = "INSERT OR IGNORE INTO photos (filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords) VALUES (:filename, :date, :lens, :exposure, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :titre, :createur, :keywords)"; + $query2 = "INSERT OR IGNORE INTO photos (filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program) VALUES (:filename, :date, :lens, :speed, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :title, :creator, :keywords, :metering, :flash, :focal, :wb, :program)"; $stmt = $conn->prepare($query2); $stmt->bindParam(':filename', $file); $stmt->bindParam(':date', $da); $stmt->bindParam(':lens', $obj); - $stmt->bindParam(':exposure', $ex); + $stmt->bindParam(':speed', $sp); $stmt->bindParam(':iso', $iso); $stmt->bindParam(':width', $wi); $stmt->bindParam(':height', $he); @@ -187,16 +405,25 @@ try { $stmt->bindParam(':legende', $leg); $stmt->bindParam(':copyright', $cop); - $stmt->bindParam(':titre', $tit); - $stmt->bindParam(':createur', $crea); + $stmt->bindParam(':title', $tit); + $stmt->bindParam(':creator', $crea); $stmt->bindParam(':keywords', $mot); + $stmt->bindParam(':metering', $mm); + $stmt->bindParam(':flash', $fla); + $stmt->bindParam(':focal', $fl); + $stmt->bindParam(':wb', $wb); + $stmt->bindParam(':program', $ep); + + //echo count($photos); + //_pr($photos); + if (isset($photos)) { foreach ($photos as $item) { $file = $item['filename']; $da = $item['date']; $obj = $item['lens']; - $ex = $item['exposure']; + $sp = $item['speed']; $iso = $item['iso']; $wi = $item['width']; $he = $item['height']; @@ -209,10 +436,16 @@ try { $leg = $item['legende']; $cop = $item['copyright']; - $tit = $item['titre']; - $crea = $item['createur']; + $tit = $item['title']; + $crea = $item['creator']; $mot = $item['mots_cles']; - + + $mm = $item['metering']; + $fla = $item['flash']; + $fl = $item['focal']; + $wb = $item['wb']; + $ep = $item['program']; + create_thumb($th_w, $th_h, $file); $stmt->execute(); @@ -225,10 +458,10 @@ try { /* Affichage depuis la bdd des dernières images ajoutées */ -/* */ + try { - $query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos WHERE id > ? ORDER BY date DESC"; - //$query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos WHERE lat != '' OR long != '' ORDER BY date DESC"; + $query4 = "SELECT filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program FROM photos WHERE id > ? ORDER BY date DESC"; + //$query4 = "SELECT filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords FROM photos WHERE lat != '' OR long != '' ORDER BY date DESC"; $stmt = $conn->prepare($query4); $stmt->bindValue(1, $nb_avant, SQLITE3_INTEGER); // (1,3...) 1=1ere valeur 3=valeur @@ -243,14 +476,16 @@ try { echo '
'; echo ''; echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; echo ''; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']); $full = host() . $row['filename']; - //echo ' | ' . $row['filename'] . ' | ' . $row['date'] . ' | ' . $row['lens'] . ' | ' . $row['exposure'] . ' | ' . $row['iso'] . ' | ' . $row['width'] . ' | ' . $row['height'] . ' | ' . $row['html'] . ' | ' . $row['aperture'] . ' | ' . $row['model'] . ' | ' . $row['lat'] . ' | ' . $row['long'] . ' | ' . $row['alt'] . ' | ' . $row['legende'] . ' | ' . $row['copyright'] . ' | ' . $row['titre'] . ' | ' . $row['createur'] . " |\r\n"; - echo ''; + + echo ''; } echo '
ThumbFilenameDateLensExposureIsoWidthHeightHtmlApertureModelLatLongAltLegendeCopyrightTitreCreateurKeywords' . gettext('Thumb') . '' . gettext('Filename') . '' . gettext('Date') . '' . gettext('Lens') . '' . gettext('Speed') . '' . gettext('Iso') . '' . gettext('Width') . '' . gettext('Height') . '' . gettext('Html') . '' . gettext('Aperture') . '' . gettext('Model') . '' . gettext('Latitude') . '' . gettext('Longitude') . '' . gettext('Alttitude') . '' . gettext('Legende') . '' . gettext('Copyright') . '' . gettext('Title') . '' . gettext('Creator') . '' . gettext('Keywords') . '' . gettext('Metering') . '' . gettext('Flash') . '' . gettext('Focal') . '' . gettext('Wb') . '' . gettext('Program') . '
' . '' . '' . $row['filename'] . '' . $row['date'] . '' . $row['lens'] . '' . $row['exposure'] . '' . $row['iso'] . '' . $row['width'] . '' . $row['height'] . '' . $row['html'] . '' . $row['aperture'] . '' . $row['model'] . '' . $row['lat'] . '' . $row['long'] . '' . $row['alt'] . '' . $row['legende'] . '' . $row['copyright'] . '' . $row['titre'] . '' . $row['createur'] . '' . $row['keywords'] . '
' . '' . '' . $row['filename'] . '' . $row['date'] . '' . $row['lens'] . '' . $row['speed'] . '' . $row['iso'] . '' . $row['width'] . '' . $row['height'] . '' . $row['html'] . '' . $row['aperture'] . '' . $row['model'] . '' . $row['lat'] . '' . $row['long'] . '' . $row['alt'] . '' . $row['legende'] . '' . $row['copyright'] . '' . $row['title'] . '' . $row['creator'] . '' . $row['keywords'] . '' . $row['metering'] . '' . $row['flash'] . '' . $row['focal'] . '' . $row['wb'] . '' . $row['program'] . '
'; echo '
'; @@ -280,7 +515,8 @@ try { }); - +

">

+ diff --git a/lib2/localize.php b/lib2/localize.php deleted file mode 100644 index af84e01..0000000 --- a/lib2/localize.php +++ /dev/null @@ -1,119 +0,0 @@ - $valeur) { - if ($string == $cle) { - $a = $valeur; - break; - } - } - return $a; - } - -function locale_language_from_browser($languages) { - // Specified by the user via the browser's Accept Language setting - // Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5" - $browser_langs = array(); - - if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $browser_accept = explode(",", $_SERVER['HTTP_ACCEPT_LANGUAGE']); - foreach ($browser_accept as $langpart) { - // The language part is either a code or a code with a quality. - // We cannot do anything with a * code, so it is skipped. - // If the quality is missing, it is assumed to be 1 according to the RFC. - if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($langpart), $found)) { - $browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0); - } - } - } - - // Order the codes by quality - arsort($browser_langs); - //Array ( [en-us] => 1 [en] => 0.7 [fr] => 0.3 ) Firefox Fr - //Array ( [fr-] => 1 [en-] => 1 [fr] => 0.8 [en] => 0.4 ) Chrome 5 Fr - //Array ( [fr-fr] => 1 ) Safari Fr - //Array ( [fr-fr] => 1 ) iCab Fr - //Array ( [zh-] => 1 [fr] => 1 [pt-] => 1 [en-] => 1 [en] => 0.9 [ja] => 0.7 [de] => 0.6 [es] => 0.5 [it] => 0.4 [pt] => 0.3 [pl] => 0.1 [ru] => 0.1 [ko] => 0.1 [sv] => 0.1 [nl] => 0.1 [nb] => 0.1 [da] => 0.1 [fi] => 0.1 ) Opera 10.6 - - // Try to find the first preferred language we have - foreach ($browser_langs as $langcode => $q) { - foreach ($languages as $value) { - /* - $string = strtolower(str_replace('_','-',$value)); - echo $langcode . '-' . $q . '-' . $value . '
'; - if ($string == $langcode) { - echo $value; - return $value; - break; - } - */ - //echo $langcode . '-' . $q . '-' . $value . '
'; - if (substr($langcode, 0, 2) == substr($value, 0, 2)) { - $lang = $value; - break 2; - } - } - } - - if (!isset($lang)) $lang = 'fr_FR'; - return $lang; -} - -// Affiche sur popup (POST=-1) ou une liste de liens (GET=-1) pour choisir la langue -//echo choose_lang($liste_locale, $get=0, $post=-1); -function choose_lang($select_language,$liste, $get, $post) { - global $nation; - if ($get == true) { - $i = 1; - foreach ($liste as $value) { - //echo "" . recherche($nation,$value) . ""; - $links .= "".gettext("flag").""; - if ($i < count($liste)) $links .= ' | '; - $i++; - } - } - elseif ($post == true) { - $links = "
\n"; - $links .= "\n"; - $links .= "
\n"; - } - return $links; - } - - -?> diff --git a/locales/de_DE/LC_MESSAGES/.DS_Store b/locales/de_DE/LC_MESSAGES/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0I`+mnq;5S%*42FE3fv3RVyZ0}^;P(pb zfq#P`?$RfWA>1qmz+leu{22T)EOg@}7<7@=EdP*8s8!JX9P{m1akbPutE6+ivxOzn zXIHnRC+An@!mCxTCbA$G$1&?yreN#3sFW+&h9#YqY#^(O?34}2PNZf7!#%E&_))@R z2tcS)W<#~F3d4qGpDg8kJY_qG7{o`Va(rU6FWGhFlz*>cE5VC4i$mJ~@AmHgp*6QC z^I|g>*U36%bjn?0MMc7q_KIx0XQQiB8|%fkD^xD}P2t4Iq&yn_B(BnJBxjg(UaLiglftTX~e5*x-&T*`GlGhJ_C znYWL3N9+pJRF zru9~xdn7NPnaT zr=Q*&|Guhn{QUnOe;oV`ROs%L-<)!77m!ut*cvq+3&d_VlOtOo^w6PW+OTmyN{cNFm)^QbRqMFm\n" -"Language-Team: German \n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-Basepath: ../../..\n" -"X-Generator: Poedit 3.0.1\n" -"X-Poedit-SearchPath-0: index.php\n" - -#: index.php:48 -msgid "French" -msgstr "Französisch" - -#: index.php:48 -msgid "English" -msgstr "Englisch" - -#: index.php:48 -msgid "German" -msgstr "Deutsche" - -#: index.php:48 -msgid "Spanish" -msgstr "Spanisch" - -#: index.php:128 -msgid "Blog" -msgstr "Blog" - -#: index.php:128 -msgid "Go to the blog..." -msgstr "Zum Blog..." - -#: index.php:130 -msgid "Gallery" -msgstr "Galeries" - -#: index.php:130 -msgid "Visit the gallery..." -msgstr "Besuchen Sie die Galerie..." - -#: index.php:132 -msgid "Piwigo" -msgstr "Piwigo" - -#: index.php:132 -msgid "Visit the Piwigo gallery..." -msgstr "Besuchen Sie die Piwigo-Galerie..." - -#: index.php:134 -msgid "This month" -msgstr "Diesen Monat" - -#: index.php:134 -msgid "Latest images..." -msgstr "Neueste Bilder..." - -#: index.php:141 -msgid "Powered by" -msgstr "Bereitgestellt von" - -#~ msgid "Enter" -#~ msgstr "Eintragen" - -#~ msgid "Tags clouds:" -#~ msgstr "Schlagwortwolke:" - -#~ msgid "Site news:" -#~ msgstr "Website Neues:" - -#~ msgid "Select language" -#~ msgstr "Auswahl Sprachen" - -#~ msgid "Photo of the month..." -#~ msgstr "Foto Monat..." - -#~ msgid "January" -#~ msgstr "Januar" - -#~ msgid "February" -#~ msgstr "Februar" - -#~ msgid "March" -#~ msgstr "März" - -#~ msgid "April" -#~ msgstr "April" - -#~ msgid "May" -#~ msgstr "Mai" - -#~ msgid "June" -#~ msgstr "Juni" - -#~ msgid "July" -#~ msgstr "Juli" - -#~ msgid "August" -#~ msgstr "August" - -#~ msgid "September" -#~ msgstr "September" - -#~ msgid "October" -#~ msgstr "Oktober" - -#~ msgid "November" -#~ msgstr "November" - -#~ msgid "December" -#~ msgstr "Dezember" - -#~ msgid "Now" -#~ msgstr "Jetzt" - -#~ msgid "The " -#~ msgstr "Der " - -#~ msgid "F j, Y, g:i a" -#~ msgstr "d. F Y H:i" - -#~ msgid " at " -#~ msgstr " auf " - -#~ msgid "Focal " -#~ msgstr "Brennweite " - -#~ msgid "Archives" -#~ msgstr "Archives" - -#~ msgid "Previous Page" -#~ msgstr "Vorheriges Seite" - -#~ msgid "prev" -#~ msgstr "zurück" - -#~ msgid "Page" -#~ msgstr "Seite" - -#~ msgid "Next Page" -#~ msgstr "Nächstes Seite" - -#~ msgid "next" -#~ msgstr "weiter" - -#~ msgid "Photo's licence" -#~ msgstr "Foto Lizenz" - -#~ msgid "Links" -#~ msgstr "Links" - -#~ msgid "Photographers" -#~ msgstr "Fotografs" - -#~ msgid "Festivals, competitions..." -#~ msgstr "Fotofestival, Wettbewerb..." - -#~ msgid "Forums" -#~ msgstr "Forums" - -#~ msgid "Photo news" -#~ msgstr "Foto Neues" - -#~ msgid "Equipment" -#~ msgstr "Ausrüstung" - -#~ msgid "Home" -#~ msgstr "Empfang" - -#~ msgid "Guestbook" -#~ msgstr "Gästebuch" - -#~ msgid "Contact" -#~ msgstr "Kontakt" - -#~ msgid "Linkse" -#~ msgstr "Liense" - -#~ msgid "d.m.Y à H:i" -#~ msgstr "F j, Y, g:i a" - -#~ msgid " à " -#~ msgstr " at " diff --git a/locales/en_US/LC_MESSAGES/sentier.mo b/locales/en_US/LC_MESSAGES/sentier.mo deleted file mode 100644 index 7449c604f57b469c56f9d971bf46013b686460aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 412 zcmYjLK~BRk5Cp*~N6s9K!~q1GIw^?Ys+U5GDzzeNQ^XCq$&whQc4WJ#JcRG@7B;O! z8F{oG&)DOiljH9L!XfdLcuqVbUK3j+#3h;cG~3J{Qfodi_b@Kt1+7y?3l_| zm8yWjx^$2kI!>QqhM%ep!K3sjSj^)Xco+CBi|)ita>XOggNbw=GAp&Kr8kytPNXi^ zvP8&GuKsDkP`@qa!E`(w?)#&V2MfhzSGoF=^o1~X&w6hA{#-n&$V^$ zXkn;xQz%^umMoPI(t2%W4I^V$PB7hUrR&E%w%hhEG&}3F=&~2Q!V_w=yDz5(3*}ii npoF#j|vg diff --git a/locales/en_US/LC_MESSAGES/sentier.po b/locales/en_US/LC_MESSAGES/sentier.po deleted file mode 100644 index aa8b7bc..0000000 --- a/locales/en_US/LC_MESSAGES/sentier.po +++ /dev/null @@ -1,73 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-05 17:48+0100\n" -"PO-Revision-Date: 2022-03-05 17:48+0100\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en_US\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0.1\n" -"X-Poedit-Basepath: ../../..\n" -"X-Poedit-SearchPath-0: index.php\n" - -#: index.php:48 -msgid "French" -msgstr "" - -#: index.php:48 -msgid "English" -msgstr "" - -#: index.php:48 -msgid "German" -msgstr "" - -#: index.php:48 -msgid "Spanish" -msgstr "" - -#: index.php:128 -msgid "Blog" -msgstr "" - -#: index.php:128 -msgid "Go to the blog..." -msgstr "" - -#: index.php:130 -msgid "Gallery" -msgstr "" - -#: index.php:130 -msgid "Visit the gallery..." -msgstr "" - -#: index.php:132 -msgid "Piwigo" -msgstr "" - -#: index.php:132 -msgid "Visit the Piwigo gallery..." -msgstr "" - -#: index.php:134 -msgid "This month" -msgstr "" - -#: index.php:134 -msgid "Latest images..." -msgstr "" - -#: index.php:141 -msgid "Powered by" -msgstr "" diff --git a/locales/es_ES/LC_MESSAGES/sentier.mo b/locales/es_ES/LC_MESSAGES/sentier.mo deleted file mode 100644 index c6cb6767d2216ea5e9242c3b1806a258d0b411ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1918 zcmZvbO>7)B6vtiK^09mrT0RN{aG($>I?E;{BHA=S((Hyr`B-%qS`K`8XPp^0UVCJF z(gu(af&-Q4rBW}P+6xjAAi)Jry+m+=0}|(6dPGP_h*K~8->%aL32UBz^Xz%gf7@@a zAKZ7Dp^d>tV4XdTO@g1_h7Rq$y^QSx1-Ktv2k!(mcsp3e`47Q6;C~$FFGT+mNO50) z_kvgA{I?**{}6c%r1+nr|0{SG{NF)Z|9YIi5&b_R{{kuhKan>6MnF952)c*Bqu>GXRgiS9MgMJ(^7KK9I|ovpk3c-^lgQ5^FM=0vhL@s0f=!aX zQIK?ufwb=$I())jj^iglTBiZhI%^;vb{ZY&c_)tRI37UC_d(>RasDEBKgKVEwCw%PiBhHr~j%|?h2sj3#dD{C^u*0yYVNby5z9`p|u$^`fUY^-;BB`FA zgVBA_Sv(4(b~o&C80p(-JigE#9)mp$yDyGC8wrVny^wy|Go2GPIyY*M48ab9bOxj3 za}hY3Eu7M9)}^`Hl%CC&S?L3t(>7x#tqCFxY+k0a-<6IvOs193!2qwx&mQA%9phPD zalx9h>q_CaSktCLbJldyq&Zs4n;OtyWnUJ|rC{jMpMqhsfn9GU-Usuk+!_@)J03V_!?Lzf_B~s?555 z<<_@#F8#ZWc4cL8rLik^yjrW!twL7?r2+5A+#`_)aqQBo;+VI@}k1HG$`HfZs}T-Zf1S3 z|0!L|=2fb2uTHW>6z}#|o{HCr|Epf<>~8T2lhVg1U+K2L5o}h={`OUa`s_N(dy>;l z27y(#%AP<{ibfeL>J9pa!KL7bLMgv*sgx~itE^NwddZ9JtC=!_YC5W$&8-tu)+K3e z#rY-`c28>Fm!4{Rc~HwrkN_?CI;MBN<$``nWgSWxrJbV8BuAv`Dccu=`i@IAd?B{K Uvzj$DJ6Q_Tv&`=(W4E&W3r4Awg8%>k diff --git a/locales/es_ES/LC_MESSAGES/sentier.po b/locales/es_ES/LC_MESSAGES/sentier.po deleted file mode 100644 index a323b19..0000000 --- a/locales/es_ES/LC_MESSAGES/sentier.po +++ /dev/null @@ -1,176 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: sur-le-sentier.fr\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-05 17:50+0100\n" -"PO-Revision-Date: 2022-03-05 20:54+0100\n" -"Last-Translator: \n" -"Language-Team: French \n" -"Language: es_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0.1\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-SearchPath-0: index.php\n" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:37 -msgid "Enter" -msgstr "Entrar" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "French" -msgstr "Francés" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "English" -msgstr "Inglés" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "German" -msgstr "Alemán" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "Spanish" -msgstr "Español" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:52 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:364 -msgid "Photo of the month..." -msgstr "Foto del mes..." - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:171 -msgid "January" -msgstr "Enero" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:174 -msgid "February" -msgstr "Febrero" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:177 -msgid "March" -msgstr "Marzo" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:180 -msgid "April" -msgstr "Abril" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:183 -msgid "May" -msgstr "Mayo" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:186 -msgid "June" -msgstr "Junio" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:189 -msgid "July" -msgstr "Julio" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:192 -msgid "August" -msgstr "Agosto" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:195 -msgid "September" -msgstr "Septiembre" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:198 -msgid "October" -msgstr "Octubre" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:201 -msgid "November" -msgstr "Noviembre" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:204 -msgid "December" -msgstr "Diciembre" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:344 -msgid "When" -msgstr "Cuando" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:344 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:349 -msgid "Now" -msgstr "Ahora" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:350 -msgid "Blog" -msgstr "Blog" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:351 -msgid "Gallery" -msgstr "Galería" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:352 -msgid "Guestbook" -msgstr "Libro de visitas" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:353 -msgid "Contact" -msgstr "Contacto" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:354 -msgid "Links" -msgstr "Enlaces" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:476 -msgid "The" -msgstr "El" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:476 -msgid "F j, Y, g:i a" -msgstr "F j, Y, g:i a" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:478 -msgid " at " -msgstr " en " - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:478 -msgid "Focal " -msgstr "Focal " - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:629 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:630 -msgid "Archives" -msgstr "Archivos" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:630 -msgid "Help" -msgstr "Ayuda" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:673 -msgid "Previous Page" -msgstr "Página anterior" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:673 -msgid "prev" -msgstr "anterior" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:676 -msgid "Page" -msgstr "Página" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:682 -msgid "Next Page" -msgstr "Siguiente página" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:682 -msgid "next" -msgstr "siguiente" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:704 -msgid "Select language" -msgstr "Seleccione el idioma" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:706 -msgid "Photo's licence" -msgstr "Licencia de la foto" diff --git a/locales/fr_FR/LC_MESSAGES/sentier.mo b/locales/fr_FR/LC_MESSAGES/sentier.mo deleted file mode 100644 index ecaaad8c63ac817afbcefea505c9abc746e8d851..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1364 zcmb7@J8u**5Xa3Mjz5^WwL2}y`Z#6b>3hn&61uF;;ovVA0>K!^$? z8VV#n0gsP?A|wiG=s-fEfv-Tp-?v8+i2%Y{-_LWN8UNQi^Xd5BXAI*Q=1I&am?toQ zV1{vd7h~tZd2lb-0S|!p!2RIEp8dFIKLyX@|K~mXEm(v79t?3Gd-iAW0_<;KKX__4 zV_&hp1_pZ=hlTSp{DimyJOuh4?}G?_n0Wg?doqNC#|7(QUkQcJLI>MRZu8v>^J)2|9l~VJxkj{uio}TWU6ExW|(d-zo7j5+G48Gi#_- zl^NDBt7NIgm)F@6P7KMLxpKU1w9na1<&^(p#wrERDizyu|2^z?|AsYpDD`5#C2o>+ z%IJi-(?X^A5NV|JikX13&N{ey(InYU zcy-_Z@J%>GF3vB`Y`sK1ifhxjNxXz;u9wi}Y0dYSg;aW!r@6F_{P>OLtQgty3ldkz ziW!}nmeN_mN0ybZHHwavg_t$A?GmobuIa`HMtQXyKco2sub&;Q-4b)8$yRUKFx0{~ z9E{?qj-ARBS7?3J*p^#R&L=!0A9Ri0-g20dj!NnCghx?-_u1N8G98=JbfrGwmHf@r zOC)WYHxMi0ge%>mwW!R?8r!KTFOk)1#Y^Q-@ltQR466o;V8s;5ut`)u z>b})o*ibRN_^;ZxrtB1M<25g(Wi#lwOq+sD6RKZ1vGGz>4M4~%ckC&YGFe5u>Vz*3 QUi|8=ZU_7`Zd=Rz1VgcRjQ{`u diff --git a/locales/fr_FR/LC_MESSAGES/sentier.po b/locales/fr_FR/LC_MESSAGES/sentier.po deleted file mode 100644 index 9c9a45f..0000000 --- a/locales/fr_FR/LC_MESSAGES/sentier.po +++ /dev/null @@ -1,183 +0,0 @@ -# French translations for PACKAGE package. -# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Bruno Pesenti <>, 2016. -# -msgid "" -msgstr "" -"Project-Id-Version: sur-le-sentier.fr\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-05 17:38+0100\n" -"PO-Revision-Date: 2022-03-05 17:51+0100\n" -"Last-Translator: Bruno \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.0.1\n" -"X-Poedit-KeywordsList: gettext;_\n" -"X-Poedit-Basepath: ../../..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: index.php\n" - -#: index.php:48 -msgid "French" -msgstr "Français" - -#: index.php:48 -msgid "English" -msgstr "Anglais" - -#: index.php:48 -msgid "German" -msgstr "Allemand" - -#: index.php:48 -msgid "Spanish" -msgstr "Espagnol" - -#: index.php:128 -msgid "Blog" -msgstr "Blog" - -#: index.php:128 -msgid "Go to the blog..." -msgstr "Aller sur le blog..." - -#: index.php:130 -msgid "Gallery" -msgstr "Portfolio" - -#: index.php:130 -msgid "Visit the gallery..." -msgstr "Visiter la galerie..." - -#: index.php:132 -msgid "Piwigo" -msgstr "Piwigo" - -#: index.php:132 -msgid "Visit the Piwigo gallery..." -msgstr "Visiter la galerie Piwigo…" - -#: index.php:134 -msgid "This month" -msgstr "Ce mois-çi" - -#: index.php:134 -msgid "Latest images..." -msgstr "Dernières images..." - -#: index.php:141 -msgid "Powered by" -msgstr "Propulsé par" - -#~ msgid "WordPress" -#~ msgstr "WordPress" - -#~ msgid "Zenphoto" -#~ msgstr "Zenphoto" - -#~ msgid "Contact" -#~ msgstr "Contact" - -#~ msgid "Enter" -#~ msgstr "Entrer" - -#~ msgid "Photo of the month..." -#~ msgstr "Photo du mois..." - -#~ msgid "January" -#~ msgstr "Janvier" - -#~ msgid "February" -#~ msgstr "Février" - -#~ msgid "March" -#~ msgstr "Mars" - -#~ msgid "April" -#~ msgstr "Avril" - -#~ msgid "May" -#~ msgstr "Mai" - -#~ msgid "June" -#~ msgstr "Juin" - -#~ msgid "July" -#~ msgstr "Juillet" - -#~ msgid "August" -#~ msgstr "Aout" - -#~ msgid "September" -#~ msgstr "Septembre" - -#~ msgid "October" -#~ msgstr "Octobre" - -#~ msgid "November" -#~ msgstr "Novembre" - -#~ msgid "December" -#~ msgstr "Décembre" - -#~ msgid "Now" -#~ msgstr "En ce moment" - -#~ msgid "Guestbook" -#~ msgstr "Livre d'Or" - -#~ msgid "Links" -#~ msgstr "Liens" - -#~ msgid "The" -#~ msgstr "Le" - -#~ msgid "F j, Y, g:i a" -#~ msgstr "d m Y à G:i" - -#~ msgid " at " -#~ msgstr " à " - -#~ msgid "Focal " -#~ msgstr "Focale " - -#~ msgid "Archives" -#~ msgstr "Archives" - -#~ msgid "Help" -#~ msgstr "Aide" - -#~ msgid "Previous Page" -#~ msgstr "Page précédente" - -#~ msgid "prev" -#~ msgstr "prec" - -#~ msgid "Page" -#~ msgstr "Page" - -#~ msgid "Next Page" -#~ msgstr "Page suivante" - -#~ msgid "next" -#~ msgstr "suiv" - -#~ msgid "Select language" -#~ msgstr "Choix du language" - -#~ msgid "Photo's licence" -#~ msgstr "License des photos" - -#~ msgid "Tags clouds:" -#~ msgstr "Nuage de mot-clés:" - -#~ msgid "Site news:" -#~ msgstr "Nouveautés du site:" - -#~ msgid "See my last work..." -#~ msgstr "Voir mes dernières photos..." diff --git a/locales/sentier.pot b/locales/sentier.pot deleted file mode 100644 index 067b66c..0000000 --- a/locales/sentier.pot +++ /dev/null @@ -1,175 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: sur-le-sentier.fr\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-05 17:50+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: French \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.0.1\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-SearchPath-0: index.php\n" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:37 -msgid "Enter" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "French" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "English" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "German" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:39 -msgid "Spanish" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:52 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:364 -msgid "Photo of the month..." -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:171 -msgid "January" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:174 -msgid "February" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:177 -msgid "March" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:180 -msgid "April" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:183 -msgid "May" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:186 -msgid "June" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:189 -msgid "July" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:192 -msgid "August" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:195 -msgid "September" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:198 -msgid "October" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:201 -msgid "November" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:204 -msgid "December" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:344 -msgid "When" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:344 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:349 -msgid "Now" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:350 -msgid "Blog" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:351 -msgid "Gallery" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:352 -msgid "Guestbook" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:353 -msgid "Contact" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:354 -msgid "Links" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:476 -msgid "The" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:476 -msgid "F j, Y, g:i a" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:478 -msgid " at " -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:478 -msgid "Focal " -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:629 -#: /Library/WebServer/Documents/photoblog/ce-mois.php:630 -msgid "Archives" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:630 -msgid "Help" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:673 -msgid "Previous Page" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:673 -msgid "prev" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:676 -msgid "Page" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:682 -msgid "Next Page" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:682 -msgid "next" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:704 -msgid "Select language" -msgstr "" - -#: /Library/WebServer/Documents/photoblog/ce-mois.php:706 -msgid "Photo's licence" -msgstr "" diff --git a/photo-du-mois-lc.php b/photo-du-mois-lc.php deleted file mode 100644 index 8413dfe..0000000 --- a/photo-du-mois-lc.php +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - Photo du mois - - - - - - - - - - - - - - -

- - - -prepare($query4); - $stmt->execute(array($limit, $offset)); - - $result = $stmt->fetchAll(PDO::FETCH_ASSOC); - $rowcount = count($result); - - $conn4 = null; - } - catch(PDOException $e) { - echo $e->getMessage(); - } - - $photo_du_mois = $result[0]; - $z = $photo_du_mois['date']; - - $photo_du_mois['titre'] = "Titre"; - $photo_du_mois['legende'] = "Légende"; - - if (!empty($photo_du_mois['titre'])) { - $x = $photo_du_mois['titre']; - $y = $photo_du_mois['legende']; - } - elseif (!empty($photo_du_mois['legende'])) { - $x = $photo_du_mois['legende']; - } - else { - $x = basename($photo_du_mois['filename']); - $y = ""; - } - - $month_exif = $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} " . $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO"; -?> - -

- -'; - echo ''; - // data-lcl-author= - echo ''; - - echo ""; - echo ''; - - if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) { - ?> -

-

- '; - //echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} "; - //echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO"; - echo $month_exif; - echo ''; -?> - - -'; - } - - /* - $rowcount = 5 - 10 - 15 => add 0 - $rowcount = 4 - 9 - 14 => add 1 - $rowcount = 3 - 8 - 13 => add 2 - $rowcount = 2 - 7 - 12 => add 3 - $rowcount = 1 - 6 - 11 => add 4 - */ - - if ($rowcount % 4 == 0) $blank = 1; - elseif ($rowcount % 3 == 0) $blank = 2; - elseif ($rowcount % 2 == 0) $blank = 3; - elseif ($rowcount % 1 == 0) $blank = 4; - - for ($i = 1; $i <= $blank; $i++) { - echo '
'; - echo '
'; - } - ?> - - - - - - -prepare($query4); - $stmt->execute(); - - $result = $stmt->fetch(PDO::FETCH_ASSOC); - $numRows = $result['count']; - - $conn4 = null; - } - catch(PDOException $e) { - echo $e->getMessage(); - } - - -// calcul du nombre de pages (arrondi a l'entier supérieur) -$nbpages = ceil($numRows / 12); -$prec = $page - 1; -$suiv = $page + 1; - -echo ''; - -?> - -

@ 2022

- - - - - - - \ No newline at end of file diff --git a/photo-du-mois.php b/photo-du-mois.php index d95c7ea..6dd58d2 100644 --- a/photo-du-mois.php +++ b/photo-du-mois.php @@ -5,104 +5,56 @@ - Document - - + <?= _("Picture of the month");?> - - + + + + -// Include Lightbox -import PhotoSwipeLightbox from './js/photoswipe-lightbox.esm.js'; + $liste_locale = list_dir($dir_locales); + if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages); + else $langue = $_REQUEST['lang']; -const backEasing = { - in: 'cubic-bezier(0.6, -0.28, 0.7, 1)', - out: 'cubic-bezier(0.3, 0, 0.32, 1.275)', - inOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)' -}; + $domain = 'sentier'; + putenv('LC_ALL=' . $langue); + $loc = setlocale(LC_ALL, $langue); -const options = { - // may select multiple "galleries" - gallery: '#gallery--simple', + bindtextdomain($domain, $root . '/Locale/'); + bind_textdomain_codeset($domain, 'UTF-8'); + textdomain($domain); + + $nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') ); - // Elements within gallery (slides) - children: 'a', - //showHideAnimationType: 'zoom', - //showAnimationDuration: 1000, - //hideAnimationDuration: 1000, + include 'functions.php'; +?> - // Include PhotoSwipe Core - // and use absolute path (that starts with http(s)://) - //pswpModule: 'https://airbook.local/sls/js/photoswipe.esm.js' - pswpModule: 'https:///sls/js/photoswipe.esm.js' -}; - -const lightbox = new PhotoSwipeLightbox(options); -lightbox.on('uiRegister', function() { - lightbox.pswp.ui.registerElement({ - name: 'custom-caption', - order: 9, - isButton: false, - appendTo: 'root', - html: 'Caption text', - onInit: (el, pswp) => { - lightbox.pswp.on('change', () => { - const currSlideElement = lightbox.pswp.currSlide.data.element; - let captionHTML = ''; - if (currSlideElement) { - const hiddenCaption = currSlideElement.querySelector('.hidden-caption-content'); - if (hiddenCaption) { - // get caption from element with class hidden-caption-content - captionHTML = hiddenCaption.innerHTML; - } else { - // get caption from alt attribute - captionHTML = currSlideElement.querySelector('img').getAttribute('alt'); - } - } - el.innerHTML = captionHTML || ''; - }); - } - }); -}); -lightbox.init(); - -lightbox.on('firstUpdate', () => { - lightbox.pswp.options.easing = backEasing.out; -}); -lightbox.on('initialZoomInEnd', () => { - lightbox.pswp.options.easing = backEasing.inOut; -}); -lightbox.on('close', () => { - lightbox.pswp.options.easing = backEasing.in; -}); - -lightbox.init(); - + - -

+ +

prepare($query4); $stmt->execute(array($limit, $offset)); @@ -119,42 +71,57 @@ try { $photo_du_mois = $result[0]; $z = $photo_du_mois['date']; - $photo_du_mois['titre'] = "Titre"; + $photo_du_mois['title'] = "Titre"; $photo_du_mois['legende'] = "Légende"; + + if (!empty($photo_du_mois['title'])) { + $x = $photo_du_mois['title']; + $y = $photo_du_mois['legende']; + } + elseif (!empty($photo_du_mois['legende'])) { + $x = $photo_du_mois['legende']; + } + else { + $x = basename($photo_du_mois['filename']); + $y = ""; + } + $month_exif = $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} " . $photo_du_mois['speed'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO"; ?>

'; - echo ''; + echo '
'; + echo ''; + echo ''; + echo ""; echo '
'; if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) { ?> -

+

'; - echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} "; - echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO"; + //echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} "; + //echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO"; + echo $month_exif; echo ''; ?> - + + + getMessage(); } - // calcul du nombre de pages (arrondi a l'entier supérieur) -$nbpages = ceil($numRows / 12); +$nbpages = ceil($numRows / 13); $prec = $page - 1; $suiv = $page + 1; -echo '