29-03-2022

This commit is contained in:
2022-03-29 12:51:24 +02:00
parent 414346b7f1
commit 6ebef5c974
16 changed files with 467 additions and 1360 deletions

View File

@@ -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;
}
}
?>

View File

@@ -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){
<div class="texte"><a href="/piwigo/" title="<?php echo gettext('Piwigo'); ?>"> <?php echo gettext('Visit the <span class="green">Piwigo gallery...</span>'); ?></a></div>
<div class="texte"><a href="/photoblog/ce-mois.php" title="<?php echo gettext('This month'); ?>"> <?php echo gettext('<span class="green">Latest</span> images...'); ?></a></div>
<div class="texte"><a href="photo-du-mois.php" title="<?php echo gettext('This month'); ?>"> <?php echo gettext('Picture of the <span class="green">month</span> ...'); ?></a></div>
</div>
</div>

View File

@@ -12,7 +12,29 @@
<link rel='stylesheet' href='css/open_close_fx.css' />
<link rel='stylesheet' href='css/minimal.css' />
<?php include 'functions.php'; ?>
<?php
//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 . '/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 . '/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') );
include 'functions.php';
?>
<script src='https://code.jquery.com/jquery-3.2.1.min.js' type='text/javascript'></script>
</head>
@@ -20,16 +42,18 @@
<body>
<?php
$base = 'db_photo.sqlite3';
// Taille des vignettes
$th_w = 300;
$th_h = 300;
//Get a list of file paths using the glob function.
$fileList = glob('photos/img/*');
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/');
echo '<h3>Creation de la base <i>' . $base . '</i> et de la table <i>photo</i> (si nécessaire)...</h3>';
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i>photos/img/</i> ...</h3>';
echo '<h3>' . gettext("Creation of the database") . ' <i>' . $base . '</i> ' . gettext("and the table") . ' <i>photo</i> (' . gettext("if necessary") . ')...</h3>';
// 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 '<h3>Lecture des fichiers images dans le dossier <i>photos/img/</i>...</h3>';
echo '<h3>' . gettext('Read image files in the folder') . ' <i>photos/img/</i>...</h3>';
$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 . "<br>";
$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 '<h3>' . gettext('No new image files to add') . '...</h3>';
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 '<h3>Création des vignettes dans le dossier <i>photos/thumb/</i> et insertion dans la base...</h3>';
echo '<h3>' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' <i>photos/thumb/</i>.</h3>';
//$b = ($z > 1) ? 'nouvelles images' : 'nouvelle image';
$b = ($z > 1) ? gettext('new images') : gettext('new image');
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
// 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 '<div id="add_to_bdd">';
echo '<table class="styled-table">';
echo '<thead>';
echo '<th>Thumb</th><th>Filename</th><th>Date</th><th>Lens</th><th>Exposure</th><th>Iso</th><th>Width</th><th>Height</th><th>Html</th><th>Aperture</th><th>Model</th><th>Lat</th><th>Long</th><th>Alt</th><th>Legende</th><th>Copyright</th><th>Titre</th><th>Createur</th><th>Keywords</th>';
echo '<th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th><th>' . gettext('Html') . '</th>';
echo '<th>' . gettext('Aperture') . '</th><th>' . gettext('Model') . '</th><th>' . gettext('Latitude') . '</th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th>';
echo '</thead>';
echo '<tbody>';
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 '<tr><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['date'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['exposure'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['html'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['model'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['legende'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['titre'] . '</td><td>' . $row['createur'] . '</td><td>' . $row['keywords'] . '</td></tr>';
echo '<tr><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['date'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['html'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['model'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['legende'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['program'] . '</td></tr>';
}
echo '</tbody></table>';
echo '</div>';
@@ -280,7 +515,8 @@ try {
});
</script>
<h4><a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a></h4>
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
<script src='js/alloy_finger.min.js' type='text/javascript'></script>

View File

