"Lun.",2=>"Mardi",3=>"Mercredi",4=>"Jeudi",5=>"Vendredi",6=>"Samedi",7=>"Dimanche"); if($_GET['type']!='') $lasuite = " AND type='".$_GET['type']."' "; elseif($_GET['theme']!='') $lasuite = " AND theme='".$_GET['theme']."' "; elseif($_GET['lieu']!='') $lasuite = " AND lieu='".$_GET['lieu']."' "; elseif($_GET['interv']!='') $lasuite = " AND intervenant='".$_GET['interv']."' "; elseif($_GET['refer']!='') $lasuite = " AND referent='".$_GET['refer']."' "; else $lasuite = ""; $qd = "SELECT * FROM planning WHERE onoff='0' AND valid='0' ".$lasuite." ORDER BY jour, CAST(heure AS UNSIGNED)"; $resultd = mysqli_query($connect,$qd); while($row = mysqli_fetch_array($resultd)) { $cpte++; $listjourheure[] = $row['jour']."-".$row['heure']."-".$row['heurefin']."-".$row['cle']; $dek = explode("h",$row['heure']); $hdeb = $dek[0]; if($dek[1]!='') $mindeb = $dek[1]; else $mindeb = 0; $dekfin = explode("h",$row['heurefin']); $hdebfin = $dekfin[0]; if($dekfin[1]!='') $mindebfin = $dekfin[1]; else $mindebfin = 0; if($dekfin[0]<='6') $lejourfin = 1+$row['jour']; else $lejourfin = $row['jour']; $tabtime[$row['cle']] = array("deb"=>mktime($hdeb, $mindeb, 0, 8, $row['jour'], 2019), "fin"=>mktime($dekfin[0], $mindebfin, 0, 8, $lejourfin, 2019),"quoi"=>$row['titre'],"ztheme"=>$tablotheme[$row['theme']],"zlieu"=>$tablolieux[$row['lieu']],"cle"=>$row['cle'],"desc"=>$row['description'],"cpte"=>$cpte,"interv"=>$tablointervenant[$row['intervenant']]['prenom']." ".$tablointervenant[$row['intervenant']]['nom'],"ztype"=>$tablotypeinsc[$row['type']]); } $tabfinstf = array(); $malistec = ""; foreach($tablojourmax as $cle=>$jour) { $malistec .= "