09-04-2022
-localization work fine -prepare for $_SESSION
This commit is contained in:
@@ -33,7 +33,8 @@ else $page = intval($_GET['page']);
|
||||
<?php
|
||||
try {
|
||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||
$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='26' ORDER BY date DESC LIMIT ? OFFSET ?";
|
||||
// WHERE id='26'
|
||||
$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);
|
||||
@@ -44,6 +45,8 @@ try {
|
||||
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$rowcount = count($result);
|
||||
|
||||
//_pr($result);
|
||||
|
||||
$conn4 = null;
|
||||
}
|
||||
catch(PDOException $e) {
|
||||
@@ -116,9 +119,26 @@ try {
|
||||
$date = $result[$i]['date'];
|
||||
|
||||
$lb = data_for_lightbox($result[$i]);
|
||||
|
||||
//
|
||||
if (!empty($lb['gps'])) {
|
||||
$map = '<a href = "https://maps.google.com/maps?q=' . $lb['gps'] . '&t=&z=9&ie=UTF8&iwloc=&output=embed" title="' . $lb['title'] . '" data-lcl-txt="' . $lb['legende'] . '">' . " \u{30FB} \u{2693} " . '</a>';
|
||||
|
||||
$meta = $lb['exif'] . $map;
|
||||
} else {
|
||||
$meta = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// data-lcl-author="' . htmlspecialchars($lb['exif']) . '"
|
||||
//
|
||||
|
||||
_pr($lb);
|
||||
//echo $lb['exif'];
|
||||
|
||||
echo '<div class="item">';
|
||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($lb['exif']) . '">';
|
||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($meta) . '">';
|
||||
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '" />';
|
||||
echo "</a>";
|
||||
echo '<span class="caption">' . month($date) . '</span>';
|
||||
|
||||
Reference in New Issue
Block a user