$rows_tex[$note_code] = mb_substr($tex_contenu,0,-2); } // Commentaire écrit $row_htm_comm = ''; $row_csv_comm = ''; $row_tex_comm = ''; if($lignes_comm) { $row_htm_comm = '<tr><td colspan="'.$colonnes_nb.'"><div class="appreciation">'.html($tab_user_comm[$user_id]).'</div></td></tr>'; $row_csv_comm = $tab_user_comm[$user_id]."\r\n"; $row_tex_comm = '\multicolumn{'.$colonnes_nb.'}{|l|}{'.To::latex($tab_user_comm[$user_id]).'} \\\\'."\r\n".'\hline'."\r\n"; } $cartouche_HTM .= '<tr>'.implode('</tr><tr>',$rows_htm).'</tr>'.$row_htm_comm.'</tbody></table>'; $cartouche_CSV .= implode("\r\n",$rows_csv)."\r\n".$row_csv_comm."\r\n"; $cartouche_TEX .= '\begin{center}'."\r\n".'\begin{tabular}{|'.str_repeat('c|',$colonnes_nb).'}'."\r\n".'\hline'."\r\n".implode(' \\\\'."\r\n".'\hline'."\r\n",$rows_tex).' \\\\'."\r\n".'\hline'.$row_tex_comm."\r\n".'\end{tabular}'."\r\n".'\end{center}'."\r\n\r\n"; $cartouche_PDF->commentaire_interligne( $cart_cases_nb+1 /*decalage_nb_lignes*/ , $tab_user_comm[$user_id] /*commentaire éventuel*/ , $lignes_comm ); } } } elseif($cart_detail=='complet') { // dans le cas d'un cartouche complet... foreach($tab_user_id as $user_id=>$val_user) { if($tab_user_nb_req[$user_id]) { $lignes_comm = ($tab_user_comm[$user_id]) ? max( 2 , ceil(mb_strlen($tab_user_comm[$user_id])/125) ) : 0 ; $colonnes_nb = ($cart_cases_nb==1) ? 3 : 2 ; $lignes_nb = 1 + 1 + $tab_user_nb_req[$user_id] + $lignes_comm ; // marge incluse $texte_entete = ($val_user) ? $date_fr.' - '.$description.' - '.$val_user : $date_fr.' - '.$description ; if($cart_cases_nb==1)
foreach ($rows_tex as $note_code => $tex_contenu) { $rows_tex[$note_code] = mb_substr($tex_contenu, 0, -2); } // Commentaire écrit $row_htm_comm = ''; $row_csv_comm = ''; $row_tex_comm = ''; if ($lignes_comm) { $row_htm_comm = '<tr><td colspan="' . $colonnes_nb . '"><div class="appreciation">' . html($tab_user_comm[$user_id]) . '</div></td></tr>'; $row_csv_comm = $tab_user_comm[$user_id] . "\r\n"; $row_tex_comm = '\\multicolumn{' . $colonnes_nb . '}{|l|}{' . To::latex($tab_user_comm[$user_id]) . '} \\\\' . "\r\n" . '\\hline' . "\r\n"; } $cartouche_HTM .= '<tr>' . implode('</tr><tr>', $rows_htm) . '</tr>' . $row_htm_comm . '</tbody></table>'; $cartouche_CSV .= implode("\r\n", $rows_csv) . "\r\n" . $row_csv_comm . "\r\n"; $cartouche_TEX .= '\\begin{center}' . "\r\n" . '\\begin{tabular}{|' . str_repeat('c|', $colonnes_nb) . '}' . "\r\n" . '\\hline' . "\r\n" . implode(' \\\\' . "\r\n" . '\\hline' . "\r\n", $rows_tex) . ' \\\\' . "\r\n" . '\\hline' . $row_tex_comm . "\r\n" . '\\end{tabular}' . "\r\n" . '\\end{center}' . "\r\n\r\n"; $cartouche_PDF->commentaire_interligne($cart_cases_nb + 1, $tab_user_comm[$user_id], $lignes_comm); } } } elseif ($cart_detail == 'complet') { // dans le cas d'un cartouche complet... foreach ($tab_user_id as $user_id => $val_user) { if ($tab_user_nb_req[$user_id]) { $lignes_comm = $tab_user_comm[$user_id] ? max(2, ceil(mb_strlen($tab_user_comm[$user_id]) / 125)) : 0; $colonnes_nb = $cart_cases_nb == 1 ? 3 : 2; $lignes_nb = 1 + 1 + $tab_user_nb_req[$user_id] + $lignes_comm; // marge incluse $texte_entete = $date_fr . ' - ' . $description . ' - ' . $val_user; if ($cart_cases_nb == 1) { // ... avec une case à remplir $cartouche_HTM .= '<table class="bilan"><thead><tr><th colspan="' . $colonnes_nb . '">' . html($texte_entete) . '</th></tr></thead><tbody>'; $cartouche_CSV .= $texte_entete . "\r\n";