diff --git a/download.php b/download.php new file mode 100644 index 0000000..4382466 --- /dev/null +++ b/download.php @@ -0,0 +1,48 @@ +isInit()) { + echo 'Error db init'; + return; +} + +if (!isset($_GET['id'])) { + echo json_encode(false); +} +$id = $_GET['id']; + +download_send_headers("data_export_" . date("Y-m-d") . ".csv"); +echo array2csv($db->getWordsList($id)); +die(); diff --git a/lang/lang_fr.ini b/lang/lang_fr.ini index 4604216..d29e24e 100644 --- a/lang/lang_fr.ini +++ b/lang/lang_fr.ini @@ -57,3 +57,4 @@ title = "Liste des mots du nuage" word = "Mot" count = "Nombre" percent = "%" +download = "Télécharger la liste" diff --git a/result.php b/result.php index ce251f4..7041031 100644 --- a/result.php +++ b/result.php @@ -51,6 +51,7 @@ if (isset($id)) { +