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) {