Compare commits
15 Commits
V2
...
4d256fbcfc
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d256fbcfc | |||
| 356c1885df | |||
| 5638476d71 | |||
| 1ddd50ec90 | |||
| f0fa8b6efc | |||
| b35196fdb8 | |||
| 55bedea648 | |||
| ec0ab53cb2 | |||
| bfda660a2f | |||
| 59de54758d | |||
| db9f05f6f6 | |||
| 3ee1a9eaf6 | |||
| f056c8a9a0 | |||
| 9665a355be | |||
| 4c22f27eb6 |
1
Locale/fr_FR/LC_MESSAGES/nocache
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
.
|
||||||
1
Locale/nocache
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
.
|
||||||
74
admin.php
@@ -1,74 +0,0 @@
|
|||||||
<?php require ("3-protect.php");
|
|
||||||
include 'localize.php';
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
include 'functions.php';
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
||||||
<title><?php echo gettext('Logged in'); ?></title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
|
||||||
<!--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' /-->
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!--link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script-->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1><?php echo gettext('Status: ') . $_SESSION["user"] . gettext(' logged in'); ?></h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--div class="center-flex"-->
|
|
||||||
<div class="center-flex">
|
|
||||||
<?php
|
|
||||||
$base = 'db_photo.sqlite3';
|
|
||||||
|
|
||||||
if (file_exists($base)) {
|
|
||||||
//echo '<div class="base">Base SQLite: ' . $base . ' !</div>';
|
|
||||||
echo '<h3>Base SQLite: ' . __DIR__ . '/' . $base . ' !</h3>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<a class="kaki" href="../edit_bdd.php">Edit</a>
|
|
||||||
<a class="kaki" href="../insert_bdd.php">Insert</a>
|
|
||||||
<a class="kaki" href="../modify_bdd.php">Modify</a>
|
|
||||||
<a class="kaki" href="../view_bdd.php">View (Ajax)</a>
|
|
||||||
<a class="kaki" href="../view_bdd2.php">View</a>
|
|
||||||
<a class="kaki" href="../clean_bdd.php">Clean</a>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- (B1) LOGOUT FORM -->
|
|
||||||
|
|
||||||
<p></p>
|
|
||||||
<nav><a class="red" href="4-logout.php" role="button">Log out</a></nav>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--form method="post">
|
|
||||||
<input type="hidden" name="logout" value="1">
|
|
||||||
<input type="submit" value="Log Out">
|
|
||||||
</form-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//$_SESSION["user"] != ""
|
|
||||||
?>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// (A) LOGIN CHECKS
|
// (A) LOGIN CHECKS
|
||||||
require "2-check.php";
|
require "2-check.php";
|
||||||
|
|
||||||
include 'localize.php';
|
include '../localize.php';
|
||||||
$domain = 'sentier';
|
$domain = 'sentier';
|
||||||
localize($domain);
|
localize($domain);
|
||||||
include 'functions.php';
|
include '../functions.php';
|
||||||
|
|
||||||
// (B) LOGIN PAGE HTML ?>
|
// (B) LOGIN PAGE HTML ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title><?php echo gettext("Login Page"); ?></title>
|
<title><?php echo gettext("Login Page"); ?></title>
|
||||||
<link rel="stylesheet" href="1-login.css" />
|
<link rel="stylesheet" href="1-login.css" />
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="../css/sls.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php if (isset($failed)) { ?>
|
<?php if (isset($failed)) { ?>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<input type="submit" value="<?php echo gettext("Sign In"); ?>">
|
<input type="submit" value="<?php echo gettext("Sign In"); ?>">
|
||||||
</form>
|
</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>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
88
admin/admin.php
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include '../i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="Sur le sentier: pages administration">
|
||||||
|
<title><?php echo gettext('Logged in'); ?></title>
|
||||||
|
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/icons/site.webmanifest">
|
||||||
|
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1><?php echo gettext('Status: ') . $_SESSION["user"] . gettext(' logged in'); ?></h1>
|
||||||
|
|
||||||
|
|
||||||
|
<!--div class="center-flex"-->
|
||||||
|
<div class="center-flex">
|
||||||
|
<?php
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
|
if (file_exists($base)) {
|
||||||
|
echo '<h3>Base SQLite: ' . __DIR__ . '/' . $base . ' !</h3>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- (B1) LOGOUT FORM -->
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
<nav><a class="red" href="4-logout.php" role="button"><?php echo gettext("Log out"); ?></a></nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--form method="post">
|
||||||
|
<input type="hidden" name="logout" value="1">
|
||||||
|
<input type="submit" value="Log Out">
|
||||||
|
</form-->
|
||||||
|
|
||||||
|
<div class="indexForm">
|
||||||
|
<form name="langSelect" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" >
|
||||||
|
<select name="lang" id="lang" class="mySelect">
|
||||||
|
<option value="">Language</option>
|
||||||
|
<option value="de_DE">German</option>
|
||||||
|
<option value="en_US">English</option>
|
||||||
|
<option value="es_ES">Spanish</option>
|
||||||
|
<option value="fr_FR">French</option>
|
||||||
|
</select>
|
||||||
|
<button type="submit" class="myButton">Ok</button>
|
||||||
|
|
||||||
|
</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><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
<?php require ("3-protect.php");
|
<?php
|
||||||
include 'localize.php';
|
require ("3-protect.php");
|
||||||
$domain = 'sentier';
|
//session_start();
|
||||||
localize($domain);
|
include '../i18n_setup.php';
|
||||||
include 'functions.php';
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -11,12 +15,18 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="description" content="Sur le sentier: admin">
|
||||||
<title><?php echo gettext('Clean photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('Clean photos in Sqlite base'); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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' />
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -24,24 +34,24 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1><?php echo gettext('Clean / repare database'); ?></h1><br />
|
<h1><?php echo gettext('Clean / repare database'); ?></h1><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$chemin = '../photos/img/';
|
||||||
|
$base = '../db_photo.sqlite3';
|
||||||
|
|
||||||
// Taille des vignettes
|
// Taille des vignettes
|
||||||
$th_w = 300;
|
$th_w = 300;
|
||||||
$th_h = 300;
|
$th_h = 300;
|
||||||
// Chemins
|
// Chemins
|
||||||
$img_path = "photos/img/";
|
$img_path = $chemin;
|
||||||
$thumb_path = "photos/thumb/";
|
$thumb_path = str_replace("img", "thumb", $chemin);
|
||||||
|
|
||||||
|
|
||||||
echo '<h3>' . gettext('Clean folder img...') . '</h3>';
|
echo '<h3>' . gettext('Clean folder img...') . '</h3>';
|
||||||
|
|
||||||
$originals = array_map('basename', glob('photos/img/*.{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('photos/thumb/*.{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
|
// On recherche les vignettes manquantes
|
||||||
|
|
||||||
@@ -58,9 +68,8 @@ if ($a > 0) {
|
|||||||
foreach($missing_thumbs as $img){
|
foreach($missing_thumbs as $img){
|
||||||
$file = $img_path . $img;
|
$file = $img_path . $img;
|
||||||
create_thumb($th_w, $th_h, $file);
|
create_thumb($th_w, $th_h, $file);
|
||||||
echo gettext('Thumb for ') . $img . gettext(' was successfully created!') . '<br>';
|
echo '<h5>' . gettext('Thumb for ') . $img . gettext(' was successfully created!') . '</h5>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -79,9 +88,9 @@ if ($b > 0) {
|
|||||||
foreach($extra_thumbs as $thumb){
|
foreach($extra_thumbs as $thumb){
|
||||||
$file = $thumb_path . $thumb;
|
$file = $thumb_path . $thumb;
|
||||||
if (unlink($file)) {
|
if (unlink($file)) {
|
||||||
echo $thumb . gettext(' was deleted successfully!') . '<br>';
|
echo '<h5>' . $thumb . gettext(' was deleted successfully!') . '</h5>';
|
||||||
} else {
|
} else {
|
||||||
echo gettext('There was a error deleting the file ') . $thumb;
|
echo '<h5 class="redtext">' . gettext('There was a error deleting the file ') . $thumb . '</h5>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,7 +101,7 @@ if ($b > 0) {
|
|||||||
echo '<h3>' . gettext('Compare folder img and database...') . '</h3>';
|
echo '<h3>' . gettext('Compare folder img and database...') . '</h3>';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn = new PDO("sqlite:$base");
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
$query = "SELECT filename FROM photos";
|
$query = "SELECT filename FROM photos";
|
||||||
@@ -116,8 +125,8 @@ foreach($result as $file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$base = array_map('basename', $bdd);
|
$base = array_map('basename', $bdd);
|
||||||
echo '<h4>' . count($base) . " entries in database". "</h4>";
|
echo '<h4>' . count($base) . gettext(" entries in database"). "</h4>";
|
||||||
echo '<h4>' . count($originals) . " files on disk" . "</h4>";
|
echo '<h4>' . count($originals) . gettext(" files on disk") . "</h4>";
|
||||||
|
|
||||||
$extra_in_bdd= array_diff($base, $originals);
|
$extra_in_bdd= array_diff($base, $originals);
|
||||||
$c = count($extra_in_bdd);
|
$c = count($extra_in_bdd);
|
||||||
@@ -137,7 +146,7 @@ if ($c > 0) {
|
|||||||
$stmt->bindParam(':filename', $file);
|
$stmt->bindParam(':filename', $file);
|
||||||
$result = $stmt->execute();
|
$result = $stmt->execute();
|
||||||
if ($result) {
|
if ($result) {
|
||||||
echo $img . gettext(' has been deleted from database !') . "<br />";
|
echo '<h5>' . $img . gettext(' has been deleted from database !') . "</h5>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -695,10 +704,12 @@ if ($d > 0) {
|
|||||||
echo '</thead>';
|
echo '</thead>';
|
||||||
echo '<tbody>';
|
echo '<tbody>';
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
//$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
$full = host() . $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 '</tbody></table>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@@ -712,19 +723,14 @@ if ($d > 0) {
|
|||||||
$conn = null;
|
$conn = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//echo '<h3>' . gettext('Find duplicate images in database: ') . '</h3>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<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>
|
<?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><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></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>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
295
admin/delete_bdd.php
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
<?php
|
||||||
|
require ("3-protect.php");
|
||||||
|
//session_start();
|
||||||
|
include '../i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
|
$chemin = '../photos/img/';
|
||||||
|
$base = "../db_photo.sqlite3";
|
||||||
|
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$conn2 = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
$req_suppress = "";
|
||||||
|
$req_delete = "";
|
||||||
|
$files_deleted = "";
|
||||||
|
$files = array();
|
||||||
|
|
||||||
|
//_pr($_POST);
|
||||||
|
|
||||||
|
/*
|
||||||
|
// view_bdd2.php:
|
||||||
|
supress ; coche => delete_bdd.php (delete ; coche)
|
||||||
|
edit; coche => edit_bdd.php => modify_bdd.php (modif sur la bdd)
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) {
|
||||||
|
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['coche'] as $key => $value) {
|
||||||
|
$r = "id = '" . $value . "' OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req = substr($rr, 0, -4);
|
||||||
|
$req_suppress = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ((isset($_POST["delete"])) && ($_POST["delete"] == "delete")) {
|
||||||
|
|
||||||
|
if (isset($_POST['id']) && (! empty($_POST['id']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['id'] as $key => $value) {
|
||||||
|
$r = "id = '" . $value . "' OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req = substr($rr, 0, -4);
|
||||||
|
/**/
|
||||||
|
$req_suppress = "SELECT id, filename FROM photos WHERE " . $req . " ORDER BY id"; // Pour supprimer les fichiers
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($req_suppress);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$ids[] = $row['id'];
|
||||||
|
|
||||||
|
$file = $row['filename'];
|
||||||
|
if (file_exists($file)) {
|
||||||
|
$files[] = realpath('.') . "/" . $file;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//$msg .= "File $file doesn't exist !";
|
||||||
|
$msg .= sprintf( gettext("File %s doesn't exist !"), $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//_pr($files);
|
||||||
|
|
||||||
|
$req_delete = "DELETE FROM photos WHERE id in (".str_repeat("?,", count($ids) - 1)."?)";
|
||||||
|
// DELETE FROM photos WHERE id in (?,?)
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($req_delete);
|
||||||
|
$stmt->execute($ids);
|
||||||
|
$count = $stmt->rowCount();
|
||||||
|
|
||||||
|
if ($count = count($files)) {
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (unlink($file)) {
|
||||||
|
//echo "File: " . $file . " deleted!" . "<br />";
|
||||||
|
$files_deleted .= sprintf( gettext("File: %s deleted!"), $file ) . "\n";
|
||||||
|
//echo $a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "admin.php?message=" . urlencode(gettext("Please log in !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="description" content="Sur le sentier: admin">
|
||||||
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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='../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>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//debug_to_console($_GET);
|
||||||
|
//debug_to_console($req_edit);
|
||||||
|
|
||||||
|
echo '<h1>' . gettext('Suppress images ') . ': ' . $base . '</h1><br />';
|
||||||
|
|
||||||
|
if (($req_suppress != "") and ($req_delete == "")) {
|
||||||
|
|
||||||
|
echo '<h3>' . $msg . '</h3>';
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
$conn3 = new PDO("sqlite:$base");
|
||||||
|
$stmt3 = $conn3->prepare($req_suppress);
|
||||||
|
$stmt3->execute();
|
||||||
|
|
||||||
|
echo '<form id="deleteImage" name="deleteImage" action="delete_bdd.php" method="post" class="myForm" >';
|
||||||
|
echo '<table class="styled-table">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Expo. correct') . '</th>';
|
||||||
|
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Wb') . '</th>';
|
||||||
|
|
||||||
|
echo '<th>' . gettext('Flash') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th><th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('Code') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
$nRows = 0;
|
||||||
|
while ($row = $stmt3->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
|
||||||
|
$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="title" name="title[]" value="' . $row['title'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="creator" name="creator[]" value="' . $row['creator'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="city" name="city[]" value="' . $row['city'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="department" name="department[]" value="' . $row['department'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="code" name="code[]" value="' . $row['code'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="country" name="country[]" value="' . $row['country'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="copyright" name="copyright[]" value="' . $row['copyright'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="legende" name="legende[]" value="' . $row['legende'] . '" size=""></td></tr>';
|
||||||
|
|
||||||
|
echo '<input type="hidden" id="id" name="id[]" value="' . $row['id'] . '">';
|
||||||
|
$nRows++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</tbody></table>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<p class="alert">' . ngettext("Clic on <b>Delete</b> button will delete the image in the database and the file on the server.", "Clic on <b>Delete</b> button will delete the images in the database and the files on the server.", $nRows) . '</p>';
|
||||||
|
echo '<button type="submit" name="delete" value="delete" class="myButton all">' . gettext('Delete') . '</button>';
|
||||||
|
echo '</form>';
|
||||||
|
|
||||||
|
//$conn = null;
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$req_suppress = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($req_delete != "") {
|
||||||
|
|
||||||
|
$msg = sprintf(ngettext("%d row deleted and the following file:","%d rows deleted and the following files:", $count), $count);
|
||||||
|
//$msg = $count . gettext(" rows deleted and the following files:");
|
||||||
|
echo '<h3 class="greenstyle">' . $msg . '</h3>';
|
||||||
|
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><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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
206
admin/edit_bdd.php
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
<?php
|
||||||
|
require ("3-protect.php");
|
||||||
|
//session_start();
|
||||||
|
include '../i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
|
$chemin = '../photos/img/';
|
||||||
|
$base = '../db_photo.sqlite3';
|
||||||
|
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
$req_edit = "";
|
||||||
|
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
if ((isset($_POST["edit"])) && ($_POST["edit"] == "edit")) {
|
||||||
|
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['coche'] as $key => $value) {
|
||||||
|
$r = "id = '" . $value . "' OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req = substr($rr, 0, -4);
|
||||||
|
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "admin.php?message=" . urlencode(gettext("Please log in !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<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="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>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//debug_to_console($_GET);
|
||||||
|
//debug_to_console($req_edit);
|
||||||
|
|
||||||
|
//$base = '../db_photo.sqlite3';
|
||||||
|
|
||||||
|
echo '<h1>' . gettext('Edit database') . ': ' . $base . '</h1><br />';
|
||||||
|
|
||||||
|
echo '<h3>' . $msg . '</h3>';
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$stmt = $conn->prepare($req_edit);
|
||||||
|
$stmt->execute();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<form id="editImage" name="editImage" action="modify_bdd.php" method="post" class="myForm" >';
|
||||||
|
echo '<table class="styled-table">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Expo. correct') . '</th>';
|
||||||
|
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Wb') . '</th>';
|
||||||
|
|
||||||
|
echo '<th>' . gettext('Flash') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th><th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('Code') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
|
||||||
|
$nRows = 0;
|
||||||
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
|
||||||
|
$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="title" name="title[]" value="' . $row['title'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="creator" name="creator[]" value="' . $row['creator'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="city" name="city[]" value="' . $row['city'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="department" name="department[]" value="' . $row['department'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="code" name="code[]" value="' . $row['code'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="country" name="country[]" value="' . $row['country'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="copyright" name="copyright[]" value="' . $row['copyright'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="legende" name="legende[]" value="' . $row['legende'] . '" size=""></td></tr>';
|
||||||
|
|
||||||
|
echo '<input type="hidden" id="id" name="id[]" value="' . $row['id'] . '">';
|
||||||
|
|
||||||
|
$nRows++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</tbody></table>';
|
||||||
|
echo '<button type="submit" name="update" value="update" class="myButton all">' . gettext('Update') . '</button>';
|
||||||
|
echo '</form>';
|
||||||
|
|
||||||
|
$conn = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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><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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
<?php require ("3-protect.php");
|
<?php
|
||||||
include 'localize.php';
|
require ("3-protect.php");
|
||||||
$domain = 'sentier';
|
//session_start();
|
||||||
localize($domain);
|
include '../i18n_setup.php';
|
||||||
include 'functions.php';
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -13,10 +17,10 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php echo gettext('Insert photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('Insert photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<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/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.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/skins/minimal.css' />
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -24,8 +28,11 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a>' : ''; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$base = 'db_photo.sqlite3';
|
$base = '../db_photo.sqlite3';
|
||||||
|
$chemin = '../photos/img/';
|
||||||
|
|
||||||
echo '<h1>' . gettext("Insert images in " . $base . " database.") . '</h1><br />';
|
echo '<h1>' . gettext("Insert images in " . $base . " database.") . '</h1><br />';
|
||||||
|
|
||||||
@@ -38,16 +45,17 @@ if (file_exists($base)) {
|
|||||||
$th_w = 300;
|
$th_w = 300;
|
||||||
$th_h = 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>';
|
echo '<h3>' . gettext("Creation of the database") . ' <i>' . $base . '</i> ' . gettext("and the table") . ' <i>photo</i> (' . gettext("if necessary") . ')...</h3>';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Création de la base et de la table photos
|
// 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);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$query = "CREATE TABLE IF NOT EXISTS photos (
|
$query = "CREATE TABLE IF NOT EXISTS photos (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
@@ -94,19 +102,17 @@ try {
|
|||||||
echo $e->getMessage();
|
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;
|
$i = 1;
|
||||||
$photos = array();
|
$photos = array();
|
||||||
|
|
||||||
foreach($dir as $file){
|
foreach($dir as $file){
|
||||||
/*
|
|
||||||
$file->getFilename()
|
|
||||||
pathName()
|
|
||||||
*/
|
|
||||||
$file = $file->getpathName();
|
|
||||||
$x = in_bdd($file);
|
|
||||||
|
|
||||||
|
$file = $file->getpathName();
|
||||||
|
//$file = $file->getFilename();
|
||||||
|
|
||||||
|
$x = in_bdd($file);
|
||||||
/*
|
/*
|
||||||
if ($i > 5) {
|
if ($i > 5) {
|
||||||
break;
|
break;
|
||||||
@@ -386,7 +392,7 @@ foreach($dir as $file){
|
|||||||
|
|
||||||
|
|
||||||
$photos[$i] = array(
|
$photos[$i] = array(
|
||||||
'filename' => $file,
|
'filename' => basename($file),
|
||||||
'filesize' => $fsize,
|
'filesize' => $fsize,
|
||||||
|
|
||||||
'dateoriginal' => $da,
|
'dateoriginal' => $da,
|
||||||
@@ -524,7 +530,12 @@ foreach($dir as $file){
|
|||||||
$z = count($photos);
|
$z = count($photos);
|
||||||
if ($z == 0) {
|
if ($z == 0) {
|
||||||
echo '<h3>' . gettext('No new image files to add') . '...</h3>';
|
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();
|
die();
|
||||||
}
|
}
|
||||||
@@ -540,11 +551,12 @@ $avant = $resultat['MAX(id)'];
|
|||||||
$nb_avant = (isset($avant)) ? $avant : 0;
|
$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');
|
$b = ($z > 1) ? gettext('new images') : gettext('new image');
|
||||||
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
|
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
|
||||||
|
|
||||||
|
$short = basename($file);
|
||||||
// Insertion des photos dans la base
|
// Insertion des photos dans la base
|
||||||
// Création des vignettes
|
// Création des vignettes
|
||||||
try {
|
try {
|
||||||
@@ -636,7 +648,11 @@ try {
|
|||||||
$titre = $item['title']; // ***
|
$titre = $item['title']; // ***
|
||||||
$legende = $item['legende']; // ***
|
$legende = $item['legende']; // ***
|
||||||
|
|
||||||
create_thumb($th_w, $th_h, $file);
|
|
||||||
|
# Create Thumbnails (functions.php line 203)
|
||||||
|
|
||||||
|
$big = $chemin . $file;
|
||||||
|
create_thumb($th_w, $th_h, $big);
|
||||||
|
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
@@ -707,12 +723,13 @@ try {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<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> | <?php echo $logout; ?></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></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/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/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
<?php require ("3-protect.php");
|
<?php
|
||||||
include 'localize.php';
|
require ("3-protect.php");
|
||||||
$domain = 'sentier';
|
//session_start();
|
||||||
localize($domain);
|
include '../i18n_setup.php';
|
||||||
include 'functions.php';
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = '../db_photo.sqlite3';
|
||||||
$conn = new PDO("sqlite:$base");
|
$conn = new PDO("sqlite:$base");
|
||||||
$msg = "";
|
$msg = "";
|
||||||
|
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
||||||
|
|
||||||
//echo "<a href='close.php'> close session </a><br />";
|
//echo "<a href='close.php'> close session </a><br />";
|
||||||
|
|
||||||
@@ -156,10 +159,10 @@ else {
|
|||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<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/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.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/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" />
|
<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>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
@@ -184,7 +187,7 @@ else {
|
|||||||
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn = new PDO('sqlite:db_photo.sqlite3');
|
$conn = new PDO("sqlite:../$base");
|
||||||
$stmt = $conn->prepare($req_edit);
|
$stmt = $conn->prepare($req_edit);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
@@ -199,10 +202,12 @@ else {
|
|||||||
|
|
||||||
$nRows = 0;
|
$nRows = 0;
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
//$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
$full = host() . $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="' . $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['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['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||||
echo '<td>' . $row['model'] . '</td>';
|
echo '<td>' . $row['model'] . '</td>';
|
||||||
@@ -236,13 +241,14 @@ 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></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>
|
<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/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/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
require ("3-protect.php");
|
require ("3-protect.php");
|
||||||
include 'localize.php';
|
//session_start();
|
||||||
$domain = 'sentier';
|
include '../i18n_setup.php';
|
||||||
localize($domain);
|
/*include 'localize.php';
|
||||||
include 'functions.php';
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
|
$chemin = '../photos/img/';
|
||||||
|
$base = '../db_photo.sqlite3';
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_REFERER'])){
|
if (isset($_SERVER['HTTP_REFERER'])){
|
||||||
$id = $_GET['id'];
|
$id = $_GET['id'];
|
||||||
@@ -22,26 +28,34 @@ if (isset($_SERVER['HTTP_REFERER'])){
|
|||||||
$software = $_GET['software'];
|
$software = $_GET['software'];
|
||||||
$column = $_GET['column'];
|
$column = $_GET['column'];
|
||||||
$order = $_GET['order'];
|
$order = $_GET['order'];
|
||||||
|
|
||||||
|
echo $filename;
|
||||||
|
/*
|
||||||
class MyDB extends SQLite3 {
|
class MyDB extends SQLite3 {
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->open('db_photo.sqlite3');
|
$this->open('../db_photo.sqlite3');
|
||||||
|
//$this->open($base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db = new MyDB();
|
$db = new MyDB();
|
||||||
|
*/
|
||||||
|
$db = new SQLite3($base);
|
||||||
|
|
||||||
if(!$db){
|
if(!$db){
|
||||||
echo $db->lastErrorMsg();
|
echo $db->lastErrorMsg();
|
||||||
} else {
|
} 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");
|
$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) ){
|
while($row = $ret->fetchArray(SQLITE3_ASSOC) ){
|
||||||
|
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
//$thumbnail = host() . str_replace("img", "thumb", $chemin) . $row['filename'];
|
||||||
$full = host() . $row['filename'];
|
//$full = host() . $chemin . $row['filename'];
|
||||||
$lb = data_for_lightbox($row);
|
$lb = data_for_lightbox($row);
|
||||||
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo (isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '';
|
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 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-2'>".$row['filename']."</td>";
|
||||||
echo "<td class='priority-8'>".$row['dateoriginal']."</td>";
|
echo "<td class='priority-8'>".$row['dateoriginal']."</td>";
|
||||||
echo "<td class='priority-3'>".$row['speed']."</td>";
|
echo "<td class='priority-3'>".$row['speed']."</td>";
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
<?php //require ("3-protect.php");
|
<?php
|
||||||
|
require ("3-protect.php");
|
||||||
include 'functions.php';
|
//session_start();
|
||||||
|
include '../i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
$domain = 'sentier';
|
$domain = 'sentier';
|
||||||
localize($domain);
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -13,10 +17,10 @@ localize($domain);
|
|||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<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/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.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/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" />
|
<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>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
@@ -29,7 +33,7 @@ localize($domain);
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = '../db_photo.sqlite3';
|
||||||
|
|
||||||
_pr($_POST);
|
_pr($_POST);
|
||||||
/*
|
/*
|
||||||
@@ -50,7 +54,7 @@ if (! empty($_POST)){
|
|||||||
$req = "SELECT * FROM photos WHERE " . $key . " = '" . $val . "'";
|
$req = "SELECT * FROM photos WHERE " . $key . " = '" . $val . "'";
|
||||||
echo $req;
|
echo $req;
|
||||||
|
|
||||||
$conn2 = new PDO("sqlite:db_photo.sqlite3");
|
$conn2 = new PDO("sqlite:$base");
|
||||||
$conn2->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn2->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
$limit = 13;
|
$limit = 13;
|
||||||
@@ -74,7 +78,7 @@ _pr($_POST);
|
|||||||
echo '<a href="requests.php">requests</a>';
|
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);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
$request = array(
|
$request = array(
|
||||||
@@ -227,12 +231,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</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>
|
<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/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/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@@ -1,47 +1,22 @@
|
|||||||
<?php require ("3-protect.php");
|
<?php
|
||||||
include 'localize.php';
|
require ("3-protect.php");
|
||||||
$domain = 'sentier';
|
//session_start();
|
||||||
localize($domain);
|
include '../i18n_setup.php';
|
||||||
include 'functions.php';
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$chemin = '../photos/img/';
|
||||||
$conn = new PDO("sqlite:$base");
|
|
||||||
$msg = "";
|
|
||||||
|
|
||||||
if(!empty($_GET['message'])) {
|
$base = '../db_photo.sqlite3';
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
|
||||||
|
if(!empty($_GET['message'])) {
|
||||||
$msg = "<h3 class='redstyle'>" . $_GET['message'] . "</h3>";
|
$msg = "<h3 class='redstyle'>" . $_GET['message'] . "</h3>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SESSION["user"])) {
|
|
||||||
if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) {
|
|
||||||
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
|
||||||
$rr = "";
|
|
||||||
foreach($_POST['coche'] as $key => $value) {
|
|
||||||
$r = "id = " . $value . " OR ";
|
|
||||||
$rr .= $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
$req_delete = substr($rr, 0, strlen($rr)-4);
|
|
||||||
|
|
||||||
try {
|
|
||||||
$req = "DELETE FROM Photos WHERE (" . $req_delete . ")";
|
|
||||||
$stmt = $conn->prepare($req);
|
|
||||||
$stmt->execute();
|
|
||||||
$nb = $stmt->rowCount();
|
|
||||||
}
|
|
||||||
catch(PDOException $e) {
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
$msg = (($nb > 0) ? "<h3 class='greenstyle'>" . $nb . gettext(' photos successfully deleted !') . "</h3>" : "");
|
|
||||||
$request_delete = $req;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$msg = "<h3 class='redstyle'>" . gettext('Empty request !') . "</h3>" ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -49,13 +24,23 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="description" content="Sur le sentier: admin">
|
||||||
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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/css/lc_lightbox.min.css'>
|
||||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.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" />
|
<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>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -105,7 +90,7 @@ function showUser(column) {
|
|||||||
<body onload="showUser('')">
|
<body onload="showUser('')">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br />';
|
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br>';
|
||||||
|
|
||||||
echo $msg;
|
echo $msg;
|
||||||
?>
|
?>
|
||||||
@@ -114,7 +99,8 @@ function showUser(column) {
|
|||||||
if (isset($_SESSION["user"])) {
|
if (isset($_SESSION["user"])) {
|
||||||
echo '<form id="viewSelect" name="viewSelect" action="view_bdd.php" method="post" class="myForm" >';
|
echo '<form id="viewSelect" name="viewSelect" action="view_bdd.php" method="post" class="myForm" >';
|
||||||
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
//echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
echo '<button type="submit" formaction="delete_bdd.php" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -167,12 +153,13 @@ function showUser(column) {
|
|||||||
<?php
|
<?php
|
||||||
if (isset($_SESSION["user"])) {
|
if (isset($_SESSION["user"])) {
|
||||||
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<button type="submit" name="suppress" value="supress" class="myButton all">' . gettext('Suppress') . '</button>';
|
//echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
echo '<button type="submit" formaction="delete_bdd.php" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
@@ -226,14 +213,14 @@ function showUser(column) {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a></p>' : ''; ?>
|
<?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>
|
<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/js/lc_lightbox.min.js'></script>
|
||||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,57 +1,28 @@
|
|||||||
<?php require ("3-protect.php");
|
<?php
|
||||||
session_start();
|
require ("3-protect.php");
|
||||||
include 'localize.php';
|
//session_start();
|
||||||
|
include '../i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
$domain = 'sentier';
|
$domain = 'sentier';
|
||||||
localize($domain);
|
localize($domain);
|
||||||
include 'functions.php';
|
*/
|
||||||
|
include '../functions.php';
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$chemin = '../photos/img/';
|
||||||
|
|
||||||
|
$base = '../db_photo.sqlite3';
|
||||||
$perpage = 20;
|
$perpage = 20;
|
||||||
|
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn = new PDO("sqlite:$base");
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
if (!isset($_GET['page'])) $page = 1;
|
if (!isset($_GET['page'])) $page = 1;
|
||||||
else $page = intval($_GET['page']);
|
else $page = intval($_GET['page']);
|
||||||
|
|
||||||
|
|
||||||
// Suppression d'images
|
|
||||||
|
|
||||||
if (isset($_SESSION["user"])) {
|
|
||||||
if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) {
|
|
||||||
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
|
||||||
$rr = "";
|
|
||||||
foreach($_POST['coche'] as $key => $value) {
|
|
||||||
$r = "id = " . $value . " OR ";
|
|
||||||
$rr .= $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
$req_delete = substr($rr, 0, strlen($rr)-4);
|
|
||||||
|
|
||||||
try {
|
|
||||||
$req = "DELETE FROM Photos WHERE (" . $req_delete . ")";
|
|
||||||
$stmt = $conn->prepare($req);
|
|
||||||
$stmt->execute();
|
|
||||||
$nb = $stmt->rowCount();
|
|
||||||
}
|
|
||||||
catch(PDOException $e) {
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
$msg = (($nb > 0) ? "<h3 class='greenstyle'>" . $nb . gettext(' photos successfully deleted !') . "</h3>" : "");
|
|
||||||
$request_delete = $req;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$msg = "<h3 class='redstyle'>" . gettext('Empty request !') . "</h3>" ;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$gps = (isset($_SESSION['query']['gps'])) ? $_SESSION['query']['gps'] : "off";
|
$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(
|
$request = array(
|
||||||
@@ -95,13 +66,23 @@ foreach ($request as $key => $val){
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="description" content="Sur le sentier: admin">
|
||||||
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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/css/lc_lightbox.min.css'>
|
||||||
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
<link rel='stylesheet' href='../lc-lightbox/css/open_close_fx.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" />
|
<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>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -110,7 +91,7 @@ foreach ($request as $key => $val){
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br />';
|
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br>';
|
||||||
|
|
||||||
// Affichage des photos
|
// Affichage des photos
|
||||||
|
|
||||||
@@ -178,12 +159,13 @@ try {
|
|||||||
$count = $stmt->fetchColumn(34); // total => 35
|
$count = $stmt->fetchColumn(34); // total => 35
|
||||||
$stmt->execute(array($perpage, $offset));
|
$stmt->execute(array($perpage, $offset));
|
||||||
|
|
||||||
|
|
||||||
if (empty($_POST)) {
|
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 !!
|
// Display request !!
|
||||||
echo '<pre><code>' . $query2 . '</code></pre>';
|
echo '<pre><code>' . $query2 . '</code></pre>';
|
||||||
}
|
}
|
||||||
elseif ($_POST["suppress"] == "suppress") {
|
elseif ((isset($_POST['suppress'])) && ($_POST["suppress"] == "suppress")) {
|
||||||
|
|
||||||
echo $msg;
|
echo $msg;
|
||||||
|
|
||||||
@@ -193,7 +175,9 @@ try {
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo '<h3 class="greenstyle">' . $count . gettext(' images founds with the following request:') . '</h3>';
|
$found = sprintf(ngettext("%d image found with the following query:","%d images found with the following query:", $count), $count);
|
||||||
|
echo '<h3 class="greenstyle">' . $found . '</h3>';
|
||||||
|
//echo '<h3 class="greenstyle">' . $count . gettext(' images founds with the following request:') . '</h3>';
|
||||||
// Display request !!
|
// Display request !!
|
||||||
echo '<pre><code>' . $query2 . '</code></pre>';
|
echo '<pre><code>' . $query2 . '</code></pre>';
|
||||||
}
|
}
|
||||||
@@ -249,9 +233,9 @@ try {
|
|||||||
</select>
|
</select>
|
||||||
<span class="operateur"><?php echo gettext('Operator:'); ?></span>
|
<span class="operateur"><?php echo gettext('Operator:'); ?></span>
|
||||||
<input type="radio" id="operator1" name="operator" value="AND" checked>
|
<input type="radio" id="operator1" name="operator" value="AND" checked>
|
||||||
<label for="ope1"><?php echo gettext('AND'); ?></label>
|
<label for="operator1"><?php echo gettext('AND'); ?></label>
|
||||||
<input type="radio" id="operator2" name="operator" value="OR">
|
<input type="radio" id="operator2" name="operator" value="OR">
|
||||||
<label for="ope1"><?php echo gettext('OR'); ?></label>
|
<label for="operator2"><?php echo gettext('OR'); ?></label>
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="myButton">OK</button>
|
<button type="submit" class="myButton">OK</button>
|
||||||
@@ -293,23 +277,23 @@ try {
|
|||||||
echo '<form id="viewSelect" name="viewSelect" action="view_bdd2.php" method="post" class="myForm" >';
|
echo '<form id="viewSelect" name="viewSelect" action="view_bdd2.php" method="post" class="myForm" >';
|
||||||
|
|
||||||
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
//echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
echo '<button type="submit" formaction="delete_bdd.php" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
|
||||||
echo '<table class="styled-table">';
|
echo '<table class="styled-table">';
|
||||||
echo '<thead>';
|
echo '<thead>';
|
||||||
echo ((isset($_SESSION["user"])) ? '<th>' . gettext('Select') . '</th>' : '') . '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . ' (' . gettext('Size') . ')</th><th><a class="sort" href="view_bdd.php?column=date&order=' . $asc_or_desc . '">' . gettext('Date') . ' <i class="fas fa-sort' . ($column == 'date' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lens&order=' . $asc_or_desc . '">' . gettext('Lens') . ' <i class="fas fa-sort' . ($column == 'lens' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Exposure corr.') . '</th><th><a href="view_bdd.php?column=iso&order=' . $asc_or_desc . '">' . gettext('Iso') . ' <i class="fas fa-sort' . ($column == 'iso' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th>';
|
echo '<tr>' . ((isset($_SESSION["user"])) ? '<th>' . gettext('Select') . '</th>' : '') . '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . ' (' . gettext('Size') . ')</th><th><a class="sort" href="view_bdd.php?column=date&order=' . $asc_or_desc . '">' . gettext('Date') . ' <i class="fas fa-sort' . ($column == 'date' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lens&order=' . $asc_or_desc . '">' . gettext('Lens') . ' <i class="fas fa-sort' . ($column == 'lens' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Exposure corr.') . '</th><th><a href="view_bdd.php?column=iso&order=' . $asc_or_desc . '">' . gettext('Iso') . ' <i class="fas fa-sort' . ($column == 'iso' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th>';
|
||||||
echo '<th><a href="view_bdd.php?column=model&order=' . $asc_or_desc . '">' . gettext('Model') . ' <i class="fas fa-sort' . ($column == 'Model' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lat&order=' . $asc_or_desc . '">' . gettext('Latitude') . ' <i class="fas fa-sort' . ($column == 'lat' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
echo '<th><a href="view_bdd.php?column=model&order=' . $asc_or_desc . '">' . gettext('Model') . ' <i class="fas fa-sort' . ($column == 'Model' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lat&order=' . $asc_or_desc . '">' . gettext('Latitude') . ' <i class="fas fa-sort' . ($column == 'lat' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
||||||
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th>';
|
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th></tr>';
|
||||||
echo '</thead>';
|
echo '</thead>';
|
||||||
echo '<tbody>';
|
echo '<tbody>';
|
||||||
|
|
||||||
$nRows = 0;
|
$nRows = 0;
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
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);
|
$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++;
|
$nRows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +302,8 @@ try {
|
|||||||
echo '</tbody></table>';
|
echo '</tbody></table>';
|
||||||
if (isset($_SESSION["user"])) {
|
if (isset($_SESSION["user"])) {
|
||||||
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<button type="submit" name="suppress" value="supress" class="myButton all">' . gettext('Suppress') . '</button>';
|
//echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
echo '<button type="submit" formaction="delete_bdd.php" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
}
|
}
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@@ -329,7 +314,7 @@ try {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
@@ -395,7 +380,7 @@ try {
|
|||||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
$numRows = $result['count'];
|
$numRows = $result['count'];
|
||||||
|
|
||||||
$stmt = $conn->reset();
|
//$stmt = $conn->reset();
|
||||||
$conn = null;
|
$conn = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -424,14 +409,14 @@ try {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a></p>' : ''; ?>
|
<?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>
|
<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/js/lc_lightbox.min.js'></script>
|
||||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='../lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
5
composer.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"phpmyadmin/motranslator": "^5.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
692
composer.lock
generated
Normal file
@@ -0,0 +1,692 @@
|
|||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "b102e899e31d62f4d40282ff04a339d9",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "phpmyadmin/motranslator",
|
||||||
|
"version": "5.3.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpmyadmin/motranslator.git",
|
||||||
|
"reference": "d03b4d9c608e7265091bf6decc05323d16c7c047"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpmyadmin/motranslator/zipball/d03b4d9c608e7265091bf6decc05323d16c7c047",
|
||||||
|
"reference": "d03b4d9c608e7265091bf6decc05323d16c7c047",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.1 || ^8.0",
|
||||||
|
"symfony/expression-language": "^4.0 || ^5.0 || ^6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpmyadmin/coding-standard": "^3.0.0",
|
||||||
|
"phpstan/phpstan": "^1.4.6",
|
||||||
|
"phpunit/phpunit": "^7.4 || ^8 || ^9"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-apcu": "Needed for ACPu-backed translation cache"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"PhpMyAdmin\\MoTranslator\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"GPL-2.0-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "The phpMyAdmin Team",
|
||||||
|
"email": "developers@phpmyadmin.net",
|
||||||
|
"homepage": "https://www.phpmyadmin.net/team/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Translation API for PHP using Gettext MO files",
|
||||||
|
"homepage": "https://github.com/phpmyadmin/motranslator",
|
||||||
|
"keywords": [
|
||||||
|
"gettext",
|
||||||
|
"i18n",
|
||||||
|
"mo",
|
||||||
|
"translator"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/phpmyadmin/motranslator/issues",
|
||||||
|
"source": "https://github.com/phpmyadmin/motranslator"
|
||||||
|
},
|
||||||
|
"time": "2023-08-23T18:32:07+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/cache",
|
||||||
|
"version": "3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/cache.git",
|
||||||
|
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
|
||||||
|
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Cache\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for caching libraries",
|
||||||
|
"keywords": [
|
||||||
|
"cache",
|
||||||
|
"psr",
|
||||||
|
"psr-6"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/cache/tree/3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2021-02-03T23:26:27+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/container",
|
||||||
|
"version": "2.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/container.git",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Container\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||||
|
"homepage": "https://github.com/php-fig/container",
|
||||||
|
"keywords": [
|
||||||
|
"PSR-11",
|
||||||
|
"container",
|
||||||
|
"container-interface",
|
||||||
|
"container-interop",
|
||||||
|
"psr"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
|
"source": "https://github.com/php-fig/container/tree/2.0.2"
|
||||||
|
},
|
||||||
|
"time": "2021-11-05T16:47:00+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "3.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Log\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for logging libraries",
|
||||||
|
"homepage": "https://github.com/php-fig/log",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"psr",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||||
|
},
|
||||||
|
"time": "2024-09-11T13:17:53+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/cache",
|
||||||
|
"version": "v7.2.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/cache.git",
|
||||||
|
"reference": "e7e983596b744c4539f31e79b0350a6cf5878a20"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/cache/zipball/e7e983596b744c4539f31e79b0350a6cf5878a20",
|
||||||
|
"reference": "e7e983596b744c4539f31e79b0350a6cf5878a20",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.2",
|
||||||
|
"psr/cache": "^2.0|^3.0",
|
||||||
|
"psr/log": "^1.1|^2|^3",
|
||||||
|
"symfony/cache-contracts": "^2.5|^3",
|
||||||
|
"symfony/deprecation-contracts": "^2.5|^3.0",
|
||||||
|
"symfony/service-contracts": "^2.5|^3",
|
||||||
|
"symfony/var-exporter": "^6.4|^7.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/dbal": "<3.6",
|
||||||
|
"symfony/dependency-injection": "<6.4",
|
||||||
|
"symfony/http-kernel": "<6.4",
|
||||||
|
"symfony/var-dumper": "<6.4"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/cache-implementation": "2.0|3.0",
|
||||||
|
"psr/simple-cache-implementation": "1.0|2.0|3.0",
|
||||||
|
"symfony/cache-implementation": "1.1|2.0|3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"cache/integration-tests": "dev-master",
|
||||||
|
"doctrine/dbal": "^3.6|^4",
|
||||||
|
"predis/predis": "^1.1|^2.0",
|
||||||
|
"psr/simple-cache": "^1.0|^2.0|^3.0",
|
||||||
|
"symfony/clock": "^6.4|^7.0",
|
||||||
|
"symfony/config": "^6.4|^7.0",
|
||||||
|
"symfony/dependency-injection": "^6.4|^7.0",
|
||||||
|
"symfony/filesystem": "^6.4|^7.0",
|
||||||
|
"symfony/http-kernel": "^6.4|^7.0",
|
||||||
|
"symfony/messenger": "^6.4|^7.0",
|
||||||
|
"symfony/var-dumper": "^6.4|^7.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Cache\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Traits/ValueWrapper.php"
|
||||||
|
],
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides extended PSR-6, PSR-16 (and tags) implementations",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"caching",
|
||||||
|
"psr6"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/cache/tree/v7.2.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-12-07T08:08:50+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/cache-contracts",
|
||||||
|
"version": "v3.5.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/cache-contracts.git",
|
||||||
|
"reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b",
|
||||||
|
"reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"psr/cache": "^3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "3.5-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Contracts\\Cache\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Generic abstractions related to caching",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"abstractions",
|
||||||
|
"contracts",
|
||||||
|
"decoupling",
|
||||||
|
"interfaces",
|
||||||
|
"interoperability",
|
||||||
|
"standards"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/cache-contracts/tree/v3.5.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-25T14:20:29+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/deprecation-contracts",
|
||||||
|
"version": "v3.5.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
|
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||||
|
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "3.5-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"function.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-25T14:20:29+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/expression-language",
|
||||||
|
"version": "v6.4.13",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/expression-language.git",
|
||||||
|
"reference": "3524904fb026356a5230cd197f9a4e6a61e0e7df"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/expression-language/zipball/3524904fb026356a5230cd197f9a4e6a61e0e7df",
|
||||||
|
"reference": "3524904fb026356a5230cd197f9a4e6a61e0e7df",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
|
"symfony/service-contracts": "^2.5|^3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\ExpressionLanguage\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides an engine that can compile and evaluate expressions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/expression-language/tree/v6.4.13"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-10-09T08:40:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/service-contracts",
|
||||||
|
"version": "v3.5.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/service-contracts.git",
|
||||||
|
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0",
|
||||||
|
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"psr/container": "^1.1|^2.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.5|^3"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"ext-psr": "<1.1|>=2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "3.5-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Contracts\\Service\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Test/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Generic abstractions related to writing services",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"abstractions",
|
||||||
|
"contracts",
|
||||||
|
"decoupling",
|
||||||
|
"interfaces",
|
||||||
|
"interoperability",
|
||||||
|
"standards"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/service-contracts/tree/v3.5.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-25T14:20:29+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/var-exporter",
|
||||||
|
"version": "v7.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/var-exporter.git",
|
||||||
|
"reference": "1a6a89f95a46af0f142874c9d650a6358d13070d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d",
|
||||||
|
"reference": "1a6a89f95a46af0f142874c9d650a6358d13070d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/property-access": "^6.4|^7.0",
|
||||||
|
"symfony/serializer": "^6.4|^7.0",
|
||||||
|
"symfony/var-dumper": "^6.4|^7.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\VarExporter\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Allows exporting any serializable PHP data structure to plain PHP code",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"clone",
|
||||||
|
"construct",
|
||||||
|
"export",
|
||||||
|
"hydrate",
|
||||||
|
"instantiate",
|
||||||
|
"lazy-loading",
|
||||||
|
"proxy",
|
||||||
|
"serialize"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/var-exporter/tree/v7.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-10-18T07:58:17+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": {},
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": {},
|
||||||
|
"platform-dev": {},
|
||||||
|
"plugin-api-version": "2.6.0"
|
||||||
|
}
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
bottom: -1px;
|
bottom: -1px;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
opcity: 0;
|
opacity: 0;
|
||||||
background: #6f6f6f;
|
background: #6f6f6f;
|
||||||
|
|
||||||
-webkit-transition: all .2s ease;
|
-webkit-transition: all .2s ease;
|
||||||
|
|||||||
14
css/sls.css
@@ -9,7 +9,7 @@ h1 {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, h3, h4 {
|
h2, h3, h4, h5 {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
h3 {
|
h3 {
|
||||||
@@ -22,6 +22,11 @@ h4 {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
/*margin-bottom: 2em;*/
|
/*margin-bottom: 2em;*/
|
||||||
}
|
}
|
||||||
|
h5 {
|
||||||
|
font-weight: 200;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -511,6 +516,13 @@ h3.greenstyle {
|
|||||||
.font10 {
|
.font10 {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
.alert {
|
||||||
|
color: red;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.redtext {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
input[type="text"], textarea {
|
input[type="text"], textarea {
|
||||||
|
|||||||
145
edit_bdd.php
@@ -1,145 +0,0 @@
|
|||||||
<?php require ("3-protect.php");
|
|
||||||
include 'localize.php';
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
include 'functions.php';
|
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
|
||||||
$conn = new PDO("sqlite:$base");
|
|
||||||
$msg = "";
|
|
||||||
$req_edit = "";
|
|
||||||
|
|
||||||
if (isset($_SESSION["user"])) {
|
|
||||||
if ((isset($_POST["edit"])) && ($_POST["edit"] == "edit")) {
|
|
||||||
|
|
||||||
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
|
||||||
$rr = "";
|
|
||||||
foreach($_POST['coche'] as $key => $value) {
|
|
||||||
$r = "id = '" . $value . "' OR ";
|
|
||||||
$rr .= $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
$req = substr($rr, 0, -4);
|
|
||||||
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
|
||||||
header("location: $url");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
|
||||||
header("location: $url");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$url = "admin.php?message=" . urlencode(gettext("Please log in !"));
|
|
||||||
header("location: $url");
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<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="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>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
debug_to_console($_GET);
|
|
||||||
debug_to_console($req_edit);
|
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
|
||||||
|
|
||||||
echo '<h1>' . gettext('Edit database') . ': ' . $base . '</h1><br />';
|
|
||||||
|
|
||||||
echo '<h3>' . $msg . '</h3>';
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
$conn = new PDO('sqlite:db_photo.sqlite3');
|
|
||||||
$stmt = $conn->prepare($req_edit);
|
|
||||||
$stmt->execute();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
echo '<form id="editImage" name="editImage" action="modify_bdd.php" method="post" class="myForm" >';
|
|
||||||
echo '<table class="styled-table">';
|
|
||||||
echo '<thead>';
|
|
||||||
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Expo. correct') . '</th>';
|
|
||||||
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Wb') . '</th>';
|
|
||||||
|
|
||||||
echo '<th>' . gettext('Flash') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th><th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('Code') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
|
||||||
echo '</thead>';
|
|
||||||
echo '<tbody>';
|
|
||||||
|
|
||||||
|
|
||||||
$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>';
|
|
||||||
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>';
|
|
||||||
|
|
||||||
echo '<td><input type="text" id="city" name="city[]" value="' . $row['city'] . '" size=""></td>';
|
|
||||||
echo '<td><input type="text" id="department" name="department[]" value="' . $row['department'] . '" size=""></td>';
|
|
||||||
echo '<td><input type="text" id="code" name="code[]" value="' . $row['code'] . '" size=""></td>';
|
|
||||||
echo '<td><input type="text" id="country" name="country[]" value="' . $row['country'] . '" size=""></td>';
|
|
||||||
|
|
||||||
echo '<td><input type="text" id="copyright" name="copyright[]" value="' . $row['copyright'] . '" size=""></td>';
|
|
||||||
echo '<td><input type="text" id="legende" name="legende[]" value="' . $row['legende'] . '" size=""></td></tr>';
|
|
||||||
|
|
||||||
echo '<input type="hidden" id="id" name="id[]" value="' . $row['id'] . '">';
|
|
||||||
|
|
||||||
$nRows++;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</tbody></table>';
|
|
||||||
echo '<button type="submit" name="update" value="update" class="myButton all">' . gettext('Update') . '</button>';
|
|
||||||
echo '</form>';
|
|
||||||
|
|
||||||
$conn = null;
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(PDOException $e) {
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
@@ -201,12 +201,49 @@ function get_gps($exif) {
|
|||||||
|
|
||||||
|
|
||||||
function create_thumb($thumb_w, $thumb_h, $image) {
|
function create_thumb($thumb_w, $thumb_h, $image) {
|
||||||
|
global $chemin;
|
||||||
|
|
||||||
list($origin_w, $origin_h) = getimagesize($image);
|
list($origin_w, $origin_h) = getimagesize($image);
|
||||||
$origin_ratio = round($origin_w / $origin_h, 1);
|
$origin_ratio = round($origin_w / $origin_h, 1);
|
||||||
$outFile = str_replace("photos/img", "photos/thumb", $image);
|
$outFile = str_replace("img", "thumb", $chemin) . basename($image);
|
||||||
|
|
||||||
if ($origin_w != null && $origin_h != null) {
|
$new_w = 300;
|
||||||
|
$new_h = 200;
|
||||||
|
|
||||||
|
//$f = $chemin . $image;
|
||||||
|
$thumb = new Imagick($image);
|
||||||
|
|
||||||
|
if ($origin_w != null && $origin_h != null) {
|
||||||
|
if ($origin_w > $origin_h) {
|
||||||
|
|
||||||
|
$resize_w = $origin_w * $new_h / $origin_h;
|
||||||
|
$resize_h = $new_h;
|
||||||
|
|
||||||
|
//$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_LANCZOS, 0.9);
|
||||||
|
$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_CATROM, 0.9);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$resize_w = $new_w;
|
||||||
|
$resize_h = $origin_h * $new_w / $origin_w; // 450
|
||||||
|
|
||||||
|
$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_CATROM, 0.9); // 300 x 300
|
||||||
|
$thumb->cropImage($new_w, $new_h, ($resize_w - $new_w) / 2, ($resize_h - $new_h) / 2); // (w, h, x ,y) (xy coin haut gauche) (300, 200, 0, 125)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//$image->sharpenimage($radius, $sigma, $channel); // 5, 1
|
||||||
|
$thumb->sharpenimage(5, 1);
|
||||||
|
$thumb->setImageCompression(Imagick::COMPRESSION_ZIP);
|
||||||
|
// Set compression level (1 lowest quality, 100 highest quality)
|
||||||
|
$thumb->setImageCompressionQuality(75);
|
||||||
|
// Strip out unneeded meta data
|
||||||
|
$thumb->stripImage();
|
||||||
|
|
||||||
|
$thumb->writeImage($outFile);
|
||||||
|
$thumb->destroy();
|
||||||
|
|
||||||
|
/*
|
||||||
if ($thumb_w / $thumb_h > $origin_ratio) {
|
if ($thumb_w / $thumb_h > $origin_ratio) {
|
||||||
$thumb_w = $thumb_h * $origin_ratio;
|
$thumb_w = $thumb_h * $origin_ratio;
|
||||||
} else {
|
} else {
|
||||||
@@ -219,8 +256,11 @@ if ($origin_w != null && $origin_h != null) {
|
|||||||
$image->writeImage($outFile);
|
$image->writeImage($outFile);
|
||||||
$image->destroy();
|
$image->destroy();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
||||||
|
|
||||||
@@ -228,8 +268,10 @@ if ($origin_w != null && $origin_h != null) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function in_bdd($image) {
|
function in_bdd($image) {
|
||||||
|
global $base;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn3 = new PDO('sqlite:db_photo.sqlite3');
|
$conn3 = new PDO("sqlite:$base");
|
||||||
#$query3 = "SELECT filename FROM photos WHERE instr(filename, '". $file . "') > 0;";
|
#$query3 = "SELECT filename FROM photos WHERE instr(filename, '". $file . "') > 0;";
|
||||||
$query3 = "SELECT filename FROM photos WHERE filename = :filename";
|
$query3 = "SELECT filename FROM photos WHERE filename = :filename";
|
||||||
$stmt = $conn3->prepare($query3);
|
$stmt = $conn3->prepare($query3);
|
||||||
@@ -373,6 +415,7 @@ function conv_date($dateoriginal, $format) {
|
|||||||
|
|
||||||
function data_for_lightbox($data) {
|
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);
|
//$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'];
|
$filename = $data['filename'];
|
||||||
@@ -399,6 +442,11 @@ function data_for_lightbox($data) {
|
|||||||
$longitude = $data['long'];
|
$longitude = $data['long'];
|
||||||
$altitude = $data['alt'];
|
$altitude = $data['alt'];
|
||||||
|
|
||||||
|
$width = $data['width'];
|
||||||
|
$height = $data['height'];
|
||||||
|
|
||||||
|
//echo $width . "-" . $height;
|
||||||
|
|
||||||
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
||||||
//$gps = $longitude . "," . $latitude;
|
//$gps = $longitude . "," . $latitude;
|
||||||
|
|
||||||
@@ -428,8 +476,12 @@ function data_for_lightbox($data) {
|
|||||||
|
|
||||||
$creator = $data['creator'];
|
$creator = $data['creator'];
|
||||||
|
|
||||||
$big = host() . $data['filename'];
|
$big = host() . $chemin . $data['filename'];
|
||||||
$thumb = host() . str_replace("photos/img", "photos/thumb", $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']));
|
$keywords = str_replace(',', " \u{30FB} ", clean_keywords($data['keywords']));
|
||||||
$copyright = $data['copyright'];
|
$copyright = $data['copyright'];
|
||||||
@@ -483,6 +535,8 @@ function data_for_lightbox($data) {
|
|||||||
$lightbox['creator'] = $creator;
|
$lightbox['creator'] = $creator;
|
||||||
$lightbox['gps'] = $gps;
|
$lightbox['gps'] = $gps;
|
||||||
$lightbox['description'] = $description;
|
$lightbox['description'] = $description;
|
||||||
|
$lightbox['width'] = $width;
|
||||||
|
$lightbox['height'] = $height;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Array
|
Array
|
||||||
|
|||||||
97
i18n_setup.php
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Verifies if the given $locale is supported in the project
|
||||||
|
* @param string $locale
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
|
||||||
|
function list_locale_server($dir) {
|
||||||
|
$lange = array();
|
||||||
|
$iterator = new DirectoryIterator($dir);
|
||||||
|
foreach ($iterator as $ff) {
|
||||||
|
if ($ff->isDot() OR $ff->isFile()) { continue; }
|
||||||
|
if ($ff->isDir()) {
|
||||||
|
$d = $ff->getFilename();
|
||||||
|
if (($d != "nocache") AND (strpos($d, "_"))) {
|
||||||
|
$e = strtok($d, "_");
|
||||||
|
$lange[] = $d;
|
||||||
|
$lange[] = $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//print_r($lange);
|
||||||
|
return $lange;
|
||||||
|
}
|
||||||
|
|
||||||
|
function valid($locale) {
|
||||||
|
//return in_array($locale, ['en_US', 'en', 'fr_FR', 'fr', 'de_DE', 'de', 'es_ES', 'es']);
|
||||||
|
global $dir_locales;
|
||||||
|
$l = list_locale_server($dir_locales);
|
||||||
|
return in_array($locale, $l);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------*/
|
||||||
|
/* Settings */
|
||||||
|
/* ------------------------------------*/
|
||||||
|
|
||||||
|
$dir_locales = __DIR__ . '/Locale';
|
||||||
|
|
||||||
|
//setting the source/default locale, for informational purposes
|
||||||
|
$lang = 'en_US';
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (isset($_GET['lang']) && valid($_GET['lang'])) {
|
||||||
|
// the locale can be changed through the query-string
|
||||||
|
$lang = $_GET['lang']; //you should sanitize this!
|
||||||
|
//setcookie('lang', $lang); //it's stored in a cookie so it can be reused
|
||||||
|
setcookie('lang', $lang, time() + (86400 * 30), "/"); //it's stored in a cookie so it can be reused
|
||||||
|
*/
|
||||||
|
if (isset($_POST['lang']) && valid($_POST['lang'])) {
|
||||||
|
// the locale can be changed through the query-string
|
||||||
|
$lang = $_POST['lang']; //you should sanitize this!
|
||||||
|
//setcookie('lang', $lang); //it's stored in a cookie so it can be reused
|
||||||
|
setcookie('lang', $lang, time() + (86400 * 30), "/"); //it's stored in a cookie so it can be reused
|
||||||
|
|
||||||
|
} elseif (isset($_SESSION['language']) && valid($_SESSION['language'])) {
|
||||||
|
// if the cookie is present instead, let's just keep it
|
||||||
|
$lang = $_SESSION['language']; //you should sanitize this!
|
||||||
|
|
||||||
|
} elseif (isset($_COOKIE['lang']) && valid($_COOKIE['lang'])) {
|
||||||
|
// if the cookie is present instead, let's just keep it
|
||||||
|
$lang = $_COOKIE['lang']; //you should sanitize this!
|
||||||
|
|
||||||
|
} elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||||
|
// default: look for the languages the browser says the user accepts
|
||||||
|
$langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||||
|
array_walk($langs, function (&$lang) { $lang = strtr(strtok($lang, ';'), ['-' => '_']); });
|
||||||
|
foreach ($langs as $browser_lang) {
|
||||||
|
if (valid($browser_lang)) {
|
||||||
|
$lang = $browser_lang;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// here we define the global system locale given the found language
|
||||||
|
putenv("LANG=$lang");
|
||||||
|
|
||||||
|
// this might be useful for date functions (LC_TIME) or money formatting (LC_MONETARY), for instance
|
||||||
|
setlocale(LC_ALL, $lang);
|
||||||
|
|
||||||
|
// this will make Gettext look for ../locales/<lang>/LC_MESSAGES/main.mo
|
||||||
|
bindtextdomain('sentier', __DIR__ . '/Locale/');
|
||||||
|
|
||||||
|
// indicates in what encoding the file should be read
|
||||||
|
bind_textdomain_codeset('sentier', 'UTF-8');
|
||||||
|
|
||||||
|
// if your application has additional domains, as cited before, you should bind them here as well
|
||||||
|
//bindtextdomain('forum', '../locales');
|
||||||
|
//bind_textdomain_codeset('forum', 'UTF-8');
|
||||||
|
|
||||||
|
// here we indicate the default domain the gettext() calls will respond to
|
||||||
|
textdomain('sentier');
|
||||||
|
|
||||||
|
// this would look for the string in forum.mo instead of main.mo
|
||||||
|
// echo dgettext('forum', 'Welcome back!');
|
||||||
|
?>
|
||||||
44
index.php
@@ -1,16 +1,25 @@
|
|||||||
<?php include 'localize.php';
|
<?php
|
||||||
|
session_start();
|
||||||
|
include 'i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
$domain = 'sentier';
|
$domain = 'sentier';
|
||||||
localize($domain);
|
localize($domain);
|
||||||
|
*/
|
||||||
include 'functions.php';
|
include 'functions.php';
|
||||||
|
/*
|
||||||
|
_pr($_REQUEST); // [lang] => es_ES
|
||||||
|
_pr($_SESSION); // [language] => es_ES
|
||||||
|
_pr($_POST);
|
||||||
|
_pr($_GET); // [lang] => es_ES
|
||||||
|
*/
|
||||||
?>
|
?>
|
||||||
<?php session_start(); ?>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Sur le sentier: photos prises au cours de mes ballades" />
|
<meta name="description" content="Sur le sentier: <?php echo gettext('photos taken during my walks'); ?>...">
|
||||||
<title>Sur le sentier...</title>
|
<title>Sur le sentier...</title>
|
||||||
|
|
||||||
<meta name="msapplication-TileColor" content="#2b5797">
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
@@ -22,34 +31,25 @@ include 'functions.php';
|
|||||||
<link rel="manifest" href="/icons/site.webmanifest">
|
<link rel="manifest" href="/icons/site.webmanifest">
|
||||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
<script src="vegas/js/vegas.min.js"></script>
|
<script src="vegas/js/vegas.min.js"></script>
|
||||||
<script src="js/matomo-sls.js"></script>
|
<script src="js/matomo-sls.js"></script>
|
||||||
<link href='https://fonts.googleapis.com/css?family=Coming+Soon' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Coming+Soon' rel='stylesheet' type='text/css'>
|
||||||
<!-- Patrick+Hand|Josefin+Sans|Coming+Soon|Comfortaa|Pontano+Sans|Rock+Salt -->
|
<!-- Patrick+Hand|Josefin+Sans|Coming+Soon|Comfortaa|Pontano+Sans|Rock+Salt -->
|
||||||
<link rel="stylesheet" type="text/css" href="vegas/js/vegas.min.css" />
|
<link rel="stylesheet" type="text/css" href="vegas/js/vegas.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="vegas/js/vegas-style.css" />
|
<link rel="stylesheet" type="text/css" href="vegas/js/vegas-style.css">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sls.css" />
|
<link rel="stylesheet" type="text/css" href="css/sls.css">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
//Get a list of file paths using the glob function.
|
//Get a list of file paths using the glob function.
|
||||||
$fileList = glob('vegas/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE);
|
$fileList = glob('vegas/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE);
|
||||||
|
|
||||||
$pv_sslport=443;
|
|
||||||
$pv_serverport=80;
|
|
||||||
$pv_servername="sur-le-sentier.fr";
|
|
||||||
|
|
||||||
$pv_URIprotocol = isset($_SERVER["HTTPS"]) ? (($_SERVER["HTTPS"]==="on" || $_SERVER["HTTPS"]===1 || $_SERVER["SERVER_PORT"]===$pv_sslport) ? "https://" : "http://") : (($_SERVER["SERVER_PORT"]===$pv_sslport) ? "https://" : "http://");
|
|
||||||
$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'];
|
|
||||||
|
|
||||||
$wp = (($_SERVER['SERVER_NAME'] == "sur-le-sentier.fr") ? "blog" : "wordpress");
|
$wp = (($_SERVER['SERVER_NAME'] == "sur-le-sentier.fr") ? "blog" : "wordpress");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php //echo "Session language: " . $_SESSION['language']; ?>
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$("#exemple, body").vegas({
|
$("#exemple, body").vegas({
|
||||||
@@ -99,7 +99,7 @@ $("#exemple, body").vegas({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="icn">
|
<div class="icn">
|
||||||
<!--a title="mail" href="mailto:contact.clicclac.info?subject=[Contact] sur-le-sentier.fr"-->
|
<!--a title="mail" href="mailto:contact.clicclac.info?subject=[Contact] sur-le-sentier.fr"-->host()
|
||||||
<a title="mail" href="/<?php echo $wp; ?>/contact/">
|
<a title="mail" href="/<?php echo $wp; ?>/contact/">
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
@@ -109,7 +109,8 @@ $("#exemple, body").vegas({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="icn">
|
<div class="icn">
|
||||||
<a title="rss" href="<?php echo $host . "/" . $wp; ?>/feed/">
|
<?php //echo $host . "/" . $wp; ?>
|
||||||
|
<a title="rss" href="<?php host() . "/" . $wp; ?>/feed/">
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
||||||
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
||||||
<g><path d="M143.6,722.7c-37.1,0-68.7,13-94.7,39c-26,26-39,57.5-39,94.6c0,37.1,13,68.7,39,94.7c26,26,57.5,39,94.7,39s68.7-13,94.6-39c26-26,39-57.5,39-94.7c0-37.1-13-68.7-39-94.6C212.3,735.7,180.7,722.7,143.6,722.7z"/><path d="M451.2,548.7c-52.4-52.9-112.5-95-180.3-126.3c-67.7-31.3-138.7-50-213-56h-3.5c-12.1,0-22,3.9-29.9,11.8c-9.7,8.3-14.6,19.3-14.6,32.7v94c0,11.6,3.8,21.6,11.5,29.9c7.7,8.4,17.3,13,28.9,13.9c106.2,10.2,197.1,53,272.5,128.4c75.4,75.4,118.2,166.2,128.4,272.5c0.9,11.6,5.6,21.2,13.9,28.9c8.4,7.7,18.3,11.5,29.9,11.5h94c13.5,0,24.4-4.9,32.7-14.6c8.8-9.3,12.8-20.4,11.8-33.4c-6-74.2-24.7-145.2-56-212.9C546.2,661.2,504.1,601.1,451.2,548.7z"/><path d="M906.4,594.3c-49.6-111.1-117.8-209.8-204.6-296.1c-86.3-86.8-185-155-296.1-204.6C294.5,43.9,178.2,16.1,56.6,10h-2.1c-12.1,0-22.3,4.2-30.6,12.5c-9.3,8.3-13.9,19-13.9,32v99.5c0,11.6,4.1,21.7,12.2,30.3c8.1,8.6,18,13.1,29.6,13.6c99.8,6,194.5,29.7,284.3,71c89.8,41.3,167.7,95,233.8,161.1C636,496.2,689.7,574.1,731,663.9c41.3,89.8,64.7,184.5,70.3,284.3c0.5,11.6,5,21.5,13.6,29.6c8.6,8.1,18.9,12.2,31,12.2h99.5c13,0,23.6-4.6,32-13.9c9.3-9.3,13.4-20.2,12.5-32.7C983.9,821.8,956,705.4,906.4,594.3z"/></g>
|
<g><path d="M143.6,722.7c-37.1,0-68.7,13-94.7,39c-26,26-39,57.5-39,94.6c0,37.1,13,68.7,39,94.7c26,26,57.5,39,94.7,39s68.7-13,94.6-39c26-26,39-57.5,39-94.7c0-37.1-13-68.7-39-94.6C212.3,735.7,180.7,722.7,143.6,722.7z"/><path d="M451.2,548.7c-52.4-52.9-112.5-95-180.3-126.3c-67.7-31.3-138.7-50-213-56h-3.5c-12.1,0-22,3.9-29.9,11.8c-9.7,8.3-14.6,19.3-14.6,32.7v94c0,11.6,3.8,21.6,11.5,29.9c7.7,8.4,17.3,13,28.9,13.9c106.2,10.2,197.1,53,272.5,128.4c75.4,75.4,118.2,166.2,128.4,272.5c0.9,11.6,5.6,21.2,13.9,28.9c8.4,7.7,18.3,11.5,29.9,11.5h94c13.5,0,24.4-4.9,32.7-14.6c8.8-9.3,12.8-20.4,11.8-33.4c-6-74.2-24.7-145.2-56-212.9C546.2,661.2,504.1,601.1,451.2,548.7z"/><path d="M906.4,594.3c-49.6-111.1-117.8-209.8-204.6-296.1c-86.3-86.8-185-155-296.1-204.6C294.5,43.9,178.2,16.1,56.6,10h-2.1c-12.1,0-22.3,4.2-30.6,12.5c-9.3,8.3-13.9,19-13.9,32v99.5c0,11.6,4.1,21.7,12.2,30.3c8.1,8.6,18,13.1,29.6,13.6c99.8,6,194.5,29.7,284.3,71c89.8,41.3,167.7,95,233.8,161.1C636,496.2,689.7,574.1,731,663.9c41.3,89.8,64.7,184.5,70.3,284.3c0.5,11.6,5,21.5,13.6,29.6c8.6,8.1,18.9,12.2,31,12.2h99.5c13,0,23.6-4.6,32-13.9c9.3-9.3,13.4-20.2,12.5-32.7C983.9,821.8,956,705.4,906.4,594.3z"/></g>
|
||||||
@@ -136,7 +137,7 @@ $("#exemple, body").vegas({
|
|||||||
|
|
||||||
|
|
||||||
<div class="indexForm">
|
<div class="indexForm">
|
||||||
<form name="langSelect" action="index.php" method="get" >
|
<form name="langSelect" action="index.php" method="post" >
|
||||||
<select name="lang" id="lang" class="mySelect">
|
<select name="lang" id="lang" class="mySelect">
|
||||||
<option value="">Language</option>
|
<option value="">Language</option>
|
||||||
<option value="de_DE">German</option>
|
<option value="de_DE">German</option>
|
||||||
@@ -150,8 +151,7 @@ $("#exemple, body").vegas({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="vegas-info">
|
<div class="vegas-info">
|
||||||
<!-- close sesssion -->
|
<?php echo gettext('Powered by'); ?> <a href="https://wordpress.org">WordPress</a> - <a href="https://www.zenphoto.org">Zenphoto</a> - <a href="https://vegas.jaysalvat.com">Vegas Background Slideshow 2</a>. <a href="">License des photos</a>. © 2013-<?php echo date('Y'); ?> sur-le-sentier.fr
|
||||||
<!--a href="close.php">close</a--><?php echo gettext('Powered by'); ?> <a href="https://wordpress.org">WordPress</a> - <a href="https://www.zenphoto.org">Zenphoto</a> - <a href="https://vegas.jaysalvat.com">Vegas Background Slideshow 2</a>. <a href="">License des photos</a>. © 2013-<?php echo date('Y'); ?> sur-le-sentier.fr
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
23
localize.php
@@ -220,13 +220,34 @@ function localize($domain) {
|
|||||||
echo "langue: " . $langue . "<br>";
|
echo "langue: " . $langue . "<br>";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
putenv('LC_ALL=' . $langue);
|
putenv('LC_ALL=' . $langue); // $langue = fr_FR.utf8
|
||||||
$loc = setlocale(LC_ALL, $langue);
|
$loc = setlocale(LC_ALL, $langue);
|
||||||
|
|
||||||
|
bindtextdomain($domain, $root . '/Locale/nocache'); // by-pass gettext() cache. Now the cache is forced to flush every time.
|
||||||
bindtextdomain($domain, $root . '/Locale/');
|
bindtextdomain($domain, $root . '/Locale/');
|
||||||
bind_textdomain_codeset($domain, 'UTF-8');
|
bind_textdomain_codeset($domain, 'UTF-8');
|
||||||
textdomain($domain);
|
textdomain($domain);
|
||||||
|
|
||||||
$nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
|
$nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function motranslator($domain) {
|
||||||
|
require('vendor/autoload.php');
|
||||||
|
|
||||||
|
// Create loader object
|
||||||
|
$loader = new PhpMyAdmin\MoTranslator\Loader();
|
||||||
|
|
||||||
|
// Set locale
|
||||||
|
//$loader->setlocale('fr');
|
||||||
|
$loader->setlocale('fr_FR.utf8');
|
||||||
|
|
||||||
|
// Set default text domain
|
||||||
|
$loader->textdomain('sentier');
|
||||||
|
|
||||||
|
// Set path where to look for a domain
|
||||||
|
//$loader->bindtextdomain('sentier', __DIR__ . '/data/locale/');
|
||||||
|
$loader->bindtextdomain('sentier', __DIR__ . '/Locale/');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
106
maps.php
@@ -1,22 +1,39 @@
|
|||||||
<?php session_start();
|
<?php
|
||||||
include 'localize.php';
|
session_start();
|
||||||
$domain = 'sentier';
|
include 'i18n_setup.php';
|
||||||
localize($domain);
|
/*include 'localize.php';
|
||||||
include 'functions.php';
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
$chemin = 'photos/img/';
|
||||||
|
$chemin_thumb = str_replace("img", "thumb", $chemin);
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="Sur le sentier: la photos du mois">
|
||||||
<title><?php echo gettext("Maps"); ?></title>
|
<title><?php echo gettext("Maps"); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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/lc_lightbox.min.css'>
|
||||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.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/skins/minimal.css'>
|
||||||
<style>
|
<style>
|
||||||
#map{
|
#map{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -41,7 +58,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
$conn4 = new PDO("sqlite:$base");
|
||||||
$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 WHERE lat != '' ORDER BY dateoriginal DESC";
|
$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 WHERE lat != '' ORDER BY dateoriginal DESC";
|
||||||
|
|
||||||
$stmt = $conn4->prepare($query4);
|
$stmt = $conn4->prepare($query4);
|
||||||
@@ -106,7 +123,8 @@
|
|||||||
|
|
||||||
$lb = data_for_lightbox($result[$i]);
|
$lb = data_for_lightbox($result[$i]);
|
||||||
|
|
||||||
$b .= '[\'<div class="info_content"><h3>' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '</h3><div class="gm_thumb"><a href="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title'], ENT_QUOTES) . '" data-lcl-txt="' . htmlspecialchars($lb['title'], ENT_QUOTES) . '" data-lcl-author="' . htmlspecialchars($lb['exif'], ENT_QUOTES) . '"><img src="' . $lb['thumb'] . '" /></a></div><p>' . htmlspecialchars($lb['title'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '</p></div>\'],' . "\r\n";
|
//$b .= '[\'<div class="info_content"><h3>' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '</h3><div class="gm_thumb"><a href="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title'], ENT_QUOTES) . '" data-lcl-txt="' . htmlspecialchars($lb['title'], ENT_QUOTES) . '" data-lcl-author="' . htmlspecialchars($lb['exif'], ENT_QUOTES) . '"><img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '"></a></div><p>' . htmlspecialchars($lb['title'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '</p></div>\'],' . "\r\n";
|
||||||
|
$b .= '[\'<div class="info_content"><h3>' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '</h3><div class="gm_thumb"><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></div><p>' . htmlspecialchars($lb['title'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '</p><p>' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '</p></div>\'],' . "\r\n";
|
||||||
}
|
}
|
||||||
$b = substr_replace($b, '', -3, 1);
|
$b = substr_replace($b, '', -3, 1);
|
||||||
echo $b;
|
echo $b;
|
||||||
@@ -157,27 +175,55 @@
|
|||||||
<div id="mapCanvas"></div>
|
<div id="mapCanvas"></div>
|
||||||
|
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var $obj = lc_lightbox('.gm_thumb a', {
|
var $obj = lc_lightbox('.gm_thumb a', {
|
||||||
img_zoom : true,
|
|
||||||
open_close_time : 200,
|
img_zoom : true, // whether to enable zooming system
|
||||||
ol_time_diff : 100,
|
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||||
wrap_class : 'lcl_zoomin_oc',
|
|
||||||
|
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
|
skin : 'minimal', // minimal | light | dark
|
||||||
data_position : 'over',
|
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',
|
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
||||||
txt_hidden : false,
|
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||||
//shox_title : true, // s'il faut afficher les titres
|
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||||
show_descr : false, // s'il faut afficher les descriptions
|
|
||||||
//show_author : true, // s'il faut afficher les auteurs
|
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||||
fullscreen : true,
|
shox_title : true, // s'il faut afficher les titres
|
||||||
fs_img_behavior : 'smart',
|
show_descr : true, // s'il faut afficher les descriptions
|
||||||
fs_only : 500,
|
show_author : true, // s'il faut afficher les auteurs
|
||||||
browser_fs_mode : true,
|
|
||||||
txt_toggle_cmd : true,
|
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
||||||
rclick_prevent : true,
|
|
||||||
|
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
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -187,8 +233,8 @@
|
|||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></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/js/lc_lightbox.min.js'></script>
|
||||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,45 @@
|
|||||||
<?php session_start(); ?>
|
<?php
|
||||||
|
session_start();
|
||||||
|
include 'i18n_setup.php';
|
||||||
|
/*include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
*/
|
||||||
|
include 'functions.php';
|
||||||
|
/*
|
||||||
|
_pr($_REQUEST); //
|
||||||
|
_pr($_SESSION); // [language] => de_DE
|
||||||
|
_pr($_POST); //
|
||||||
|
_pr($_GET); //
|
||||||
|
_pr($_COOKIE);
|
||||||
|
|
||||||
|
$locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); // fr_FR
|
||||||
|
echo $locale;
|
||||||
|
*/
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php //echo gettext("Picture of the month"); ?></title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="Sur le sentier: la photos du mois">
|
||||||
|
<title><?php echo gettext("Picture of the month"); ?></title>
|
||||||
|
<meta name="msapplication-TileColor" content="#2b5797">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<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/lc_lightbox.min.css">
|
||||||
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.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/skins/minimal.css">
|
||||||
|
|
||||||
<?php
|
|
||||||
include 'localize.php';
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
include 'functions.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -34,13 +55,14 @@ else $page = intval($_GET['page']);
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
//$base = $_SERVER['DOCUMENT_ROOT'] . '/db_photo.sqlite3';
|
$chemin = 'photos/img/';
|
||||||
|
$chemin_thumb = str_replace("img", "thumb", $chemin);
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $base)) {
|
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $base)) {
|
||||||
try {
|
try {
|
||||||
//$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
$conn4 = new PDO("sqlite:$base");
|
||||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
|
||||||
// WHERE id='26'
|
// 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 ?";
|
$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
|
//nb d'archive par page
|
||||||
@@ -67,6 +89,11 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
<p class="month"><?php echo month($result[0]['dateoriginal']); ?></p>
|
<p class="month"><?php echo month($result[0]['dateoriginal']); ?></p>
|
||||||
|
|
||||||
<?php
|
<?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]);
|
$lb = data_for_lightbox($result[0]);
|
||||||
|
|
||||||
//_pr($lb);
|
//_pr($lb);
|
||||||
@@ -84,8 +111,10 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
echo '<div class="cadre" id="lcl_month">';
|
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 '<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 '<img src="' . $lb['big'] . '" alt="' . htmlspecialchars($lb['title']) . '" class="trois">';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
@@ -146,9 +175,13 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
//_pr($result[$i]);
|
//_pr($result[$i]);
|
||||||
//debug_to_console($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]);
|
$lb = data_for_lightbox($result[$i]);
|
||||||
|
|
||||||
//
|
//_pr($lb);
|
||||||
|
|
||||||
if (!empty($lb['gps'])) {
|
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>';
|
$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>';
|
||||||
|
|
||||||
@@ -157,17 +190,33 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
$meta = '';
|
$meta = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// data-lcl-author="' . htmlspecialchars($lb['exif']) . '"
|
|
||||||
//
|
|
||||||
|
|
||||||
echo '<div class="item">';
|
echo '<div class="item">';
|
||||||
//echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($meta) . '">';
|
|
||||||
//echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['exif']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
|
||||||
// '" by="par' .
|
|
||||||
|
|
||||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||||
|
/*
|
||||||
|
if ($lb['width'] > $lb['height']) {
|
||||||
|
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$f = $chemin . $result[$i]['filename'];
|
||||||
|
$image = new Imagick($f);
|
||||||
|
|
||||||
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '" />';
|
$new_w = 300;
|
||||||
|
$new_h = 200;
|
||||||
|
|
||||||
|
$resize_w = $new_w;
|
||||||
|
$resize_h = $lb['height'] * $new_w / $lb['width']; // 450
|
||||||
|
|
||||||
|
$image->resizeImage($resize_w, $resize_h, Imagick::FILTER_LANCZOS, 0.9); // 300 x 300
|
||||||
|
$image->cropImage($new_w, $new_h, ($resize_w - $new_w) / 2, ($resize_h - $new_h) / 2); // (w, h, x ,y) (xy coin haut gauche) (300, 200, 0, 125)
|
||||||
|
|
||||||
|
$thu = $chemin_thumb ."_" . $result[$i]['filename'];;
|
||||||
|
$image->writeImage($thu);
|
||||||
|
|
||||||
|
echo '<img src="' . $thu . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo '<span class="caption">' . month($date) . '</span>';
|
echo '<span class="caption">' . month($date) . '</span>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@@ -194,7 +243,7 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var $obj = lc_lightbox('#lcl_gallery a', {
|
var $obj = lc_lightbox('#lcl_gallery a', {
|
||||||
img_zoom : true, // whether to enable zooming system
|
img_zoom : true, // whether to enable zooming system
|
||||||
@@ -322,8 +371,8 @@ echo '</div>';
|
|||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></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/js/lc_lightbox.min.js'></script>
|
||||||
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 433 KiB After Width: | Height: | Size: 894 KiB |
BIN
photos/img/12_2024.jpg
Normal file
|
After Width: | Height: | Size: 943 KiB |
BIN
photos/img/1_2025.jpg
Normal file
|
After Width: | Height: | Size: 592 KiB |
|
Before Width: | Height: | Size: 894 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB |