"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 .= "".$jour." "; foreach($tabloheure as $heure) { if(strlen($heure)<4) $malistec .= "".$heure." "; } $malistec .= " "; foreach($listjourheure as $clex=>$val) { $lejour = explode("-",$val); $dek = explode("h",$lejour[1]); $hdeb = $dek[0]; if($dek[1]!='') $mindeb = $dek[1]; else $mindeb = 0; $ledebut = mktime($dek[0], $mindeb, 0, 8, $lejour[0], 2019); $dekfin = explode("h",$lejour[2]); $hdebfin = $dekfin[0]; if($dekfin[1]!='') $mindebfin = $dekfin[1]; else $mindebfin = 0; $lafin = mktime($dekfin[0], $mindebfin, 0, 8, $lejour[0], 2019); if($lejour[0] == $cle) { $malistec .= " "; // onclick='montreMoi(".$tabtime[$lejour[3]]['cle'].");'
// // tooltip-persistent $zede = date("N",$tabtime[$lejour[3]]['deb']); $malistec .= "".$tabtime[$lejour[3]]['cle']." ".$tabtime[$lejour[3]]['quoi']."
".$tabtime[$lejour[3]]['ztheme']." - ".$tabtime[$lejour[3]]['zlieu']." "; foreach($tabloheure as $heure2) { $dekrange = explode("h",$heure2); if($dekrange[0]<='6') $lejourfinfin = 1+$lejour[0]; else $lejourfinfin = $lejour[0]; if($dekrange[1]!='') $mindebfinrange = $dekrange[1]; else $mindebfinrange = 0; $lerange = mktime($dekrange[0], $mindebfinrange, 0, 8, $lejourfinfin, 2019); if(($lerange >= $tabtime[$lejour[3]]['deb'])&&($lerange < $tabtime[$lejour[3]]['fin'])) { if($mindebfinrange != '0') $letitle = $dekrange[0]."h".$mindebfinrange; else $letitle = $dekrange[0]."h"; $malistec .= "
.
"; } else $malistec .= "."; } $malistec .= " "; } } } ?> Agenda graphique