"January", 2 => "February", 3 => "March", 4 => "April", 5 => "May", 6 => "June", 7 => "July", 8 => "August", 9 => "September", 10 => "October", 11 => "November", 12 => "December" ]; $monthName = $months[$month]; $data = json_decode(file_get_contents('data.json'), true); ?> Calendar

Calendar

"); } for ($i=6-$day; $i <7 ; $i++) { $today = (date("j") == $nbr and date("n") == $month and date("Y") == $year) ? "class='today'" : ""; echo(""); $nbr++; } for ($i=0; $i<5 ; $i++) { echo(""); for ($j=0; $j<7 ; $j++) { if ($nbr == $nbrmax) { break; } $today = (date("j") == $nbr and date("n") == $month and date("Y") == $year) ? "class='today'" : ""; echo(""); $nbr++; } echo(""); } ?>
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
$nbr"); $date_table = $nbr."-".$month ; foreach ($data['dates'] as $date) { if ($date['date'] === $date_table) { echo "
" . $date['name']; } } foreach ($_COOKIE as $nom_cookie => $valeur_cookie) { $cut = explode("-", $nom_cookie); if (count($cut) >= 3) { $rappelday = $cut[0]; $rappelmonth = $cut[1]; $rappelyear = $cut[2]; $rappel = ($rappelday == $nbr and $rappelmonth == $month and $rappelyear == $year) ? "
$valeur_cookie" : ""; } else { $rappel = "error rappel"; } echo($rappel); } echo("
$nbr"); $date_table = $nbr."-".$month ; foreach ($data['dates'] as $date) { if ($date['date'] === $date_table) { echo "
" . $date['name']; } } foreach ($_COOKIE as $nom_cookie => $valeur_cookie) { $cut = explode("-", $nom_cookie); if (count($cut) >= 3) { $rappelday = $cut[0]; $rappelmonth = $cut[1]; $rappelyear = $cut[2]; $rappel = ($rappelday == $nbr and $rappelmonth == $month and $rappelyear == $year) ? "
$valeur_cookie" : ""; } else { $rappel = "error rappel"; } echo($rappel); } echo("
back ->