c'est la bonne j'espere !

Questo commit è contenuto in:
Baptiste 2022-10-15 17:27:39 +02:00
parent 3be8dc3c7e
commit 05ff9140d5
3 ha cambiato i file con 32 aggiunte e 1 eliminazioni

Vedi file

@ -97,6 +97,16 @@ 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). 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 ### scores
| Nom | Type | AUTO_INCREMENT | NULL | | Nom | Type | AUTO_INCREMENT | NULL |

Vedi file

@ -143,7 +143,10 @@ if(isset($_POST['download_planning'])) {
$cal->End(); $cal->End();
$cal->DownloadICS("planning_SA_INSA"); $req = $db->prepare('UPDATE planning_tmp_dl set planning = ?');
$req->execute(array($cal->GetICS()));
header('Location: assets/scripts/planning_tmp.php');
} }

Vedi file

@ -0,0 +1,18 @@
<?php
include '../../script/db.php';
$req = $db->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');
?>