1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| // Compare et vérifie une date limite
public function compare_pplDateLimite($date_compare){
$query = mysql_query("SELECT cfg_ppl_datelimite FROM configuration");
if (@mysql_num_rows($query)>=0) {
$row = mysql_fetch_assoc($query);
$cfg_ppl_datelimite = $row["cfg_ppl_datelimite"];
}
$day = substr($date_compare, 0, 2);
$month = substr($date_compare, 3, 2);
$year = substr($date_compare, 6, 2);
$date = date("m/d/y");
$date_limite = date('m/d/y',mktime(0, 0, 0, $month, $day+$cfg_ppl_datelimite, $year));
if ($date>=$date_limite) {
return true;
}
} |