NOUVEAUTES MEDIATHEQUE

"; include_once "commun/connexion.inc.php"; include_once "commun/traitement_text.inc.php"; $sql = "SELECT * FROM `nouveaute` WHERE `valid` = 1 ORDER BY `date_entree` ASC "; mysql_select_db($dbname, $id_link); $resultat = mysql_query($sql, $id_link); while ($rang=@mysql_fetch_array($resultat)){ $nom = $rang['nom']; $type_media = $rang['type_media']; $date_entree = $rang['date_entree']; $description = $rang['description']; $photo = $rang['photo']; $today = getdate(); $jour_today = $today['mday']; $mois_today = $today['mon']; $annee_today = $today['year']; $date_today = $annee_today."-".$mois_today."-".$jour_today; if ($date_entree >= $date_today) { if ($type_media == "CD Audio") $color = "#99CCCC"; if ($type_media == "DVD") $color = "#FF9933"; if ($type_media == "Cassette VHS") $color = "#3399CC"; if ($type_media == "Cassette Audio") $color = "#FF9999"; if ($type_media == "CD Rom") $color = "#CCCCCC"; if ($type_media == "Livre") $color = "#99CC99"; $date_entree = gest_date($date_entree); if ($photo != "") { echo "

.: $type_media :.

\"\"

$nom

la mediatheque partir du $date_entree


$description

"; } else if ($photo == "") { echo "

.: $type_event :.

$titre

ma mediatheque partir du $date_debut


$description

"; } } } ?>