@@ -1,119 +0,0 @@
<?php
//liste le dossiers des locales
function list_dir($dir) {
if ($handle = opendir($dir)) {
$files = array();
while(false!==($file = readdir($handle))) {
if (is_dir($dir . '/' . $file)) {
$files[] = $file;
}
}
closedir($handle);
sort($files);
$i = 0;
global $myLanguages;
$myLanguages = array();
foreach($files as $f) {
if (strstr($f,'.') == false) {
$myLanguages[$i] = $f;
$i++;
}
//$myLanguages[] = $f;
}
}
else {
echo 'error: missing language files';
exit;
}
//print_r($myLanguages);
return $myLanguages;
}
function recherche($tableau, $string) {
foreach ($tableau as $cle => $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 . '<br>';
if ($string == $langcode) {
echo $value;
return $value;
break;
}
*/
//echo $langcode . '-' . $q . '-' . $value . '<br>';
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 "<a href = '" . $_SERVER['PHP_SELF'] ."?lang=" . $value . "'>" . recherche($nation,$value) . "</a>";
$links .= "<a href = '" . $_SERVER['PHP_SELF'] ."?lang=" . $value . "'><img src='../images/flags/" . strtolower(substr($value, 3, 2)) . ".png' class='' width='18' height='12' alt='".gettext("flag")."' /></a>";
if ($i < count($liste)) $links .= ' | ';
$i++;
}
}
elseif ($post == true) {
$links = "<form name='language' action=" . $_SERVER['PHP_SELF'] . " method='post'>\n";
$links .= "<select onchange = 'document.language.submit()' name='lang'>\n";
$links .= "<option selected='selected'>" . gettext($select_language) ."</option>\n";
foreach ($liste as $value) {
$links .= "<option value='" . $value . "'>" . recherche($nation,$value) . "</option>\n";
}
$links .= "</select>\n";
$links .= "</form>\n";
}
return $links;
}
?>

Binary file not shown.

Binary file not shown.

View File

@@ -1,193 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: sur-le-sentier.fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 17:43+0100\n"
"PO-Revision-Date: 2022-03-06 07:35+0100\n"
"Last-Translator: Bruno <digitrebel@free.fr>\n"
"Language-Team: German <bruno@clicclac.info>\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 <span class=\"green\">blog...</span>"
msgstr "Zum <span class=\"green\">Blog...</span>"
#: index.php:130
msgid "Gallery"
msgstr "Galeries"
#: index.php:130
msgid "Visit the <span class=\"green\">gallery...</span>"
msgstr "Besuchen Sie die <span class=\"green\">Galerie...</span>"
#: index.php:132
msgid "Piwigo"
msgstr "Piwigo"
#: index.php:132
msgid "Visit the <span class=\"green\">Piwigo gallery...</span>"
msgstr "Besuchen Sie die <span class=\"green\">Piwigo-Galerie...</span>"
#: index.php:134
msgid "This month"
msgstr "Diesen Monat"
#: index.php:134
msgid "<span class=\"green\">Latest</span> images..."
msgstr "<span class=\"green\">Neueste</span> 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 "

Binary file not shown.

View File

@@ -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 <EMAIL@ADDRESS>, 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 <span class=\"green\">blog...</span>"
msgstr ""
#: index.php:130
msgid "Gallery"
msgstr ""
#: index.php:130
msgid "Visit the <span class=\"green\">gallery...</span>"
msgstr ""
#: index.php:132
msgid "Piwigo"
msgstr ""
#: index.php:132
msgid "Visit the <span class=\"green\">Piwigo gallery...</span>"
msgstr ""
#: index.php:134
msgid "This month"
msgstr ""
#: index.php:134
msgid "<span class=\"green\">Latest</span> images..."
msgstr ""
#: index.php:141
msgid "Powered by"
msgstr ""

Binary file not shown.

View File

@@ -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 <EMAIL@ADDRESS>, 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 <bruno@clicclac.info>\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"

Binary file not shown.

View File

@@ -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 <bruno@clicclac.info>\n"
"Language-Team: French <bruno@clicclac.info>\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 <span class=\"green\">blog...</span>"
msgstr "Aller sur le <span class=\"green\">blog...</span>"
#: index.php:130
msgid "Gallery"
msgstr "Portfolio"
#: index.php:130
msgid "Visit the <span class=\"green\">gallery...</span>"
msgstr "Visiter la <span class=\"green\">galerie...</span>"
#: index.php:132
msgid "Piwigo"
msgstr "Piwigo"
#: index.php:132
msgid "Visit the <span class=\"green\">Piwigo gallery...</span>"
msgstr "Visiter la <span class=\"green\">galerie Piwigo…</span>"
#: index.php:134
msgid "This month"
msgstr "Ce mois-çi"
#: index.php:134
msgid "<span class=\"green\">Latest</span> images..."
msgstr "<span class=\"green\">Dernières</span> 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 <span class=\"green\">last work...</span>"
#~ msgstr "Voir mes <span class=\"green\">dernières photos...</span>"

