diff --git a/Activity_PHP/calendar/calendar.php b/Activity_PHP/calendar/calendar.php
index d0ea05f..373787c 100644
--- a/Activity_PHP/calendar/calendar.php
+++ b/Activity_PHP/calendar/calendar.php
@@ -72,7 +72,25 @@ $monthName = $months[$month];
echo("
| ");
}
for ($i=6-$day; $i <7 ; $i++) {
- echo("$nbr | ");
+ $today = (date("j") == $nbr and date("n") == $month and date("Y") == $year) ? "class='today'" : "";
+ echo("$nbr");
+
+ 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++;
}
@@ -84,8 +102,24 @@ $monthName = $months[$month];
}
$today = (date("j") == $nbr and date("n") == $month and date("Y") == $year) ? "class='today'" : "";
-
- echo("$nbr | ");
+ echo("$nbr");
+
+ 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++;
}
echo("");
@@ -94,5 +128,6 @@ $monthName = $months[$month];
+ back ->