
<?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');

?>