Version 1.0
-déplacement des fichiers d’admin dans un dossier admin -corrections dans la fonction data_for_lightbox($data). Celle-ci est maintenant toujours utilisé pour l’affichage des vignettes et des images dans la lightbox -les chemins sont nettoyés avec 2 variables: $chemin pour les images, $base pour la base Sqlite -corrections diverses
This commit is contained in:
@@ -55,11 +55,13 @@ else $page = intval($_GET['page']);
|
||||
?>
|
||||
|
||||
<?php
|
||||
$chemin = 'photos/img/';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $base)) {
|
||||
try {
|
||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||
$conn4 = new PDO("sqlite:$base");
|
||||
// WHERE id='26'
|
||||
$query4 = "SELECT 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 FROM photos ORDER BY dateoriginal DESC LIMIT ? OFFSET ?";
|
||||
//nb d'archive par page
|
||||
@@ -86,6 +88,11 @@ else exit("Database " . $base . " does not exist !");
|
||||
<p class="month"><?php echo month($result[0]['dateoriginal']); ?></p>
|
||||
|
||||
<?php
|
||||
//_pr($result[0]);
|
||||
|
||||
//$thumbnail = host() . str_replace("img", "thumb", $chemin) . $result[0]['filename'];
|
||||
//$full = host() . $chemin . $result[0]['filename'];
|
||||
|
||||
$lb = data_for_lightbox($result[0]);
|
||||
|
||||
//_pr($lb);
|
||||
@@ -103,6 +110,8 @@ else exit("Database " . $base . " does not exist !");
|
||||
*/
|
||||
|
||||
echo '<div class="cadre" id="lcl_month">';
|
||||
//echo '<a href ="' . $full . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) .'" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||
//echo '<img src="' . $full . '" alt="' . htmlspecialchars($lb['title']) . '" class="trois">';
|
||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) .'" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||
echo '<img src="' . $lb['big'] . '" alt="' . htmlspecialchars($lb['title']) . '" class="trois">';
|
||||
echo "</a>";
|
||||
@@ -165,8 +174,13 @@ else exit("Database " . $base . " does not exist !");
|
||||
//_pr($result[$i]);
|
||||
//debug_to_console($result[$i]);
|
||||
|
||||
//$thumbnail = host() . str_replace("img", "thumb", $chemin) . $result[$i]['filename'];
|
||||
//$full = host() . $chemin . $result[$i]['filename'];
|
||||
|
||||
$lb = data_for_lightbox($result[$i]);
|
||||
|
||||
//_pr($lb);
|
||||
|
||||
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>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user