mktime($hdeb, $mindeb, 0, 8, $row['jour'], 2019), "fin"=>mktime($dekfin[0], $mindebfin, 0, 8, $lejourfin, 2019),"quoi"=>$row['titre'],"ztheme"=>$tablotheme[$row['theme']],"zlieu"=>$tablolieux[$row['lieu']],"cle"=>$row['cle'],"desc"=>$row['description']);
}
$tabfinstf = array();
$malistec = "";
foreach($tablojourmax as $cle=>$jour)
{
$malistec .= "
• ".$jour." | ";
foreach($tabloheure as $heure)
{
if(strlen($heure)<4) $malistec .= "".$heure." | ";
}
$malistec .= "
";
foreach($listjourheure as $clex=>$val)
{
$lejour = explode("-",$val);
$dek = explode("h",$lejour[1]);
$hdeb = $dek[0];
if($dek[1]!='') $mindeb = $dek[1];
else $mindeb = 0;
$ledebut = mktime($dek[0], $mindeb, 0, 8, $lejour[0], 2019);
$dekfin = explode("h",$lejour[2]);
$hdebfin = $dekfin[0];
if($dekfin[1]!='') $mindebfin = $dekfin[1];
else $mindebfin = 0;
$lafin = mktime($dekfin[0], $mindebfin, 0, 8, $lejour[0], 2019);
if($lejour[0] == $cle)
{
$malistec .= "
";
$malistec .= "".trim($tabtime[$lejour[3]]['quoi'])." ".trim($tabtime[$lejour[3]]['ztheme'])." - ".trim($tabtime[$lejour[3]]['zlieu'])." | ";
foreach($tabloheure as $heure2)
{
$dekrange = explode("h",$heure2);
if($dekrange[0]<='6') $lejourfinfin = 1+$lejour[0];
else $lejourfinfin = $lejour[0];
if($dekrange[1]!='') $mindebfinrange = $dekrange[1];
else $mindebfinrange = 0;
$lerange = mktime($dekrange[0], $mindebfinrange, 0, 8, $lejourfinfin, 2019);
if(($lerange >= $tabtime[$lejour[3]]['deb'])&&($lerange < $tabtime[$lejour[3]]['fin']))
{
if($mindebfinrange != 0) $letitle = $dekrange[0]."h".$mindebfinrange;
else $letitle = $dekrange[0]."h";
if(strlen($heure2)<4) $zicol = str_replace('h','',$heure2);
else $zicol = " ";
$malistec .= "
".trim($zicol)." |
";
}
else $malistec .= " | ";
}
$malistec .= "
";
}
}
}
ob_start();
?>
pdf->SetAuthor('Terre de Convergence');
$html2pdf->pdf->SetTitle('Agenda 2019');
$html2pdf->pdf->SetSubject('Planning des interventions');
$html2pdf->pdf->SetKeywords('Terre de Convergence');
$html2pdf->setDefaultFont('helvetica', '', 14);
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf->writeHTML($content);
$html2pdf->Output("../pdf/planning.pdf", "F");
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
header("location: pdfs.php");
//header('Content-Type: application/pdf');
//readfile('../pdf/planning.pdf');
?>