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:
@@ -3,10 +3,10 @@
|
||||
// (A) LOGIN CHECKS
|
||||
require "2-check.php";
|
||||
|
||||
include 'localize.php';
|
||||
include '../localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
|
||||
// (B) LOGIN PAGE HTML ?>
|
||||
<!DOCTYPE html>
|
||||
@@ -14,7 +14,7 @@
|
||||
<head>
|
||||
<title><?php echo gettext("Login Page"); ?></title>
|
||||
<link rel="stylesheet" href="1-login.css" />
|
||||
<link rel="stylesheet" href="css/sls.css" />
|
||||
<link rel="stylesheet" href="../css/sls.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php if (isset($failed)) { ?>
|
||||
@@ -30,7 +30,7 @@
|
||||
<input type="submit" value="<?php echo gettext("Sign In"); ?>">
|
||||
</form>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php require ("3-protect.php");
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -25,7 +25,7 @@
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
<link rel="stylesheet" href="../css/sls.css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
?>
|
||||
|
||||
<nav>
|
||||
<a class="kaki" href="../edit_bdd.php"><?php echo gettext("Edit"); ?></a>
|
||||
<a class="kaki" href="../insert_bdd.php"><?php echo gettext("Insert"); ?></a>
|
||||
<a class="kaki" href="../modify_bdd.php"><?php echo gettext("Modify"); ?></a>
|
||||
<a class="kaki" href="../view_bdd.php"><?php echo gettext("View (Ajax)"); ?></a>
|
||||
<a class="kaki" href="../view_bdd2.php"><?php echo gettext("View"); ?></a>
|
||||
<a class="kaki" href="../clean_bdd.php"><?php echo gettext("Clean"); ?></a>
|
||||
<a class="kaki" href="edit_bdd.php"><?php echo gettext("Edit"); ?></a>
|
||||
<a class="kaki" href="insert_bdd.php"><?php echo gettext("Insert"); ?></a>
|
||||
<a class="kaki" href="modify_bdd.php"><?php echo gettext("Modify"); ?></a>
|
||||
<a class="kaki" href="view_bdd.php"><?php echo gettext("View (Ajax)"); ?></a>
|
||||
<a class="kaki" href="view_bdd2.php"><?php echo gettext("View"); ?></a>
|
||||
<a class="kaki" href="clean_bdd.php"><?php echo gettext("Clean"); ?></a>
|
||||
</nav>
|
||||
|
||||
<!-- (B1) LOGOUT FORM -->
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -26,7 +26,7 @@ include 'functions.php';
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
<link rel="stylesheet" href="../css/sls.css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
|
||||
@@ -38,20 +38,20 @@ include 'functions.php';
|
||||
|
||||
<?php
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
$chemin = '../photos/img/';
|
||||
$base = '../db_photo.sqlite3';
|
||||
|
||||
// Taille des vignettes
|
||||
$th_w = 300;
|
||||
$th_h = 300;
|
||||
// Chemins
|
||||
$img_path = "photos/img/";
|
||||
$thumb_path = "photos/thumb/";
|
||||
|
||||
$img_path = $chemin;
|
||||
$thumb_path = str_replace("img", "thumb", $chemin);
|
||||
|
||||
echo '<h3>' . gettext('Clean folder img...') . '</h3>';
|
||||
|
||||
$originals = array_map('basename', glob('photos/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
||||
$thumbs = array_map('basename', glob('photos/thumb/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
||||
$originals = array_map('basename', glob("$img_path/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}", GLOB_BRACE));
|
||||
$thumbs = array_map('basename', glob("$thumb_path/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}", GLOB_BRACE));
|
||||
|
||||
// On recherche les vignettes manquantes
|
||||
|
||||
@@ -101,7 +101,7 @@ if ($b > 0) {
|
||||
echo '<h3>' . gettext('Compare folder img and database...') . '</h3>';
|
||||
|
||||
try {
|
||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$query = "SELECT filename FROM photos";
|
||||
@@ -125,8 +125,8 @@ foreach($result as $file) {
|
||||
}
|
||||
|
||||
$base = array_map('basename', $bdd);
|
||||
echo '<h4>' . count($base) . " entries in database". "</h4>";
|
||||
echo '<h4>' . count($originals) . " files on disk" . "</h4>";
|
||||
echo '<h4>' . count($base) . gettext(" entries in database"). "</h4>";
|
||||
echo '<h4>' . count($originals) . gettext(" files on disk") . "</h4>";
|
||||
|
||||
$extra_in_bdd= array_diff($base, $originals);
|
||||
$c = count($extra_in_bdd);
|
||||
@@ -704,10 +704,12 @@ if ($d > 0) {
|
||||
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'];
|
||||
//$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
//$full = host() . $row['filename'];
|
||||
|
||||
echo '<tr><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['filesize'] . '</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['model'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['mode'] . '</td><td>' . $row['software'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['city'] . '</td><td>' . $row['department'] . '</td><td>' . $row['code'] . '</td><td>' . $row['country'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['legende'] . '</td></tr>';
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
echo '<tr><td>' . '<a href="' . $lb['big'] . '"><img src="' . $lb['thumb'] . '" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['filesize'] . '</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['model'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['mode'] . '</td><td>' . $row['software'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['city'] . '</td><td>' . $row['department'] . '</td><td>' . $row['code'] . '</td><td>' . $row['country'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['legende'] . '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
echo '</div>';
|
||||
@@ -725,7 +727,7 @@ if ($d > 0) {
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
$chemin = '../photos/img/';
|
||||
$base = "../db_photo.sqlite3";
|
||||
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$conn2 = new PDO("sqlite:$base");
|
||||
$msg = "";
|
||||
@@ -129,11 +131,11 @@ include 'functions.php';
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
<link rel="stylesheet" href="../css/sls.css">
|
||||
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
@@ -155,7 +157,7 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
|
||||
|
||||
try {
|
||||
$conn3 = new PDO('sqlite:db_photo.sqlite3');
|
||||
$conn3 = new PDO("sqlite:$base");
|
||||
$stmt3 = $conn3->prepare($req_suppress);
|
||||
$stmt3->execute();
|
||||
|
||||
@@ -171,17 +173,16 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
|
||||
$nRows = 0;
|
||||
while ($row = $stmt3->fetch(PDO::FETCH_ASSOC)) {
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '"><img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '"></a>' . '</td>';
|
||||
echo '<td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td>';
|
||||
echo '<td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||
echo '<td>' . $row['model'] . '</td>';
|
||||
echo '<td><input type="text" id="lens" name="lens[]" value="' . $row['lens'] . '" size=""></td>';
|
||||
echo '<td>' . $row['focal'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td>';
|
||||
echo '<td>' . $row['flash'] . '</td><td>' . $row['software'] . '</td>';
|
||||
//echo '<td><input type="text" id="keywords" name="keywords[]" value="' . $row['keywords'] . '" size=""></td>';
|
||||
echo "<td><input type='text' id='keywords' name='keywords[]' value='" . $row['keywords'] . "' size=''></td>";
|
||||
echo '<td><input type="text" id="title" name="title[]" value="' . $row['title'] . '" size=""></td>';
|
||||
echo '<td><input type="text" id="creator" name="creator[]" value="' . $row['creator'] . '" size=""></td>';
|
||||
@@ -212,7 +213,7 @@ if (($req_suppress != "") and ($req_delete == "")) {
|
||||
}
|
||||
|
||||
$req_suppress = "";
|
||||
}
|
||||
}
|
||||
|
||||
if ($req_delete != "") {
|
||||
|
||||
@@ -222,17 +223,71 @@ if ($req_delete != "") {
|
||||
echo '<h3>' . nl2br($files_deleted) . '</h3>';
|
||||
|
||||
//echo '<pre><code>' . $req_delete . '</code></pre>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var $obj = lc_lightbox('td a', {
|
||||
img_zoom : true, // whether to enable zooming system
|
||||
|
||||
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||
|
||||
slideshow : true, // whether to enable slideshow
|
||||
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
|
||||
animation_time : 100,
|
||||
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
||||
autoplay : false, // autoplay slideshow - bool
|
||||
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
|
||||
ol_opacity : 0.7, // overlay opacity / value between 0 and 1
|
||||
ol_color : '#111', // background color of the overlay
|
||||
ol_pattern : false, // overlay patterns - insert the pattern name or false
|
||||
|
||||
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
|
||||
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||
|
||||
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||
shox_title : true, // s'il faut afficher les titres
|
||||
show_descr : true, // 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
|
||||
autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster)
|
||||
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
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
$chemin = '../photos/img/';
|
||||
$base = '../db_photo.sqlite3';
|
||||
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$msg = "";
|
||||
$req_edit = "";
|
||||
@@ -52,10 +54,10 @@ include 'functions.php';
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css" />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="../css/sls.css" />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
@@ -66,10 +68,10 @@ include 'functions.php';
|
||||
|
||||
|
||||
<?php
|
||||
debug_to_console($_GET);
|
||||
debug_to_console($req_edit);
|
||||
//debug_to_console($_GET);
|
||||
//debug_to_console($req_edit);
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
//$base = '../db_photo.sqlite3';
|
||||
|
||||
echo '<h1>' . gettext('Edit database') . ': ' . $base . '</h1><br />';
|
||||
|
||||
@@ -77,7 +79,7 @@ include 'functions.php';
|
||||
|
||||
|
||||
try {
|
||||
$conn = new PDO('sqlite:db_photo.sqlite3');
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$stmt = $conn->prepare($req_edit);
|
||||
$stmt->execute();
|
||||
?>
|
||||
@@ -96,17 +98,16 @@ include 'functions.php';
|
||||
|
||||
$nRows = 0;
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '"><img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '"></a>' . '</td>';
|
||||
echo '<td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td>';
|
||||
echo '<td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||
echo '<td>' . $row['model'] . '</td>';
|
||||
echo '<td><input type="text" id="lens" name="lens[]" value="' . $row['lens'] . '" size=""></td>';
|
||||
echo '<td>' . $row['focal'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td>';
|
||||
echo '<td>' . $row['flash'] . '</td><td>' . $row['software'] . '</td>';
|
||||
//echo '<td><input type="text" id="keywords" name="keywords[]" value="' . $row['keywords'] . '" size=""></td>';
|
||||
echo "<td><input type='text' id='keywords' name='keywords[]' value='" . $row['keywords'] . "' size=''></td>";
|
||||
echo '<td><input type="text" id="title" name="title[]" value="' . $row['title'] . '" size=""></td>';
|
||||
echo '<td><input type="text" id="creator" name="creator[]" value="' . $row['creator'] . '" size=""></td>';
|
||||
@@ -136,14 +137,68 @@ include 'functions.php';
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var $obj = lc_lightbox('td a', {
|
||||
img_zoom : true, // whether to enable zooming system
|
||||
|
||||
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||
|
||||
slideshow : true, // whether to enable slideshow
|
||||
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
|
||||
animation_time : 100,
|
||||
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
||||
autoplay : false, // autoplay slideshow - bool
|
||||
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
|
||||
ol_opacity : 0.7, // overlay opacity / value between 0 and 1
|
||||
ol_color : '#111', // background color of the overlay
|
||||
ol_pattern : false, // overlay patterns - insert the pattern name or false
|
||||
|
||||
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
|
||||
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||
|
||||
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||
shox_title : true, // s'il faut afficher les titres
|
||||
show_descr : true, // 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
|
||||
autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster)
|
||||
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
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -17,10 +17,10 @@ include 'functions.php';
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title><?php echo gettext('Insert photos in Sqlite base'); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css" />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="../css/sls.css" />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css' />
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||
|
||||
@@ -28,8 +28,11 @@ include 'functions.php';
|
||||
|
||||
<body>
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<?php
|
||||
$base = 'db_photo.sqlite3';
|
||||
$base = '../db_photo.sqlite3';
|
||||
$chemin = '../photos/img/';
|
||||
|
||||
echo '<h1>' . gettext("Insert images in " . $base . " database.") . '</h1><br />';
|
||||
|
||||
@@ -42,16 +45,17 @@ if (file_exists($base)) {
|
||||
$th_w = 300;
|
||||
$th_h = 300;
|
||||
|
||||
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
|
||||
//$dir = (new AdvancedFilesystemIterator('../photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
|
||||
$dir = (new AdvancedFilesystemIterator($chemin))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
|
||||
|
||||
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i><a href="photos/img/">photos/img/</a></i> ...</h3>';
|
||||
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i><a href="' . $chemin . '">photos/img/</a></i> ...</h3>';
|
||||
|
||||
echo '<h3>' . gettext("Creation of the database") . ' <i>' . $base . '</i> ' . gettext("and the table") . ' <i>photo</i> (' . gettext("if necessary") . ')...</h3>';
|
||||
|
||||
try {
|
||||
|
||||
// Création de la base et de la table photos
|
||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$query = "CREATE TABLE IF NOT EXISTS photos (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
@@ -98,7 +102,7 @@ try {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
echo '<h3>' . gettext('Read image files in the folder') . ' <i><a href="photos/img/">photos/img/</a></i>...</h3>';
|
||||
echo '<h3>' . gettext('Read image files in the folder') . ' <i><a href="' . $chemin . '">photos/img/</a></i>...</h3>';
|
||||
|
||||
$i = 1;
|
||||
$photos = array();
|
||||
@@ -109,8 +113,11 @@ foreach($dir as $file){
|
||||
pathName()
|
||||
*/
|
||||
$file = $file->getpathName();
|
||||
//$file = $file->getFilename();
|
||||
echo $file;
|
||||
|
||||
$x = in_bdd($file);
|
||||
|
||||
echo $x;
|
||||
/*
|
||||
if ($i > 5) {
|
||||
break;
|
||||
@@ -390,7 +397,7 @@ foreach($dir as $file){
|
||||
|
||||
|
||||
$photos[$i] = array(
|
||||
'filename' => $file,
|
||||
'filename' => basename($file),
|
||||
'filesize' => $fsize,
|
||||
|
||||
'dateoriginal' => $da,
|
||||
@@ -528,7 +535,12 @@ foreach($dir as $file){
|
||||
$z = count($photos);
|
||||
if ($z == 0) {
|
||||
echo '<h3>' . gettext('No new image files to add') . '...</h3>';
|
||||
echo '<p class="navPage"><a href="index.php" title="' . gettext("Home") . '">' . gettext("Home") . '</a> | <a href="maps.php" title="' . gettext("Maps") .'">' . gettext("Maps") . '</a> | <a href="photo-du-mois.php" title="' . gettext("Picture of the month") . '">' . gettext("Picture of the month") . '</a></p>';
|
||||
echo '<p class="navPage"><a href="../index.php" title="' . gettext("Home") . '">' . gettext("Home") . '</a>
|
||||
| <a href="../photo-du-mois.php" title="' . gettext("Picture of the month") . '">' . gettext("Picture of the month") . '</a>
|
||||
| <a href="../maps.php" title="' . gettext("Maps") .'">' . gettext("Maps") . '</a>
|
||||
| <a href="admin.php" title="' . gettext("Admin page") . '">' . gettext("Admin page") . '</a>
|
||||
| ' . $logout . '</p>';
|
||||
|
||||
|
||||
die();
|
||||
}
|
||||
@@ -544,11 +556,12 @@ $avant = $resultat['MAX(id)'];
|
||||
$nb_avant = (isset($avant)) ? $avant : 0;
|
||||
|
||||
|
||||
echo '<h3>' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' <i><a href="photos/img/">photos/thumb/</a></i>.</h3>';
|
||||
echo '<h3>' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' <i><a href="' . $chemin . '">photos/thumb/</a></i>.</h3>';
|
||||
|
||||
$b = ($z > 1) ? gettext('new images') : gettext('new image');
|
||||
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
|
||||
|
||||
$short = basename($file);
|
||||
// Insertion des photos dans la base
|
||||
// Création des vignettes
|
||||
try {
|
||||
@@ -639,8 +652,9 @@ try {
|
||||
$copyright = $item['copyright']; // clicclac.info
|
||||
$titre = $item['title']; // ***
|
||||
$legende = $item['legende']; // ***
|
||||
|
||||
create_thumb($th_w, $th_h, $file);
|
||||
|
||||
$big = $chemin . $file;
|
||||
create_thumb($th_w, $th_h, $big);
|
||||
|
||||
$stmt->execute();
|
||||
}
|
||||
@@ -711,14 +725,13 @@ try {
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
$base = '../db_photo.sqlite3';
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$msg = "";
|
||||
|
||||
@@ -159,10 +159,10 @@ else {
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css" />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="../css/sls.css" />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
@@ -187,7 +187,7 @@ else {
|
||||
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||
|
||||
try {
|
||||
$conn = new PDO('sqlite:db_photo.sqlite3');
|
||||
$conn = new PDO("sqlite:../$base");
|
||||
$stmt = $conn->prepare($req_edit);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -202,10 +202,12 @@ else {
|
||||
|
||||
$nRows = 0;
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||
//$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
//$full = host() . $row['filename'];
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
//echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $lb['big'] . '"><img src="' . $lb['big'] . '" /></a>' . '</td>';
|
||||
echo '<td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td>';
|
||||
echo '<td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||
echo '<td>' . $row['model'] . '</td>';
|
||||
@@ -241,12 +243,12 @@ else {
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
|
||||
$chemin = '../photos/img/';
|
||||
$base = '../db_photo.sqlite3';
|
||||
|
||||
if (isset($_SERVER['HTTP_REFERER'])){
|
||||
$id = $_GET['id'];
|
||||
@@ -25,26 +28,34 @@ if (isset($_SERVER['HTTP_REFERER'])){
|
||||
$software = $_GET['software'];
|
||||
$column = $_GET['column'];
|
||||
$order = $_GET['order'];
|
||||
|
||||
echo $filename;
|
||||
/*
|
||||
class MyDB extends SQLite3 {
|
||||
function __construct() {
|
||||
$this->open('db_photo.sqlite3');
|
||||
$this->open('../db_photo.sqlite3');
|
||||
//$this->open($base);
|
||||
}
|
||||
}
|
||||
$db = new MyDB();
|
||||
*/
|
||||
$db = new SQLite3($base);
|
||||
|
||||
if(!$db){
|
||||
echo $db->lastErrorMsg();
|
||||
} else {
|
||||
$ret = $db->query("SELECT * FROM photos WHERE id LIKE '$id%' AND filename LIKE '%$filename%' AND dateoriginal LIKE '%$dateoriginal%' AND speed LIKE '$speed%' AND iso LIKE '$iso%' AND aperture LIKE '$aperture%' AND correctexpo LIKE '$correctexpo%' AND model LIKE '%$model%' AND lens LIKE '%$lens%' AND focal LIKE '%$focal%' AND metering LIKE '%$metering%' AND program LIKE '%$program%' AND wb LIKE '%$wb%' AND software LIKE '%$software%' ORDER BY $column $order");
|
||||
while($row = $ret->fetchArray(SQLITE3_ASSOC) ){
|
||||
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
//$thumbnail = host() . str_replace("img", "thumb", $chemin) . $row['filename'];
|
||||
//$full = host() . $chemin . $row['filename'];
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
echo "<tr>";
|
||||
echo (isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '';
|
||||
echo "<td class='priority-1 center'>".$row['id']."</td>";
|
||||
echo "<td class='priority-1'>" . "<a href='" . $full . "' title='" . htmlspecialchars($lb['title']) . "' data-lcl-txt='" . htmlspecialchars($lb['description']) . "' data-lcl-author='" . htmlspecialchars($lb['creator']) . "' /><img src='" . $thumbnail . "' alt='" . htmlspecialchars($lb['title']) . "'></a></td>";
|
||||
//echo "<td class='priority-1'>" . "<a href='" . $full . "' title='" . htmlspecialchars($lb['title']) . "' data-lcl-txt='" . htmlspecialchars($lb['description']) . "' data-lcl-author='" . htmlspecialchars($lb['creator']) . "' /><img src='" . $thumbnail . "' alt='" . htmlspecialchars($lb['title']) . "'></a></td>";
|
||||
echo "<td class='priority-1'>" . "<a href='" . $lb['big'] . "' title='" . htmlspecialchars($lb['title']) . "' data-lcl-txt='" . htmlspecialchars($lb['description']) . "' data-lcl-author='" . htmlspecialchars($lb['creator']) . "' /><img src='" . $lb['thumb'] . "' alt='" . htmlspecialchars($lb['title']) . "'></a></td>";
|
||||
echo "<td class='priority-2'>".$row['filename']."</td>";
|
||||
echo "<td class='priority-8'>".$row['dateoriginal']."</td>";
|
||||
echo "<td class='priority-3'>".$row['speed']."</td>";
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
include '../functions.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -17,10 +17,10 @@ include 'functions.php';
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css" />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="../css/sls.css" />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css' />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
@@ -33,7 +33,7 @@ include 'functions.php';
|
||||
|
||||
<?php
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
$base = '../db_photo.sqlite3';
|
||||
|
||||
_pr($_POST);
|
||||
/*
|
||||
@@ -54,7 +54,7 @@ if (! empty($_POST)){
|
||||
$req = "SELECT * FROM photos WHERE " . $key . " = '" . $val . "'";
|
||||
echo $req;
|
||||
|
||||
$conn2 = new PDO("sqlite:db_photo.sqlite3");
|
||||
$conn2 = new PDO("sqlite:$base");
|
||||
$conn2->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$limit = 13;
|
||||
@@ -78,7 +78,7 @@ _pr($_POST);
|
||||
echo '<a href="requests.php">requests</a>';
|
||||
|
||||
|
||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$request = array(
|
||||
@@ -231,12 +231,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
include '../functions.php';
|
||||
|
||||
$chemin = '../photos/img/';
|
||||
|
||||
$base = '../db_photo.sqlite3';
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$msg = "";
|
||||
|
||||
@@ -33,11 +35,11 @@ if(!empty($_GET['message'])) {
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
<link rel="stylesheet" href="../css/sls.css">
|
||||
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||
@@ -213,12 +215,12 @@ function showUser(column) {
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,27 +1,28 @@
|
||||
<?php
|
||||
require ("3-protect.php");
|
||||
//session_start();
|
||||
include 'i18n_setup.php';
|
||||
include '../i18n_setup.php';
|
||||
/*include 'localize.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
*/
|
||||
include 'functions.php';
|
||||
|
||||
$base = 'db_photo.sqlite3';
|
||||
include '../functions.php';
|
||||
|
||||
$chemin = '../photos/img/';
|
||||
|
||||
$base = '../db_photo.sqlite3';
|
||||
$perpage = 20;
|
||||
|
||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||
$conn = new PDO("sqlite:$base");
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
if (!isset($_GET['page'])) $page = 1;
|
||||
else $page = intval($_GET['page']);
|
||||
|
||||
|
||||
|
||||
$gps = (isset($_SESSION['query']['gps'])) ? $_SESSION['query']['gps'] : "off";
|
||||
|
||||
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/');
|
||||
$dir = (new AdvancedFilesystemIterator($chemin))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/');
|
||||
|
||||
|
||||
$request = array(
|
||||
@@ -76,11 +77,11 @@ foreach ($request as $key => $val){
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
<link rel="stylesheet" href="../css/sls.css">
|
||||
|
||||
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/lc_lightbox.min.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.css'>
|
||||
<link rel='stylesheet' href='../lc-lightbox/skins/minimal.css'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||
@@ -160,7 +161,7 @@ try {
|
||||
|
||||
|
||||
if (empty($_POST)) {
|
||||
echo '<h3 class="greenstyle">' . count($dir) . gettext(' images found in folder') . ' <i><a href="photos/img/">photos/img/</a></i> ...</h3>';
|
||||
echo '<h3 class="greenstyle">' . count($dir) . gettext(' images found in folder') . ' <i><a href="' . $chemin . '">photos/img/</a></i> ...</h3>';
|
||||
// Display request !!
|
||||
echo '<pre><code>' . $query2 . '</code></pre>';
|
||||
}
|
||||
@@ -289,11 +290,10 @@ try {
|
||||
|
||||
$nRows = 0;
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||
$full = host() . $row['filename'];
|
||||
|
||||
$lb = data_for_lightbox($row);
|
||||
|
||||
echo '<tr>' . ((isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '') . '<td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '"><img src="'.$thumbnail.'" alt="' . htmlspecialchars($lb['title']) . '"></a>' . '</td><td>' . $row['filename'] . '<br>(' . $row['filesize'] . ')</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td> <td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</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 '<tr>' . ((isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '') . '<td>' . $row['id'] . '</td><td>' . '<a href="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '"><img src="' . $lb['thumb']. '" alt="' . htmlspecialchars($lb['title']) . '"></a>' . '</td><td>' . $row['filename'] . '<br>(' . $row['filesize'] . ')</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td> <td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</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>';
|
||||
$nRows++;
|
||||
}
|
||||
|
||||
@@ -411,12 +411,12 @@ try {
|
||||
|
||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||
|
||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||
|
||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||
|
||||
<script src='lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
<script src='../lc-lightbox/js/lc_lightbox.min.js'></script>
|
||||
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -538,7 +538,7 @@
|
||||
bottom: -1px;
|
||||
z-index: 5;
|
||||
border-radius: 3px;
|
||||
opcity: 0;
|
||||
opacity: 0;
|
||||
background: #6f6f6f;
|
||||
|
||||
-webkit-transition: all .2s ease;
|
||||
|
||||
@@ -204,7 +204,7 @@ function create_thumb($thumb_w, $thumb_h, $image) {
|
||||
|
||||
list($origin_w, $origin_h) = getimagesize($image);
|
||||
$origin_ratio = round($origin_w / $origin_h, 1);
|
||||
$outFile = str_replace("photos/img", "photos/thumb", $image);
|
||||
$outFile = str_replace("../photos/img", "../photos/thumb", $image);
|
||||
|
||||
if ($origin_w != null && $origin_h != null) {
|
||||
if ($thumb_w / $thumb_h > $origin_ratio) {
|
||||
@@ -229,7 +229,7 @@ if ($origin_w != null && $origin_h != null) {
|
||||
|
||||
function in_bdd($image) {
|
||||
try {
|
||||
$conn3 = new PDO('sqlite:db_photo.sqlite3');
|
||||
$conn3 = new PDO('sqlite:../db_photo.sqlite3');
|
||||
#$query3 = "SELECT filename FROM photos WHERE instr(filename, '". $file . "') > 0;";
|
||||
$query3 = "SELECT filename FROM photos WHERE filename = :filename";
|
||||
$stmt = $conn3->prepare($query3);
|
||||
@@ -373,6 +373,7 @@ function conv_date($dateoriginal, $format) {
|
||||
|
||||
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'];
|
||||
@@ -420,16 +421,20 @@ 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>';
|
||||
}
|
||||
else {
|
||||
$map = '';
|
||||
}
|
||||
$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>';
|
||||
}
|
||||
else {
|
||||
$map = '';
|
||||
}
|
||||
|
||||
$creator = $data['creator'];
|
||||
|
||||
$big = host() . $data['filename'];
|
||||
$thumb = host() . str_replace("photos/img", "photos/thumb", $data['filename']);
|
||||
$big = host() . $chemin . $data['filename'];
|
||||
$thumb = host() . str_replace("img", "thumb", $chemin) . $data['filename'];
|
||||
|
||||
// origine
|
||||
//$big = host() . $data['filename'];
|
||||
//$thumb = host() . str_replace("../photos/img", "../photos/thumb", $data['filename']);
|
||||
|
||||
$keywords = str_replace(',', " \u{30FB} ", clean_keywords($data['keywords']));
|
||||
$copyright = $data['copyright'];
|
||||
|
||||
@@ -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>';
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 894 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user