Compare commits

..

No commits in common. "9ea0e4628516d3847849106774578d1140d4f5e5" and "2ca75a7bb394da5df40132b30b562ab0bdd8552e" have entirely different histories.

3 changed files with 27 additions and 4 deletions

View 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 |

View file

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

View file

@ -0,0 +1,17 @@
<?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');
?>