Indiquez l’intérêt que vous portez à cette question
0

Conditions fonction set

Je cherche à créer un tableau dans ce tableau je souhaite changer la couleur de fond d’une cellule du tableau selon un champ intitulé date de debut à comparer avec la date du jour - si plus grand que Date du jour fond en Vert, si date du jour égal avec date debut fond en rouge etc.....

J’ai concaténé les dates en AnneeJour pour faire la comparaison du plus grand.
Mon code n’affiche qu’une seul couleur et un msg d’erreur.
Pouvez-vous m’aider.

<BOUCLE_emploi(ARTICLES){id_rubrique}{tri Date_debut} {inverse} >		
      
       [(#SET{date_init,#DATE_DEBUT|annee|concat{#DATE_DEBUT|mois}})] 
       [(#SET{date_jour,#DATE|annee|concat{#DATE|mois}})]     
   
      	
			<tr>	
			<td><h2><a href="#URL_ARTICLE" >#TITRE</a></h2></td>				
			<td style="font-weight: bold">#SURTITRE</td>
			<td>#SOUSTITRE</td>	
			<td><a href="mailto:#EMAIL?subject=#TITRE">#EMAIL</a> <br>#TEL</td>  	
			<td>#CONTACT</td>

<!-- TEST CONDITIONNEL Date debut POUR COULEUR FOND CELLULE --->                  

<td
[(#GET{date_init}|>{date_jour}|?{style="font-weight: bold; color: #fff;background-color:#4CAF50"})]
[(#GET{date_init}|={date_jour}|?{style="font-weight: bold; color: #fff;background-color:#F9C198"})]
[(#GET{date_init}|<{date_jour}|?{style="font-weight: bold; color: #fff;background-color:#FF0000"})]
>
                   
				    <br> #GET{date_init} / #GET{date_jour} <br>[(#DATE_DEBUT|affdate{'j-m-Y'})]<br>[(#DATE_FIN|affdate{'j-m-Y'})]
</td>             
                                          

			<td style="font-weight: bold;color:#3874b0">#LISTER_VALEURS{type_action}</td>
			<td><h3>#LISTER_VALEURS{convention}</h3></td>	
			</tr>

			</BOUCLE_emploi>
		</tbody>	
	</table>