Exemple #1
0
			       <th border="0.5"  width ="' . $col[0] . '%">DATES</th>
			        <th border="0.5" width ="' . $col[1] . '%">LUNDI</th>
				<th border="0.5"  width ="' . $col[2] . '%">MARDI</th>
				<th border="0.5"  width ="' . $col[3] . '%">MERCREDI</th>
				<th border="0.5"  width ="' . $col[4] . '%">JEUDI</th>
				<th border="0.5" width ="' . $col[5] . '%">VENDREDI</th>
				<th border="0.5"  width ="' . $col[6] . '%">SAMEDI</th>
             </tr>';
$date = $datedebut;
$d = new DateFR();
while ($date <= $datefin) {
    $d->setSource($date);
    $corps .= '<tr><td border="0.5">' . $d->getDate() . ' ' . $d->getMois(3) . ' ' . $d->getYear() . '</td>';
    $semaine = jourSemaine();
    for ($i = 1; $i < 7; $i++) {
        $absents = enseignantAbsentByPeriode($date, $absences);
        $corps .= '<td border="0.5">';
        foreach ($absents as $abs) {
            $corps .= substr($abs['NOM'], 0, 10) . "<br/>";
        }
        $corps .= "</td>";
        # Passer au jour suivant
        $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
        $d->setSource($date);
    }
    $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
    $d->setSource($date + 1);
    $corps .= '</tr>';
}
$corps .= '</table>';
$pdf->WriteHTMLCell(0, 0, $x, $y + 20, $corps);
Exemple #2
0
			    <th border="0.5"  width ="' . $col[0] . '%">CLASSES</th>
			    <th border="0.5"  width ="' . $col[1] . '%">1<sup>ere</sup>Heure</th>
				<th border="0.5"  width ="' . $col[2] . '%">2<sup>eme</sup>Heure</th>
				<th border="0.5"  width ="' . $col[3] . '%">3<sup>eme</sup>Heure</th>
				<th border="0.5" width ="' . $col[4] . '%">4<sup>eme</sup>Heure</th>
				<th border="0.5" width ="' . $col[5] . '%">5<sup>eme</sup>Heure</th>
				<th border="0.5"  width ="' . $col[6] . '%">6<sup>eme</sup>Heure</th>
				<th border="0.5"  width ="' . $col[7] . '%">7<sup>eme</sup>Heure</th>
				<th border="0.5"  width ="' . $col[8] . '%">8<sup>eme</sup>Heure</th>
				
             </tr>';
foreach ($classes as $cl) {
    $trouver = false;
    $str = '<tr><td  border="0.5">' . $cl['NIVEAUHTML'] . "</td>";
    for ($h = 1; $h <= HEURE_TRAVAIL; $h++) {
        $absents = enseignantAbsentByPeriode($datejour, $absences, $cl['IDCLASSE'], $h);
        $str .= '<td border="0.5">';
        if (!empty($absents)) {
            $trouver = true;
            foreach ($absents as $abs) {
                $str .= substr($abs["NOM"], 0, 10);
                if ($abs['ETAT'] == "R") {
                    $str .= " (R " . substr($abs['RETARD'], 0, 5) . ")";
                }
                $str .= "<br/>";
            }
        }
        $str .= "</td>";
    }
    $str .= "</tr>";
    if ($trouver) {