コード例 #1
0
 $cartouche_TEX = '';
 $separateur  = ';';
 $tab_codes = array(
   'RR' => TRUE ,
   'R'  => TRUE ,
   'V'  => TRUE ,
   'VV' => TRUE ,
   'X'  => FALSE ,
 );
 // Appel de la classe et définition de qqs variables supplémentaires pour la mise en page PDF
 $item_nb = count($tab_comp_id);
 if(!$only_req)
 {
   $tab_user_nb_req = array_fill_keys( array_keys($tab_user_nb_req) , $item_nb );
 }
 $cartouche_PDF = new PDF_evaluation_cartouche( FALSE /*officiel*/ , $orientation , $marge_min /*marge_gauche*/ , $marge_min /*marge_droite*/ , $marge_min /*marge_haut*/ , $marge_min /*marge_bas*/ , $couleur , $fond , 'oui' /*legende*/ );
 $cartouche_PDF->initialiser($cart_detail,$item_nb,$cart_cases_nb);
 if($cart_detail=='minimal')
 {
   // dans le cas d'un cartouche minimal...
   foreach($tab_user_id as $user_id=>$val_user)
   {
     if($tab_user_nb_req[$user_id])
     {
       $colonnes_nb = $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 ;
       $lignes_nb   = 1 + 2 + $cart_cases_nb + $lignes_comm; // marge incluse
       $texte_entete = ($val_user) ? $date_fr.' - '.$description.' - '.$val_user : $date_fr.' - '.$description ;
       $case_vide    = ($cart_cases_nb==1) ? '' : '<th class="nu"></th>' ;
       $cartouche_HTM .= '<table class="bilan"><thead><tr>'.$case_vide.'<th colspan="'.$colonnes_nb.'">'.html($texte_entete).'</th></tr></thead><tbody>';
       $cartouche_CSV .= $texte_entete."\r\n";