Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $styleTable = array('borderColor'=>'#006699',
- 'borderSize'=>6,
- 'cellMargin'=>50,
- 'valign'=>'center');
- $styleFirstRow = array('bgColor'=>'#6086B8',
- 'color'=>'white',
- 'bold'=>true,
- 'size'=>11,
- 'valign'=>'center'
- );
- $PHPWord->addTableStyle('myTable', $styleTable, $styleFirstRow);
- $styleCell = array('valign'=>'center');
- // initialisation de la variable id_form
- $id_form = $message[0]['id_form'];
- // Ajout du type item sur la ligne
- $section->addText('Validation de l\'item : '.$id_item.' '.utf8_decode($this->Structure->getLibelleItemById($id_item, $id_form)), array('name'=>'Verdana', 'color'=>'006699'));
- // Add table
- $table = $section->addTable('myTable');
- // Add row
- $table->addRow(1200);
- // Add Title Cell
- $table->addCell(2200, $styleCell)->addText('Type du rapporteur');
- $table->addCell(2200, $styleCell)->addText('Nom du rapporteur');
- $table->addCell(2200, $styleCell)->addText(utf8_decode('Validé ou refusé'));
- $table->addCell(2200, $styleCell)->addText('Commentaire');
- // Add cells
- for($i=0;$i<count($message);$i++){
- $table->addRow(1200);
- $table->addCell(2200, $styleCell)->addText(utf8_decode($message[$i]['rapporteur']));
- $table->addCell(2200, $styleCell)->addText(utf8_decode($message[$i]['name']));
- $table->addCell(2200, $styleCell)->addText(utf8_decode(($message[$i]['valeur']?'Validé':'Refusé')));
- $table->addCell(2200, $styleCell)->addText(utf8_decode($message[$i]['commentaire']));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement