Nouveautés:
- AJAX pour récupérer les données depuis la base
- Leaflet pour l’API
- Openstreetmap pour les cartes
This commit is contained in:
2025-02-18 15:38:23 +01:00
parent cab19ef683
commit e627a8e3ff
26 changed files with 1409 additions and 157 deletions

View File

@@ -418,6 +418,8 @@ function data_for_lightbox($data) {
global $chemin;
//$query4 = "INSERT OR IGNORE INTO photos (filename, filesize, dateoriginal, lens, speed, correctexpo, iso, usercomment, comment, model, metering, flash, focal, program, wb, mode, width, height, html, aperture, software, lat, long, alt, keywords, title, creator, city, department, code, country, copyright, legende);
/*
*/
$filename = $data['filename'];
$title_thumb = pathinfo($filename, PATHINFO_FILENAME);
@@ -469,6 +471,7 @@ function data_for_lightbox($data) {
if (!empty($gps)) {
$map = '<a href = "https://maps.google.com/maps?q=' . $gps . '&t=&z=9&ie=UTF8&iwloc=&output=embed" title="' . $title . '" data-lcl-txt="' . $legende . '">' . " \u{30FB} \u{2693} " . '</a>';
$map = htmlspecialchars($map, ENT_QUOTES);
}
else {
$map = '';
@@ -499,6 +502,7 @@ function data_for_lightbox($data) {
$description .= "<tr><td>" . gettext("Speed") . "</td><td>" . $speed . "</td></tr>";
$description .= "<tr><td>" . gettext("Aperture") . "</td><td>" . $aperture . "</td></tr>";
$description .= "<tr><td>" . gettext("Iso") . "</td><td>" . $iso . "</td></tr>";
$description .= "<tr><td>" . gettext("Model") . "</td><td>". $model . "</td></tr>";
$description .= "<tr><td>" . gettext("Lens") . "</td><td>" . $objectif . "</td></tr>";
$description .= "<tr><td>" . gettext("Focal") . "</td><td>" . $focal . "</td></tr>";
@@ -517,11 +521,14 @@ function data_for_lightbox($data) {
(!empty($city)) && $description .= "<tr><td>" . gettext("City") . "</td><td>" . $city . "</td></tr>";
(!empty($department)) && $description .= "<tr><td>" . gettext("Department") . "</td><td>" . $department . "</td></tr>";
$code = (!empty($code)) ? " (" . $code . ")" : "";
(!empty($country)) && $description .= "<tr><td>" . gettext("Country") . "</td><td>" . $country . $code . "</td></tr>";
(!empty($map)) && $description .= "<tr><td>GPS</td><td>" . $map . "</td></tr>";
((!empty($comment)) || (!empty($usercomment))) && $description .= "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
(!empty($comment)) && $description .= "<tr><td>" . gettext("Comment") . "</td><td>" . $comment . "</td></tr>";
(!empty($usercomment)) && $description .= "<tr><td>" . gettext("User comment") . "</td><td>" . $usercomment . "</td></tr>";
/**/
$description .= "</table>";
$lightbox = array();
@@ -534,10 +541,16 @@ function data_for_lightbox($data) {
$lightbox['keywords'] = $keywords;
$lightbox['creator'] = $creator;
$lightbox['gps'] = $gps;
$lightbox['lat'] = $latitude;
$lightbox['long'] = $longitude;
$lightbox['description'] = $description;
$lightbox['width'] = $width;
$lightbox['height'] = $height;
//_pr($lightbox);
//$lightbox = array();
/*
Array
(