diff --git a/Locale/fr_FR/LC_MESSAGES/nocache b/Locale/fr_FR/LC_MESSAGES/nocache new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/Locale/fr_FR/LC_MESSAGES/nocache @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/Locale/fr_FR/LC_MESSAGES/sentier.mo b/Locale/fr_FR/LC_MESSAGES/sentier.mo index 5440817..557735c 100644 Binary files a/Locale/fr_FR/LC_MESSAGES/sentier.mo and b/Locale/fr_FR/LC_MESSAGES/sentier.mo differ diff --git a/Locale/fr_FR/LC_MESSAGES/sentier.po b/Locale/fr_FR/LC_MESSAGES/sentier.po index 3058c84..975ff87 100644 --- a/Locale/fr_FR/LC_MESSAGES/sentier.po +++ b/Locale/fr_FR/LC_MESSAGES/sentier.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: sur-le-sentier.fr\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-10 10:29+0100\n" -"PO-Revision-Date: 2024-12-10 10:29+0100\n" +"POT-Creation-Date: 2024-12-11 17:32+0100\n" +"PO-Revision-Date: 2024-12-11 17:32+0100\n" "Last-Translator: Bruno \n" "Language-Team: French \n" "Language: fr\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.5\n" -"X-Poedit-KeywordsList: gettext;_\n" +"X-Poedit-KeywordsList: gettext;_;__\n" "X-Poedit-Basepath: ../../..\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: .\n" @@ -47,29 +47,29 @@ msgid "Sign In" msgstr "Se connecter" #: 1-login.php:33 admin.php:69 avif/avif.php:167 clean_bdd.php:721 -#: edit_bdd.php:141 insert_bdd.php:527 insert_bdd.php:710 maps.php:186 -#: modify_bdd.php:240 photo-du-mois.php:321 requests.php:230 view_bdd.php:231 -#: view_bdd2.php:429 +#: delete_bdd.php:215 edit_bdd.php:135 insert_bdd.php:527 insert_bdd.php:710 +#: maps.php:186 modify_bdd.php:240 photo-du-mois.php:321 requests.php:230 +#: view_bdd.php:231 view_bdd2.php:430 msgid "Home" msgstr "Accueil" #: 1-login.php:33 admin.php:69 avif/avif.php:14 avif/avif.php:27 -#: clean_bdd.php:721 edit_bdd.php:141 insert_bdd.php:527 insert_bdd.php:710 -#: maps.php:186 modify_bdd.php:240 photo-du-mois.php:29 requests.php:230 -#: view_bdd.php:231 view_bdd2.php:429 +#: clean_bdd.php:721 delete_bdd.php:215 edit_bdd.php:135 insert_bdd.php:527 +#: insert_bdd.php:710 maps.php:186 modify_bdd.php:240 photo-du-mois.php:29 +#: requests.php:230 view_bdd.php:231 view_bdd2.php:430 msgid "Picture of the month" msgstr "Photo du mois" #: 1-login.php:33 admin.php:69 avif/avif.php:167 clean_bdd.php:721 -#: edit_bdd.php:141 insert_bdd.php:527 insert_bdd.php:710 maps.php:14 -#: maps.php:39 modify_bdd.php:240 photo-du-mois.php:321 requests.php:230 -#: view_bdd.php:231 view_bdd2.php:429 +#: delete_bdd.php:215 edit_bdd.php:135 insert_bdd.php:527 insert_bdd.php:710 +#: maps.php:14 maps.php:39 modify_bdd.php:240 photo-du-mois.php:321 +#: requests.php:230 view_bdd.php:231 view_bdd2.php:430 msgid "Maps" msgstr "Carte" -#: 1-login.php:33 admin.php:69 clean_bdd.php:721 edit_bdd.php:141 -#: insert_bdd.php:710 modify_bdd.php:240 requests.php:230 view_bdd.php:231 -#: view_bdd2.php:429 +#: 1-login.php:33 admin.php:69 clean_bdd.php:721 delete_bdd.php:215 +#: edit_bdd.php:135 insert_bdd.php:710 modify_bdd.php:240 requests.php:230 +#: view_bdd.php:231 view_bdd2.php:430 msgid "Admin page" msgstr "Page administrateur" @@ -89,32 +89,32 @@ msgstr "Page: " #: ⁨_test/photo-du-mois _2.php⁩:328 _test/photo-du-mois-lc-lite.php:253 #: _test/photo-du-mois-ng.php:196 _test/photo-du-mois-ps.php:241 -#: ovh/ce-mois.php:665 photo-du-mois.php:308 view_bdd2.php:413 +#: ovh/ce-mois.php:665 photo-du-mois.php:308 view_bdd2.php:414 msgid "Previous Page" msgstr "Page précédente" #: ⁨_test/photo-du-mois _2.php⁩:328 _test/photo-du-mois-lc-lite.php:253 #: _test/photo-du-mois-ng.php:196 _test/photo-du-mois-ps.php:241 -#: ovh/ce-mois.php:665 photo-du-mois.php:308 view_bdd2.php:413 +#: ovh/ce-mois.php:665 photo-du-mois.php:308 view_bdd2.php:414 msgid "prev" msgstr "prec" #: ⁨_test/photo-du-mois _2.php⁩:331 _test/photo-du-mois-lc-lite.php:256 #: _test/photo-du-mois-ng.php:199 _test/photo-du-mois-ps.php:244 #: ovh/ce-mois.php:668 photo-du-mois.php:307 photo-du-mois.php:311 -#: view_bdd2.php:412 view_bdd2.php:416 +#: view_bdd2.php:413 view_bdd2.php:417 msgid "Page" msgstr "Page" #: ⁨_test/photo-du-mois _2.php⁩:337 _test/photo-du-mois-lc-lite.php:262 #: _test/photo-du-mois-ng.php:205 _test/photo-du-mois-ps.php:250 -#: ovh/ce-mois.php:674 photo-du-mois.php:317 view_bdd2.php:422 +#: ovh/ce-mois.php:674 photo-du-mois.php:317 view_bdd2.php:423 msgid "Next Page" msgstr "Page suivante" #: ⁨_test/photo-du-mois _2.php⁩:337 _test/photo-du-mois-lc-lite.php:262 #: _test/photo-du-mois-ng.php:205 _test/photo-du-mois-ps.php:250 -#: ovh/ce-mois.php:674 photo-du-mois.php:317 view_bdd2.php:422 +#: ovh/ce-mois.php:674 photo-du-mois.php:317 view_bdd2.php:423 msgid "next" msgstr "suiv" @@ -130,8 +130,8 @@ msgstr "Etat: " msgid " logged in" msgstr " connecté" -#: avif/picture.php:18 edit_bdd.php:55 modify_bdd.php:157 requests.php:14 -#: view_bdd.php:52 view_bdd2.php:98 +#: avif/picture.php:18 delete_bdd.php:118 edit_bdd.php:49 modify_bdd.php:157 +#: requests.php:14 view_bdd.php:52 view_bdd2.php:98 msgid "View photos in Sqlite base" msgstr "Voir les photos dans la base Sqlite" @@ -277,8 +277,8 @@ msgstr "Lumière tungstène" msgid "Fluorescent" msgstr "Lumière fluo blanche" -#: clean_bdd.php:399 clean_bdd.php:692 edit_bdd.php:94 functions.php:459 -#: insert_bdd.php:322 modify_bdd.php:196 view_bdd2.php:302 +#: clean_bdd.php:399 clean_bdd.php:692 delete_bdd.php:155 edit_bdd.php:88 +#: functions.php:459 insert_bdd.php:322 modify_bdd.php:196 view_bdd2.php:303 msgid "Flash" msgstr "Utilisation du flash" @@ -302,8 +302,8 @@ msgstr "Température de couleur (Kelvin)" msgid "Manual" msgstr "Exposition manuelle" -#: clean_bdd.php:423 clean_bdd.php:693 edit_bdd.php:92 functions.php:455 -#: insert_bdd.php:285 modify_bdd.php:194 view_bdd2.php:302 +#: clean_bdd.php:423 clean_bdd.php:693 delete_bdd.php:153 edit_bdd.php:86 +#: functions.php:455 insert_bdd.php:285 modify_bdd.php:194 view_bdd2.php:303 msgid "Program" msgstr "Programme" @@ -335,13 +335,13 @@ msgstr "Paysage" msgid "Reading added photos" msgstr "Lecture des photos ajoutées" -#: clean_bdd.php:692 edit_bdd.php:91 modify_bdd.php:193 view_bdd.php:148 -#: view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 modify_bdd.php:193 +#: view_bdd.php:148 view_bdd2.php:301 msgid "Thumb" msgstr "Vignette" -#: clean_bdd.php:692 edit_bdd.php:91 modify_bdd.php:193 view_bdd.php:149 -#: view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 modify_bdd.php:193 +#: view_bdd.php:149 view_bdd2.php:301 msgid "Filename" msgstr "Fichier" @@ -349,23 +349,23 @@ msgstr "Fichier" msgid "File size" msgstr "Taille fichier" -#: clean_bdd.php:692 edit_bdd.php:91 functions.php:446 modify_bdd.php:193 -#: view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 functions.php:446 +#: modify_bdd.php:193 view_bdd2.php:301 msgid "Date" msgstr "Date" -#: clean_bdd.php:692 edit_bdd.php:92 functions.php:451 modify_bdd.php:194 -#: view_bdd.php:156 view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:153 edit_bdd.php:86 functions.php:451 +#: modify_bdd.php:194 view_bdd.php:156 view_bdd2.php:301 msgid "Lens" msgstr "Objectif" -#: clean_bdd.php:692 edit_bdd.php:91 functions.php:447 modify_bdd.php:193 -#: view_bdd.php:151 view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 functions.php:447 +#: modify_bdd.php:193 view_bdd.php:151 view_bdd2.php:301 msgid "Speed" msgstr "Vitesse" -#: clean_bdd.php:692 edit_bdd.php:91 functions.php:448 modify_bdd.php:193 -#: view_bdd.php:153 view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 functions.php:448 +#: modify_bdd.php:193 view_bdd.php:153 view_bdd2.php:301 msgid "Aperture" msgstr "Ouverture" @@ -373,23 +373,23 @@ msgstr "Ouverture" msgid "Exposure Corr." msgstr "Correction d’expo." -#: clean_bdd.php:692 edit_bdd.php:91 functions.php:449 modify_bdd.php:193 -#: view_bdd2.php:300 +#: clean_bdd.php:692 delete_bdd.php:152 edit_bdd.php:85 functions.php:449 +#: modify_bdd.php:193 view_bdd2.php:301 msgid "Iso" msgstr "ISO" -#: clean_bdd.php:692 edit_bdd.php:92 functions.php:450 modify_bdd.php:194 -#: view_bdd.php:155 view_bdd2.php:301 +#: clean_bdd.php:692 delete_bdd.php:153 edit_bdd.php:86 functions.php:450 +#: modify_bdd.php:194 view_bdd.php:155 view_bdd2.php:302 msgid "Model" msgstr "APN" -#: clean_bdd.php:692 edit_bdd.php:92 functions.php:454 modify_bdd.php:194 -#: view_bdd.php:158 view_bdd2.php:302 +#: clean_bdd.php:692 delete_bdd.php:153 edit_bdd.php:86 functions.php:454 +#: modify_bdd.php:194 view_bdd.php:158 view_bdd2.php:303 msgid "Metering" msgstr "Mesure" -#: clean_bdd.php:693 edit_bdd.php:92 functions.php:452 modify_bdd.php:194 -#: view_bdd.php:157 view_bdd2.php:302 +#: clean_bdd.php:693 delete_bdd.php:153 edit_bdd.php:86 functions.php:452 +#: modify_bdd.php:194 view_bdd.php:157 view_bdd2.php:303 msgid "Focal" msgstr "Focale" @@ -401,41 +401,45 @@ msgstr "Balance des blancs" msgid "Mode" msgstr "Mode" -#: clean_bdd.php:693 edit_bdd.php:94 functions.php:461 modify_bdd.php:196 -#: view_bdd.php:161 +#: clean_bdd.php:693 delete_bdd.php:155 edit_bdd.php:88 functions.php:461 +#: modify_bdd.php:196 view_bdd.php:161 msgid "Software" msgstr "Logiciel" -#: clean_bdd.php:693 view_bdd2.php:301 +#: clean_bdd.php:693 view_bdd2.php:302 msgid "Latitude" msgstr "Latitude" -#: clean_bdd.php:693 view_bdd2.php:301 +#: clean_bdd.php:693 view_bdd2.php:302 msgid "Longitude" msgstr "Longitude" -#: clean_bdd.php:693 view_bdd2.php:301 +#: clean_bdd.php:693 view_bdd2.php:302 msgid "Alttitude" msgstr "Alttitude" -#: clean_bdd.php:693 edit_bdd.php:94 functions.php:462 modify_bdd.php:196 -#: view_bdd2.php:302 +#: clean_bdd.php:693 delete_bdd.php:155 edit_bdd.php:88 functions.php:462 +#: modify_bdd.php:196 view_bdd2.php:303 msgid "Keywords" msgstr "Mots-clés" -#: clean_bdd.php:693 edit_bdd.php:94 modify_bdd.php:196 view_bdd2.php:301 +#: clean_bdd.php:693 delete_bdd.php:155 edit_bdd.php:88 modify_bdd.php:196 +#: view_bdd2.php:302 msgid "Title" msgstr "Titre" -#: clean_bdd.php:693 edit_bdd.php:94 modify_bdd.php:196 view_bdd2.php:302 +#: clean_bdd.php:693 delete_bdd.php:155 edit_bdd.php:88 modify_bdd.php:196 +#: view_bdd2.php:303 msgid "Creator" msgstr "Créateur" -#: clean_bdd.php:694 edit_bdd.php:94 functions.php:465 modify_bdd.php:196 +#: clean_bdd.php:694 delete_bdd.php:155 edit_bdd.php:88 functions.php:465 +#: modify_bdd.php:196 msgid "City" msgstr "Ville" -#: clean_bdd.php:694 edit_bdd.php:94 functions.php:466 modify_bdd.php:196 +#: clean_bdd.php:694 delete_bdd.php:155 edit_bdd.php:88 functions.php:466 +#: modify_bdd.php:196 msgid "Department" msgstr "Departement" @@ -443,48 +447,82 @@ msgstr "Departement" msgid "CP" msgstr "CP" -#: clean_bdd.php:694 edit_bdd.php:94 functions.php:468 modify_bdd.php:196 +#: clean_bdd.php:694 delete_bdd.php:155 edit_bdd.php:88 functions.php:468 +#: modify_bdd.php:196 msgid "Country" msgstr "Etat" -#: clean_bdd.php:694 edit_bdd.php:94 functions.php:463 modify_bdd.php:196 -#: view_bdd2.php:301 +#: clean_bdd.php:694 delete_bdd.php:155 edit_bdd.php:88 functions.php:463 +#: modify_bdd.php:196 view_bdd2.php:302 msgid "Copyright" msgstr "Copyright" -#: clean_bdd.php:694 edit_bdd.php:94 modify_bdd.php:196 view_bdd2.php:301 +#: clean_bdd.php:694 delete_bdd.php:155 edit_bdd.php:88 modify_bdd.php:196 +#: view_bdd2.php:302 msgid "Legende" msgstr "Légende" -#: edit_bdd.php:27 edit_bdd.php:32 +#: delete_bdd.php:40 delete_bdd.php:94 delete_bdd.php:101 edit_bdd.php:27 +#: edit_bdd.php:32 msgid "No images select !" msgstr "Aucune image sélectionnée !" -#: edit_bdd.php:37 +#: delete_bdd.php:69 +#, php-format +msgid "File %s doesn't exist !" +msgstr "Fichier: %s supprimé !" + +#: delete_bdd.php:86 +#, php-format +msgid "File: %s deleted!" +msgstr "Fichier: %s supprimé!" + +#: delete_bdd.php:106 edit_bdd.php:37 msgid "Please log in !" msgstr "Veuillez-vous connecter !" -#: edit_bdd.php:76 -msgid "Edit database" -msgstr "Editer la base" +#: delete_bdd.php:137 +msgid "Suppress images " +msgstr "Supprimer images " -#: edit_bdd.php:91 modify_bdd.php:193 view_bdd2.php:300 +#: delete_bdd.php:152 edit_bdd.php:85 modify_bdd.php:193 view_bdd2.php:301 msgid "Id" msgstr "Id" -#: edit_bdd.php:91 modify_bdd.php:193 +#: delete_bdd.php:152 edit_bdd.php:85 modify_bdd.php:193 msgid "Expo. correct" msgstr "Correction d’expo." -#: edit_bdd.php:92 modify_bdd.php:194 view_bdd2.php:302 +#: delete_bdd.php:153 edit_bdd.php:86 modify_bdd.php:194 view_bdd2.php:303 msgid "Wb" msgstr "BdB" -#: edit_bdd.php:94 modify_bdd.php:196 +#: delete_bdd.php:155 edit_bdd.php:88 modify_bdd.php:196 msgid "Code" msgstr "Code" -#: edit_bdd.php:130 +#: delete_bdd.php:188 +msgid "" +"Clic on Delete button will delete the images in the database and the " +"files on the server." +msgstr "" +"Cliquer sur le bouton Effacer effacera les images dans la base et les " +"fichiers sur le serveur." + +#: delete_bdd.php:189 +msgid "Delete" +msgstr "Supprimer" + +#: delete_bdd.php:204 +#, php-format +msgid "%d rows deleted and the following files:" +msgstr "%d lignes supprimées avec la requête suivante:" + +#: edit_bdd.php:70 +msgid "Edit database" +msgstr "Editer la base" + +#: edit_bdd.php:124 msgid "Update" msgstr "Mise-à-jour" @@ -504,39 +542,39 @@ msgstr "Commentaire" msgid "User comment" msgstr "Commentaire utilis." -#: index.php:125 ovh/ce-mois.php:348 vegas/index.php:102 +#: index.php:126 ovh/ce-mois.php:348 vegas/index.php:102 msgid "Blog" msgstr "Blog" -#: index.php:125 vegas/index.php:102 +#: index.php:126 vegas/index.php:102 msgid "Go to the blog..." msgstr "Aller sur le blog..." -#: index.php:127 ovh/ce-mois.php:349 vegas/index.php:104 +#: index.php:128 ovh/ce-mois.php:349 vegas/index.php:104 msgid "Gallery" msgstr "Portfolio" -#: index.php:127 vegas/index.php:104 +#: index.php:128 vegas/index.php:104 msgid "Visit the gallery..." msgstr "Visiter la galerie..." -#: index.php:129 +#: index.php:130 msgid "Piwigo" msgstr "Piwigo" -#: index.php:129 +#: index.php:130 msgid "Visit the Piwigo gallery..." msgstr "Visiter la galerie Piwigo…" -#: index.php:131 vegas/index.php:106 +#: index.php:132 vegas/index.php:106 msgid "This month" msgstr "Ce mois-çi" -#: index.php:131 +#: index.php:132 msgid "Picture of the month ..." msgstr "Photo du mois …" -#: index.php:153 vegas/index.php:113 +#: index.php:154 vegas/index.php:113 msgid "Powered by" msgstr "Propulsé par" @@ -620,19 +658,19 @@ msgstr "Insertion de " msgid " in database" msgstr " dans la base" -#: localize.php:230 vegas/index.php:34 +#: localize.php:231 vegas/index.php:34 msgid "French" msgstr "Français" -#: localize.php:230 vegas/index.php:34 +#: localize.php:231 vegas/index.php:34 msgid "English" msgstr "Anglais" -#: localize.php:230 vegas/index.php:34 +#: localize.php:231 vegas/index.php:34 msgid "German" msgstr "Allemand" -#: localize.php:230 vegas/index.php:34 +#: localize.php:231 vegas/index.php:34 msgid "Spanish" msgstr "Espagnol" @@ -744,7 +782,7 @@ msgstr "Choix du language" msgid "Photo's licence" msgstr "License des photos" -#: photo-du-mois.php:202 view_bdd.php:182 view_bdd2.php:339 +#: photo-du-mois.php:202 view_bdd.php:182 view_bdd2.php:340 msgid "by" msgstr "par" @@ -776,19 +814,19 @@ msgstr "vitesse" msgid "Latest images..." msgstr "Dernières images..." -#: view_bdd.php:36 view_bdd2.php:41 +#: view_bdd.php:36 msgid " photos successfully deleted !" msgstr " photos effacées !" -#: view_bdd.php:40 view_bdd2.php:45 +#: view_bdd.php:40 msgid "Empty request !" msgstr "Requête nulle !" -#: view_bdd.php:116 view_bdd.php:169 view_bdd2.php:295 view_bdd2.php:320 +#: view_bdd.php:116 view_bdd.php:169 view_bdd2.php:295 view_bdd2.php:321 msgid "Edit" msgstr "Editer" -#: view_bdd.php:117 view_bdd.php:170 view_bdd2.php:296 view_bdd2.php:321 +#: view_bdd.php:117 view_bdd.php:170 view_bdd2.php:297 view_bdd2.php:322 msgid "Suppress" msgstr "Supprimer" @@ -807,7 +845,7 @@ msgstr "Date prise de vue" msgid "ISO" msgstr "ISO" -#: view_bdd.php:154 view_bdd2.php:300 +#: view_bdd.php:154 view_bdd2.php:301 msgid "Exposure corr." msgstr "Correction d’expo." @@ -819,7 +857,7 @@ msgstr "Programme" msgid "WB" msgstr "Balance des blancs" -#: view_bdd.php:229 view_bdd2.php:427 +#: view_bdd.php:229 view_bdd2.php:428 msgid "Log out" msgstr "Déconnexion" @@ -851,26 +889,33 @@ msgstr "an" msgid "OK" msgstr "Ok" -#: view_bdd2.php:300 +#: view_bdd2.php:301 msgid "Select" msgstr "Sélectionner" -#: view_bdd2.php:300 +#: view_bdd2.php:301 msgid "Size" msgstr "Taille" -#: view_bdd2.php:300 +#: view_bdd2.php:301 msgid "Width" msgstr "Largeur" -#: view_bdd2.php:300 +#: view_bdd2.php:301 msgid "Height" msgstr "Hauteur" -#: view_bdd2.php:316 +#: view_bdd2.php:317 msgid "No image found !" msgstr "Aucune image trouvée !" +#~ msgid " rows deleted with following request:" +#~ msgstr " lignes supprimées avec la requête suivante:" + +#, php-format +#~ msgid "Rates %s in €/ week:" +#~ msgstr "Taux %s en €/semaine:" + #~ msgid "Request null" #~ msgstr "Requête nulle" diff --git a/Locale/nocache b/Locale/nocache new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/Locale/nocache @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/css/sls.css b/css/sls.css index ccc15bb..7873dca 100644 --- a/css/sls.css +++ b/css/sls.css @@ -511,6 +511,10 @@ h3.greenstyle { .font10 { font-size: 10px; } +.alert { + color: red; + text-align: left; +} input[type="text"], textarea { diff --git a/delete_bdd.php b/delete_bdd.php new file mode 100644 index 0000000..eb53e2e --- /dev/null +++ b/delete_bdd.php @@ -0,0 +1,221 @@ + 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']; + + 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!" . "
"; + $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"); + } + +?> + + + + + + + + <?php echo gettext('View photos in Sqlite base'); ?> + + + + + + + + + + + + + + + ' . gettext('Suppress images ') . ': ' . $base . '
'; + +if (($req_suppress != "") and ($req_delete == "")) { + + echo '

