>> <<

".$msgFrom."".date("d " , $weeklowreqdate).$msgMonthsArray[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate); echo " ".$msgTo."".date("d " , $weekhighreqdate ).$msgMonthsArray[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate); break; case "mois": echo $msgMonthsArray[date("n", $reqdate)-1].date(" Y", $reqdate); break; } ?>
='$today' AND date<='$today 23:59:59' order by date DESC"; $q_string = "SELECT * FROM $table WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) order by date DESC"; $req = mysql_query ($q_string) or die ("Requete impossible"); break; case "semaine": // $day_min = date("Y-m-d" , (strtotime($today)-(86400*date("w" , strtotime($today))))); // $day_max = date("Y-m-d" , (strtotime($today)+(86400*(6-date("w" , strtotime($today))) )))."23:59:59"; // $q_string = "SELECT * FROM $table WHERE date>='$day_min' AND date<='$day_max' order by date DESC"; $q_string = "SELECT * FROM $table WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) order by date DESC"; $req = mysql_query ($q_string) or die ("Requete impossible"); break; case "mois": // $day_min = date("Y-m-" , strtotime($today))."01"; // $day_max = date("Y-m-" , strtotime($today))."31 23:59:59"; // $q_string = "SELECT * FROM $table WHERE date>='$day_min' AND date<='$day_max' order by date DESC"; $q_string = "SELECT * FROM $table WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) order by date DESC"; $req = mysql_query ($q_string) or die ("Requete impossible"); break; } $nb_champs=mysql_num_fields($req); $nb_line=mysql_num_rows($req); printf ("$nb_line $msgRecords"); printf ("
"); $i=0; echo ""; echo ""; while($i<$nb_champs) { $nom_champs=mysql_field_name($req,$i); echo ""; $i++; } echo ""; $i=0; $j=0; $sta = true; while($j<$nb_line) { echo ""; while($i<$nb_champs) { if ($sta) { $color = "#CCCCFF" ; } else { $color = "#FFFFCC" ;} $nom_champs=mysql_field_name($req,$i); $$nom_champs=mysql_result($req,$j,$nom_champs); if ( $nom_champs =="referer" ){ echo ""; } else { echo ""; } $i++; } echo ""; $i=0; $j++; $sta = !$sta; } echo "
$nom_champs
".$$nom_champs."
"; mysql_close ($c); ?>


ezBOO