echo " <table width=\"550\" border=\"0\"> ";
if($p = @mysql_query($sql,$c)){
while($r = @mysql_fetch_array($p)){
$dateentier = $r['date'];
$datajd=date("Y-m-d" );
$date1= (int) implode("", explode("-",$dateentier));
$date2= (int) implode("", explode("-",$datajd));
$annee=substr($dateentier,0,4);
$moisbd=substr($dateentier,5,2);
$jour=substr($dateentier,8,2);
$Mois = array("","JANUARY","FEBRUARY","MARCH","APRIL","MAY",
"JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER" ); $moisbd = $moisbd + 0;
if ($date1 < $date2){
echo " <tr><td bordercolor=\"#666666\" bgcolor=\"#999999\"> ";
echo "$jour " . $Mois["$moisbd"] . " $annee" . "@". $r['lieu']. " / " . $r['ville'];
echo "".$r['contenu'] ."<br><br>";
echo "</tr>";
}
else {
echo " <tr><td bordercolor=\"#666666\" bgcolor=\"#CCCCCC\"> <font color=\"#000000\">";
echo "<b>$jour " . $Mois["$moisbd"] . " $annee" . "@". $r['lieu']. " / " . $r['ville']. "</b>";
echo "<i> ".$r['contenu'] ."</i>";
echo "</tr>";
}
}
echo "</table>"; |