From 21ed93c8925b933121f1f1bcc9c2d01b7e7f79d2 Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 21 Apr 2016 09:53:48 +0200 Subject: [PATCH] =?UTF-8?q?changement=20de=20la=20m=C3=A9thode=20de=20masq?= =?UTF-8?q?uage=20des=20events=20(PHP=20->=20CSS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.css | 5 +++++ index.php | 23 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/index.css b/index.css index c675900..afb2182 100755 --- a/index.css +++ b/index.css @@ -80,6 +80,7 @@ form input[type="checkbox"] { display:none; } + input[type="checkbox"] + label span { display:inline-block; width:19px; @@ -252,6 +253,10 @@ input[type="checkbox"]:checked + label span { text-decoration: none; } +#calendar .week .day .bad_cat { + display: none; +} + @media only screen and (max-width: 1000px) and (max-height: 500px){ #exMois diff --git a/index.php b/index.php index 5599e17..b4003ca 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,16 @@ $weekOffset = $_GET['w']; else $weekOffset = 0; +function categoriesOK($session, $categories) +{ + foreach($session as $cat=>$cat_status) + { + if($cat_status && in_array($cat, $categories)) + return true; + } + return false; +} + ?> @@ -100,7 +110,7 @@ $weekOffset = 0; $date = strtotime('+1 day', $date) ) { - $events = getEventsByDateAndCategories($db, $date, $_SESSION['categorieStatus']); + $events = getEventsByDate($db, $date); $class = ''; if(date('m', $date) != date('m', $monthDate)) @@ -116,14 +126,21 @@ $weekOffset = 0; '.$days[date("N",$date)].' '.date("d", $date)); if(date('m', $date) != date('m', $monthDate)) - echo('/'.date("m",$date).''); + echo('/'.date("m",$date).''); echo(' ');