View File

@@ -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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
"Language-Team: French <bruno@clicclac.info>\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 ""

View File

@@ -1,274 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Photo du mois</title>
<link rel="stylesheet" href="css/sls.css">
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
<link rel='stylesheet' href='css/open_close_fx.css' />
<link rel='stylesheet' href='css/minimal.css' />
<?php include 'functions.php'; ?>
<script src='https://code.jquery.com/jquery-3.2.1.min.js' type='text/javascript'></script>
</head>
<body>
<h1 class="_h1"><?php echo gettext("Photo du mois"); ?></h1>
<?php
if (!isset($_GET['page'])) $page = 1;
// sinon on recupere la valeur numerique reçue en paramètre
else $page = intval($_GET['page']);
?>
<?php
try {
$conn4 = new PDO('sqlite:db_photo.sqlite3');
$query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos ORDER BY date DESC LIMIT ? OFFSET ?";
//nb d'archive par page
$limit = 13;
$offset = $limit * ($page -1);
//echo "offset: " . $offset;
$stmt = $conn4->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";
?>
<p class="month"><?php echo month($z); ?></p>
<?php
//_pr($photo_du_mois);
echo '<div class="cadre" id="lcl_month">';
echo '<a href ="' . host() . $photo_du_mois['filename'] . '" title="' . $x . '" data-lcl-txt="' . $y .'" data-lcl-author="' . $month_exif . '">';
// data-lcl-author=
echo '<img src="' . host() . $photo_du_mois['filename'] . '" class="trois" />';
echo "</a>";
echo '</div>';
if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) {
?>
<p class="titrePhoto"><?php echo $photo_du_mois['titre']; ?></p>
<p class="legendePhoto"><?php echo $photo_du_mois['legende']; ?></p>
<?php }
echo '<div class="exif">';
//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 '</div>';
?>
<div class="myGallery" id="lcl_gallery">
<?php
/**/
for ($i = 1; $i <= ($rowcount -1); $i++) {
$file = $result[$i]['filename'];
$date = $result[$i]['date'];
$objectif = $result[$i]['lens'];
$exposure = $result[$i]['exposure'];
$iso = $result[$i]['iso'];
$width = $result[$i]['width'];
$height = $result[$i]['height'];
$html = $result[$i]['html'];
$aperture = $result[$i]['aperture'];
$model = $result[$i]['model'];
$lat = $result[$i]['lat'];
$long = $result[$i]['long'];
$alt = $result[$i]['alt'];
$legende = $result[$i]['legende'];
$copy = $result[$i]['copyright'];
$titre = $result[$i]['titre'];
$createur = $result[$i]['createur'];
$keywords = $result[$i]['keywords'];
//$keywords = str_replace(',', ' - ', $keywords);
$keywords = "\u{1F3F7} " . str_replace(',', " \u{30FB} ", $keywords);
if (!empty($titre)) {
$x = $titre;
$y = $legende;
}
elseif (!empty($legende)) {
$x = $legende;
}
else {
$x = basename($file);
$y = "";
}
$exif = $model . " \u{30FB} " . $objectif . " \u{30FB} " . $exposure . " \u{30FB} " . $aperture . " \u{30FB} " . $iso . "ISO";
$thumb = str_replace("photos/img", "photos/thumb", $file);
echo '<div class="item">';
echo '<a href ="' . host() . $file . '" title="' . $x . '" data-lcl-txt="' . $y .'" data-lcl-author="' . $exif . '">';
echo '<img src="' . host() . $thumb . '" alt="' . $x . '" />';
echo "</a>";
echo '<span class="caption">' . month($date) . '</span>';
echo '</div>';
}
/*
$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 '<div class="item">';
echo '</div>';
}
?>
</div>
<script type='text/javascript'>
$(document).ready(function() {
/* var $obj = lc_lightbox('#lcl_elems_wrapper a');*/
var $obj = lc_lightbox('#lcl_gallery a', {
img_zoom : true,
/* */
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
fading_time : 50, // durée de l'animation de fondu des éléments
slideshow_time : 4000, // durée de l'intervalle du diaporama
animation_time : 100,
counter : false, // s'il faut afficher le compteur d'éléments
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
max_width : '95%', // largeur maximale de la lightbox
max_height : '95%', // hauteur maximale de la lightbox
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
skin : 'minimal', // minimal | light | dark
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
shox_title : true, // s'il faut afficher les titres
show_descr : false, // s'il faut afficher les descriptions
show_author : true, // s'il faut afficher les auteurs
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
fullscreen : true, // Autoriser ou non le mode plein écran
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
download : true, // whether to show element's file download button
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
});
var $obj = lc_lightbox('#lcl_month a', {
img_zoom : true,
deeplink : true,
open_close_time : 200,
ol_time_diff : 100,
wrap_class : 'lcl_zoomin_oc',
skin : 'minimal',
txt_hidden : true,
fullscreen : true,
fs_img_behavior : 'smart',
browser_fs_mode : true,
rclick_prevent : true,
});
});
</script>
<?php
try {
$conn4 = new PDO('sqlite:db_photo.sqlite3');
$query4 = "SELECT COUNT(*) AS count FROM photos";
$stmt = $conn4->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 '<div class="navPage">' . gettext("Page: ");
if ($page >= 2) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$prec.'" title="'.gettext("Previous Page").'">&laquo; '.gettext("prev").'</a>&nbsp;';
for ($i = 1; $i <= $nbpages; $i++) {
if ($i != $page) {
echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$i.'" title="'.gettext("Page").' '.$i.'">'.$i.' </a>&nbsp;';
}
else {
echo "<span class='gras'>".$i."</span>&nbsp;&nbsp;";
}
}
if ($page < $nbpages) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$suiv.'" title="'.gettext("Next Page").'">'.gettext("next").' &raquo;</a>&nbsp;';
echo '</div>';
?>
<p><em><small>@ 2022</small></em></p>
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
</body>
</html>

View File

@@ -5,104 +5,56 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/photoswipe.css">
<!--script src="js/photoswipe.esm.js"></script>
<script src="js/photoswipe-lightbox.esm.js"></script-->
<title><?= _("Picture of the month");?></title>
<link rel="stylesheet" href="css/sls.css">
<?php include 'functions.php'; ?>
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
<link rel='stylesheet' href='css/open_close_fx.css' />
<link rel='stylesheet' href='css/minimal.css' />
<?php
//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 . '/Locale';
<script type="module">
// 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://<?php echo $_SERVER["SERVER_NAME"]; ?>/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();
</script>
<script src='https://code.jquery.com/jquery-3.2.1.min.js' type='text/javascript'></script>
</head>
<body>
<h1 class="_h1"><?php echo gettext("Photo du mois"); ?></h1>
<h1 class="_h1"> <?= _("Picture of the month");?></h1>
<?php
if (!isset($_GET['page'])) $page = 1;
// sinon on recupere la valeur numerique reçue en paramètre
else $page = intval($_GET['page']);
?>
<?php
try {
$conn4 = new PDO('sqlite:db_photo.sqlite3');
$query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos ORDER BY date DESC LIMIT ? OFFSET ?";
$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 ORDER BY date DESC LIMIT ? OFFSET ?";
//nb d'archive par page
$limit = 13;
$offset = $limit * ($page -1);
//echo "offset: " . $offset;
$stmt = $conn4->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";
?>
<p class="month"><?php echo month($z); ?></p>
<?php
//_pr($photo_du_mois);
echo '<div class="cadre">';
echo '<img src="' . $photo_du_mois['filename'] . '" class="trois" />';
echo '<div class="cadre" id="lcl_month">';
echo '<a href ="' . host() . $photo_du_mois['filename'] . '" title="' . $x . '" data-lcl-txt="' . $y .'" data-lcl-author="' . $month_exif . '">';
echo '<img src="' . host() . $photo_du_mois['filename'] . '" class="trois" />';
echo "</a>";
echo '</div>';
if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) {
?>
<p class="titrePhoto"><?php echo $photo_du_mois['titre']; ?></p>
<p class="titrePhoto"><?php echo $photo_du_mois['title']; ?></p>
<p class="legendePhoto"><?php echo $photo_du_mois['legende']; ?></p>
<?php }
echo '<div class="exif">';
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 '</div>';
?>
<div class="myGallery" id="gallery--simple">
<div class="myGallery" id="lcl_gallery">
<?php
/**/
for ($i = 1; $i <= ($rowcount -1); $i++) {
$file = $result[$i]['filename'];
$date = $result[$i]['date'];
$file = $result[$i]['filename'];
$date = $result[$i]['date'];
$objectif = $result[$i]['lens'];
$exposure = $result[$i]['exposure'];
$speed = $result[$i]['speed'];
$iso = $result[$i]['iso'];
$width = $result[$i]['width'];
$height = $result[$i]['height'];
@@ -168,24 +135,30 @@ try {
$legende = $result[$i]['legende'];
$copy = $result[$i]['copyright'];
$titre = $result[$i]['titre'];
$createur = $result[$i]['createur'];
$title = $result[$i]['title'];
$creator = $result[$i]['creator'];
$keywords = $result[$i]['keywords'];
//$keywords = str_replace(',', ' - ', $keywords);
$keywords = "\u{1F3F7} " . str_replace(',', " \u{30FB} ", $keywords);
if (!empty($titre)) $x = $titre;
elseif (!empty($legende)) $x = $legende;
else $x = basename($file);
$exif = $model . " \u{30FB} " . $objectif . " \u{30FB} " . $exposure . " \u{30FB} " . $aperture . " \u{30FB} " . $iso ;
// $x = $x . "\r\n" . $exif;
if (!empty($title)) {
$x = $title;
$y = $legende;
}
elseif (!empty($legende)) {
$x = $legende;
}
else {
$x = basename($file);
$y = "";
}
$exif = $model . " \u{30FB} " . $objectif . " \u{30FB} " . $speed . " \u{30FB} " . $aperture . " \u{30FB} " . $iso . "ISO";
$thumb = str_replace("photos/img", "photos/thumb", $file);
echo '<div class="item">';
echo '<a href ="' . $file . '" data-pswp-width="' . $width . '"' . '" data-pswp-height="'. $height . '" target="_blank">';
echo '<img src="' . $thumb . '" alt="' . $x . '" />';
echo '<a href ="' . host() . $file . '" title="' . $x . '" data-lcl-txt="' . $y .'" data-lcl-author="' . $exif . '">';
echo '<img src="' . host() . $thumb . '" alt="' . $x . '" />';
echo "</a>";
echo '<span class="caption">' . month($date) . '</span>';
echo '</div>';
@@ -210,7 +183,56 @@ try {
}
?>
</div>
</div>
<script type='text/javascript'>
$(document).ready(function() {
var $obj = lc_lightbox('#lcl_gallery a', {
img_zoom : true,
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
fading_time : 50, // durée de l'animation de fondu des éléments
slideshow_time : 4000, // durée de l'intervalle du diaporama
animation_time : 100,
counter : false, // s'il faut afficher le compteur d'éléments
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
max_width : '95%', // largeur maximale de la lightbox
max_height : '95%', // hauteur maximale de la lightbox
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
skin : 'minimal', // minimal | light | dark
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
shox_title : true, // s'il faut afficher les titres
show_descr : false, // s'il faut afficher les descriptions
show_author : true, // s'il faut afficher les auteurs
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
fullscreen : true, // Autoriser ou non le mode plein écran
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
download : true, // whether to show element's file download button
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
});
var $obj = lc_lightbox('#lcl_month a', {
img_zoom : true,
deeplink : true,
open_close_time : 200,
ol_time_diff : 100,
wrap_class : 'lcl_zoomin_oc',
skin : 'minimal',
txt_hidden : true,
fullscreen : true,
fs_img_behavior : 'smart',
browser_fs_mode : true,
rclick_prevent : true,
});
});
</script>
<?php
@@ -231,13 +253,12 @@ try {
echo $e->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 '<div class="navPage">' . gettext("Page: ");
echo '<div class="navPage">' . gettext("Page") . ': ';
if ($page >= 2) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$prec.'" title="'.gettext("Previous Page").'">&laquo; '.gettext("prev").'</a>&nbsp;';
for ($i = 1; $i <= $nbpages; $i++) {
if ($i != $page) {
@@ -253,7 +274,11 @@ echo '</div>';
?>
<p><em><small>@ 2022</small></em></p>
<p><em><small>sur-le-sentier.fr@ 2022</small></em></p>
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
</body>
</html>