1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| <table><tr bgcolor="#FFCC66">
<th>Modifier</th>
<th>Supprimer</th>
<th>nom</th>
<th>Date</th>
<th>Horaires</th>
<th>Validé</th>
<th>Annule</th>
</tr>
<?php
$indice = 0;
$retour = mysql_query('SELECT *, DATE_FORMAT(date, "%d/%m/%Y") AS date_fr FROM gardespv ORDER BY date DESC');
while ($donnees = mysql_fetch_array($retour))
{
if($donnees['annule'] == 'Oui')
{
$style='background-color: red;';
}
else
{
if($donnees['valide'] == 'Oui')
{
$style= 'background-color: green;';
}
else
{
$style = 'background-color: #ffffff';
}
}
?>
<tr style="<?php echo $style; ?>">
<td><?php echo '<a href="rediger_SPV.php?modifier_garde=' . $donnees['id'] . '">'; ?><img src="button_edit.png"></a></td>
<td><?php echo '<a href="liste_SPV.php?supprimer_garde=' . $donnees['id'] . '">'; ?><img src="button_drop.png"></a></td>
<td><?php echo stripslashes($donnees['nom']); ?></td>
<td><?php echo stripslashes($donnees['date_fr']); ?></td>
<td><?php echo stripslashes($donnees['horaire']); ?></td>
<td><?php echo stripslashes($donnees['valide']); ?></td>
<td><?php echo stripslashes($donnees['annule']); ?></td>
</tr>
<?
} // Fin de la boucle qui liste les news
?>
</table> |
Partager