Subversion Repositories eFlore/Applications.coel

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<table style="border:1px solid black;border-collapse:collapse;" summary="Différences entre les données du <?=$date_ancienne?> et du <?=$date_nouvelle?>.">
        <caption style="text-align:left;font-weight:bold;">Différences</caption>
        <thead style="border:1px solid black;">
                <tr>
                        <th rowspan="2" style="border:1px dotted;">Champ</th>
                        <th rowspan="2" style="border:1px dotted;">Type</th>
                        <th <?=(($etat == 'M') ? 'colspan="2"' : '');?> style="border:1px dotted;">Valeur</th>
                </tr>
                <tr>
                        <?php if ($etat == 'M') : ?>
                        <th style="border:1px dotted;">Ancienne (<?=$date_ancienne?>)</th>
                        <?php endif; ?>
                        <th style="border:1px dotted;">Nouvelle (<?=$date_nouvelle?>)</th>
                        
                </tr>
        </thead>
        <tbody>
<?php foreach ($differences as $champ => $diff) : ?>
        <?php if ($diff['type'] == 'A') : 
                $couleur = CFC;
        elseif ($diff['type'] == 'M') : 
                $couleur = FFC;
        elseif ($diff['type'] == 'S') : 
                $couleur = F99;
        endif; ?>
                <tr style="background-color:#<?=$couleur?>;">
                        <td style="border:1px dotted;"><?=$champ?></td>
                        <td style="text-align:center;border:1px dotted;"><?=$diff['type_txt']?></td>
                        <?php if ($etat == 'M') : ?>
                        <td style="border:1px dotted;"><?=$diff['ancien']?></td>
                        <?php endif; ?>
                        <td style="border:1px dotted;"><?=$diff['nouveau']?></td>
                </tr>
<?php endforeach; ?>
        </tbody>
</table>