From e0e8a4cefe8859b8b71d2fcdea1b3963cda92ac1 Mon Sep 17 00:00:00 2001 From: PaulVua Date: Mon, 16 Mar 2026 09:19:02 +0100 Subject: [PATCH] =?UTF-8?q?Database:=20validation=20dates=20+=20bouton=20t?= =?UTF-8?q?=C3=A9l=C3=A9charger=20toute=20la=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Empêche le téléchargement par dates si début/fin non renseignées - Ajoute une carte "Télécharger toute la table" (bypass dates) Co-Authored-By: Claude Opus 4.6 --- html/database.html | 52 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/html/database.html b/html/database.html index 9f031d0..7b5924b 100755 --- a/html/database.html +++ b/html/database.html @@ -99,17 +99,37 @@ - - - - - - - + + + + + + + +
+
+
+
Télécharger toute la table
+

Télécharge l'intégralité des données sans filtre de date.

+ + + + + + + +
+
+
+ + + +
+
@@ -471,11 +491,25 @@ function getSelectedLimit() { } function getStartDate() { - return document.getElementById("start_date").value || "2025-01-01"; // Default to a safe date + return document.getElementById("start_date").value; } function getEndDate() { - return document.getElementById("end_date").value || "2025-12-31"; // Default to a safe date + return document.getElementById("end_date").value; +} + +function downloadByDate(table) { + const startDate = getStartDate(); + const endDate = getEndDate(); + if (!startDate || !endDate) { + alert("Veuillez sélectionner une date de début et une date de fin."); + return; + } + get_data_sqlite(table, 10, true, startDate, endDate); +} + +function downloadFullTable(table) { + window.location.href = 'launcher.php?type=download_full_table&table=' + encodeURIComponent(table); } function downloadCSV(response, table) {