' . $msg . '

'; + + + try { + $conn3 = new PDO('sqlite:db_photo.sqlite3'); + $stmt3 = $conn3->prepare($req_suppress); + $stmt3->execute(); + + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + echo ''; + + while ($row = $stmt3->fetch(PDO::FETCH_ASSOC)) { + $thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']); + $full = host() . $row['filename']; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + //echo ''; + echo ""; + echo ''; + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + + echo ''; + } + + echo '
' . gettext('Id') . '' . gettext('Thumb') . '' . gettext('Filename') . '' . gettext('Date') . ' ' . gettext('Speed') . '' . gettext('Iso') . '' . gettext('Aperture') . '' . gettext('Expo. correct') . '' . gettext('Model') . '' . gettext('Lens') . '' . gettext('Focal') . '' . gettext('Metering') . '' . gettext('Program') . '' . gettext('Wb') . '' . gettext('Flash') . '' . gettext('Software') . '' . gettext('Keywords') . '' . gettext('Title') . '' . gettext('Creator') . '' . gettext('City') . '' . gettext('Department') . '' . gettext('Code') . '' . gettext('Country') . '' . gettext('Copyright') . '' . gettext('Legende') . '
' . $row['id'] . '' . '' . '' . $row['filename'] . '' . $row['dateoriginal'] . '' . $row['speed'] . '' . $row['iso'] . '' . $row['aperture'] . '' . $row['correctexpo'] . '' . $row['model'] . '' . $row['focal'] . '' . $row['metering'] . '' . $row['program'] . '' . $row['wb'] . '' . $row['flash'] . '' . $row['software'] . '
'; + + echo '

