31-03-2022

index.php
maps.php
photo-du-mois.php
insert_bdd.php
functions.php (localize($domain), data_for_lightbox($data)
This commit is contained in:
2022-03-31 10:21:02 +02:00
parent 6ebef5c974
commit e66bc829cd
7 changed files with 687 additions and 86 deletions

View File

@@ -11,15 +11,25 @@
<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';
$domain = 'sentier';
localize($domain);
?>
<?php
/*
//if ($_SERVER['SERVER_NAME'] == 'airbook.local')
$root = $_SERVER['DOCUMENT_ROOT'];
//$root = dirname($_SERVER['SCRIPT_FILENAME']); // /Users/bruno/Sites/sls
include 'functions.php';
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);
_pr($liste_locale);
//if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages);
if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($liste_locale);
else $langue = $_REQUEST['lang'];
$domain = 'sentier';
@@ -31,11 +41,11 @@
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>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
</head>
@@ -118,47 +128,13 @@ try {
<?php
for ($i = 1; $i <= ($rowcount -1); $i++) {
$file = $result[$i]['filename'];
$date = $result[$i]['date'];
$objectif = $result[$i]['lens'];
$speed = $result[$i]['speed'];
$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'];
$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($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);
$lb = data_for_lightbox($result[$i]);
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 href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($lb['exif']) . '">';
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '" />';
echo "</a>";
echo '<span class="caption">' . month($date) . '</span>';
echo '</div>';
@@ -269,11 +245,11 @@ for ($i = 1; $i <= $nbpages; $i++) {
}
}
if ($page < $nbpages) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$suiv.'" title="'.gettext("Next Page").'">'.gettext("next").' &raquo;</a>&nbsp;';
echo '</div>';
?>
<p class="navPage"><a href="index.php"><?php echo gettext("Home"); ?></a> | <a href="maps.php"><?php echo gettext("Maps"); ?></a></p>
<p><em><small>sur-le-sentier.fr@ 2022</small></em></p>
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>