From e0103168099eae579c4da01b884792e164a63743 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Sat, 15 Oct 2022 17:18:01 +0200 Subject: [PATCH] ICS --- README.md | 10 ---------- assets/scripts/php2ics.php | 5 +---- assets/scripts/planning_tmp.php | 17 ----------------- 3 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 assets/scripts/planning_tmp.php diff --git a/README.md b/README.md index 98f4ceb..d7d1c5f 100644 --- a/README.md +++ b/README.md @@ -97,16 +97,6 @@ il n'y a globalement pas grand chose à comprendre à part qu'ici la taille (len Tout est modifiable via le panel admin (voir la section "admin" plus bas dans ce readme). -### planning_tmp_dl - -| Nom | Type | AUTO_INCREMENT | NULL | -| :----------- |:------------:|:---------------:|:-----:| -| planning | text | | | - -permet d'enregistrer l'ics pour le téléchargement voir la section "planning" à propos du script php2ics. - -Par défaut il faut avoir une seule ligne vide, le script se chargera de la modifier à chaque fois. - ### scores | Nom | Type | AUTO_INCREMENT | NULL | diff --git a/assets/scripts/php2ics.php b/assets/scripts/php2ics.php index fba23a1..05508b6 100644 --- a/assets/scripts/php2ics.php +++ b/assets/scripts/php2ics.php @@ -143,10 +143,7 @@ if(isset($_POST['download_planning'])) { $cal->End(); - $req = $db->prepare('UPDATE planning_tmp_dl set planning = ?'); - $req->execute(array($cal->GetICS())); - - header('Location: assets/script/planning_tmp.php'); + $cal->DownloadICS("planning_SA_INSA"); } ?> \ No newline at end of file diff --git a/assets/scripts/planning_tmp.php b/assets/scripts/planning_tmp.php deleted file mode 100644 index f44a5a7..0000000 --- a/assets/scripts/planning_tmp.php +++ /dev/null @@ -1,17 +0,0 @@ -query('SELECT planning FROM planning_tmp_dl'); -$r = $req -> fetchAll(PDO::FETCH_ASSOC); - -header('Content-Type: text/ics'); -header('Content-Transfer-Encoding: Binary'); -header('Content-Disposition:attachment; filename=planning_semaine_accueil.ics'); - -echo $r[0]['planning']; - -exit(); - -header('Location: ../../index.php'); - -?> \ No newline at end of file