' . gettext('Clic on Delete button will delete the images in the database and the files on the server.') . '

'; + echo ''; + echo '
'; + + //$conn = null; + } + catch(PDOException $e) { + echo $e->getMessage(); + } + + $req_suppress = ""; +} + +if ($req_delete != "") { + + //$msg = sprintf("Updated %d rows with following request:", $count); + $msg = sprintf(gettext("%d rows deleted and the following files:"), $count); + //$msg = $count . gettext(" rows deleted and the following files:"); + echo '

' . $msg . '

'; + echo '

' . nl2br($files_deleted) . '

'; + + //echo '
' . $req_delete . '
'; +} + ?> + + + +

© 2013- sur-le-sentier.fr

+ + + + + + + + diff --git a/localize.php b/localize.php index 07dac8c..a4e4257 100644 --- a/localize.php +++ b/localize.php @@ -223,6 +223,7 @@ function localize($domain) { putenv('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/'); bind_textdomain_codeset($domain, 'UTF-8'); textdomain($domain); diff --git a/photos/11_2024.jpg b/photos/11_2024.jpg new file mode 100644 index 0000000..7bc622a Binary files /dev/null and b/photos/11_2024.jpg differ diff --git a/photos/5_2005.jpg b/photos/5_2005.jpg new file mode 100644 index 0000000..21f9d1a Binary files /dev/null and b/photos/5_2005.jpg differ diff --git a/photos/6_2005.jpg b/photos/6_2005.jpg new file mode 100644 index 0000000..37b4daa Binary files /dev/null and b/photos/6_2005.jpg differ diff --git a/view_bdd.php b/view_bdd.php index 10cf529..785413f 100644 --- a/view_bdd.php +++ b/view_bdd.php @@ -11,6 +11,9 @@ if(!empty($_GET['message'])) { $msg = "

" . $_GET['message'] . "

"; } + +/* + // Suppression d'images if (isset($_SESSION["user"])) { if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) { @@ -41,7 +44,7 @@ } } } - // } +*/ ?> @@ -114,7 +117,8 @@ function showUser(column) { if (isset($_SESSION["user"])) { echo '
'; echo ''; - echo ''; + //echo ''; + echo ''; } ?> @@ -167,7 +171,8 @@ function showUser(column) { ' . gettext('Edit') . ''; - echo ''; + //echo ''; + echo ''; echo '
'; } ?> diff --git a/view_bdd2.php b/view_bdd2.php index 7a4dbb0..fabd498 100644 --- a/view_bdd2.php +++ b/view_bdd2.php @@ -1,5 +1,5 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); if (!isset($_GET['page'])) $page = 1; else $page = intval($_GET['page']); - +/* // Suppression d'images if (isset($_SESSION["user"])) { @@ -47,7 +47,7 @@ if (isset($_SESSION["user"])) { } } - +*/ $gps = (isset($_SESSION['query']['gps'])) ? $_SESSION['query']['gps'] : "off"; @@ -293,7 +293,8 @@ try { echo '
'; echo ''; - echo ''; + //echo ''; + echo ''; echo ''; echo ''; @@ -318,7 +319,8 @@ try { echo '
'; if (isset($_SESSION["user"])) { echo ''; - echo ''; + //echo ''; + echo ''; } echo '
'; echo '';