-
-
+
+
diff --git a/insert_bdd.php b/admin/insert_bdd.php
similarity index 90%
rename from insert_bdd.php
rename to admin/insert_bdd.php
index acccb3d..9b9e921 100644
--- a/insert_bdd.php
+++ b/admin/insert_bdd.php
@@ -1,12 +1,12 @@
@@ -17,10 +17,10 @@ include 'functions.php';
-
-
-
-
+
+
+
+
@@ -28,8 +28,11 @@ include 'functions.php';
+' . gettext("Log out") . '' : ''; ?>
+
' . gettext("Insert images in " . $base . " database.") . ' ';
@@ -42,16 +45,17 @@ if (file_exists($base)) {
$th_w = 300;
$th_h = 300;
-$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
+//$dir = (new AdvancedFilesystemIterator('../photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
+$dir = (new AdvancedFilesystemIterator($chemin))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
-echo '
' . count($dir) . gettext(' images found in folder') . ' photos/img/ ...
';
+echo '
' . count($dir) . gettext(' images found in folder') . ' photos/img/ ...
';
echo '
' . gettext("Creation of the database") . ' ' . $base . ' ' . gettext("and the table") . ' photo (' . gettext("if necessary") . ')...
';
try {
// Création de la base et de la table photos
- $conn = new PDO("sqlite:db_photo.sqlite3");
+ $conn = new PDO("sqlite:$base");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$query = "CREATE TABLE IF NOT EXISTS photos (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
@@ -98,7 +102,7 @@ try {
echo $e->getMessage();
}
-echo '
' . gettext('Read image files in the folder') . ' photos/img/...
';
+echo '
' . gettext('Read image files in the folder') . ' photos/img/...
-
-
+
+
diff --git a/query_bdd.php b/admin/query_bdd.php
similarity index 68%
rename from query_bdd.php
rename to admin/query_bdd.php
index e29628c..f327bef 100644
--- a/query_bdd.php
+++ b/admin/query_bdd.php
@@ -1,12 +1,15 @@
open('db_photo.sqlite3');
+ $this->open('../db_photo.sqlite3');
+ //$this->open($base);
}
}
$db = new MyDB();
+*/
+ $db = new SQLite3($base);
+
if(!$db){
echo $db->lastErrorMsg();
} else {
$ret = $db->query("SELECT * FROM photos WHERE id LIKE '$id%' AND filename LIKE '%$filename%' AND dateoriginal LIKE '%$dateoriginal%' AND speed LIKE '$speed%' AND iso LIKE '$iso%' AND aperture LIKE '$aperture%' AND correctexpo LIKE '$correctexpo%' AND model LIKE '%$model%' AND lens LIKE '%$lens%' AND focal LIKE '%$focal%' AND metering LIKE '%$metering%' AND program LIKE '%$program%' AND wb LIKE '%$wb%' AND software LIKE '%$software%' ORDER BY $column $order");
while($row = $ret->fetchArray(SQLITE3_ASSOC) ){
- $thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
- $full = host() . $row['filename'];
+ //$thumbnail = host() . str_replace("img", "thumb", $chemin) . $row['filename'];
+ //$full = host() . $chemin . $row['filename'];
$lb = data_for_lightbox($row);
echo "
";
echo (isset($_SESSION["user"])) ? '
' . '' . '
' : '';
echo "
".$row['id']."
";
- echo "
" . "
";
+ //echo "
" . "
";
+ echo "
" . "
";
echo "
".$row['filename']."
";
echo "
".$row['dateoriginal']."
";
echo "
".$row['speed']."
";
diff --git a/requests.php b/admin/requests.php
similarity index 85%
rename from requests.php
rename to admin/requests.php
index da4bf9e..e0b6c01 100644
--- a/requests.php
+++ b/admin/requests.php
@@ -1,12 +1,12 @@
@@ -17,10 +17,10 @@ include 'functions.php';
-
-
-
-
+
+
+
+
@@ -33,7 +33,7 @@ include 'functions.php';
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$limit = 13;
@@ -78,7 +78,7 @@ _pr($_POST);
echo 'requests';
-$conn = new PDO("sqlite:db_photo.sqlite3");
+$conn = new PDO("sqlite:$base");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$request = array(
@@ -231,12 +231,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
-