"")) { $DateincDate = $_GET["incDate"]; $partie_DateincDate = explode("/", $DateincDate); $jour = $partie_DateincDate[1]; $mois = $partie_DateincDate[0]; // mon ajout $annee= $partie_DateincDate[2]; }else{ $jour = date("j",time()); $mois = date("n",time()); $annee = date("Y",time()); $_SESSION["jour"] = date("j",date()); $_SESSION["mois"] = date("n",date()); $_SESSION["annee"] =date("Y",date()); } if ((isset($jour)) && (isset($mois)) && (isset($annee))) { $_SESSION["jour"] = $jour; $_SESSION["mois"] = $mois; $_SESSION["annee"] = $annee; } $strSQL="SELECT * FROM equipements" ; $objRS=mysql_query($strSQL); if (!$objRS) { echo "Could not successfully run query ($strSQL) from DB: " . mysql_error(); exit; } if ($row2 = mysql_fetch_assoc($objRS)) { $str_nbSalle= mysql_num_rows($objRS); if (!mysql_data_seek($objRS, 0)) { echo "Ne peut pointer vers la ligne : " . mysql_error() . "\n"; continue; } for ($i=0; $i <= $str_nbSalle; $i++) { $journee[0][$i] = $row2["CodeE"]; $journee[1][$i]=$row2["Nom"]; $journee[2][$i]=$row2["Description"]; $row2 = mysql_fetch_assoc($objRS); } mysql_free_result($objRS); // a voir for ($l=2;$l<19;$l++) { $str_heure=$l+5; $journee[$l][0]=strtotime($str_heure); } $journee[19][0]=strtotime("0"); $datesql=$annee."-".$mois."-".$jour." 00:00:00"; $strSQL="SELECT * FROM eventsequipementoccur WHERE dt_occur='".$datesql."'"; //objRS.Open strSQL,Conn,3,3 // a voir $objRS=mysql_query($strSQL); //Redim desc(19, str_nbSalle) // a voir if (!$objRS) { echo "Could not successfully run query ($objRS) from DB: " . mysql_error(); exit; } while ($row3 = mysql_fetch_assoc($objRS)) { $partie_tm_start = explode(" ", $row3["tm_start"]); $partie_tm_end = explode(" ", $row3["tm_end"]); $partie_tm_start_h = explode(":", $partie_tm_start[1]); $partie_tm_end_h = explode(":", $partie_tm_end[1]); $break=false; for ($m=1;$m<=$str_nbSalle; $m++){ if ($journee[0][$m]==$row3["location"]) { $col=$m; $desc[0][$m]= $partie_tm_start_h[0]; $desc[1][$m]= $partie_tm_end_h[0]; $break=true; } if ($break) break; } $break1=false; for ($q=2;$q<19;$q++) { $stm_start = strtotime($partie_tm_start_h[0]); if ($journee[$q][0]== $stm_start) { $debut=$q; $desc[2][$m]=$partie_tm_start[1]; $desc[3][$m]=$partie_tm_end[1]; $break1=true; } if ($break1) break; } /***************************datediff************************************/ if ($partie_tm_start_h[0] > $partie_tm_end_h[0]) $temps = diff_time($partie_tm_start[1],$partie_tm_end[1]); else $temps = diff_time($partie_tm_end[1],$partie_tm_start[1]); for ($n=$debut; $n<=($debut+$temps); $n++) { $journee[$n][$col]="X"; } } ?>
Réservation des Equipements

"; } $count = $count + 1; $dispDay = $dispDay + 1; }Else{ //':: no date spacer cell ?> <"; echo GetDateName(date("m",$lastmoU)); echo "
"") { db_E_select_detail_Events(); //appel procedure } else { $b_error = true; $error_list["edit_detail_Events"]="Specify record to select."; } break; } $datedujour=date("j/n/Y"); // echo '$datedujour='.$datedujour; $partie_datedujour = explode("/", $datedujour); //':: handle the default case(s) (ignores value of action parameter) if (!isset($_REQUEST["incDate"])) $incDate=""; else $incDate = $_REQUEST["incDate"]; if (!isset($_REQUEST["mo"])) $mo=""; else $mo = $_REQUEST["mo"]; if (!isset($_REQUEST["yr"])) $yr=""; else $yr = $_REQUEST["yr"]; if ("m/d/Y" == "m/d/Y") { if (($incDate == "") and ($mo <> "") and ($yr <> "")) $incDate = $mo."/1/".$yr; }else{ if (($incDate == "") and ($mo <> "") and ($yr <> "")) $incDate = "1/".$mo."/".$yr; } if ($action == "detail") db_E_select_detail_Events(); // appel de procedure else $b_display_new_content = true; // voir est-ce procedure ou variable display_errs(); // appel de procedure dans i_utils.php display_msg(); // appel de procedure dans i_utils.php if ($action == "") { If ($incDate == "") { // get the current months first day $incDate = Date("m")."/1/".Date("Y"); // voir ici c quoi date } //pixel size for the cell boxes $boxSize = "40"; $boxSizeLarge = "40"; //' To change the month, Pass in a date with POST or GET of a valid date //' to a variable named incDate render_title($incDate); //La fonction est définie plus haut if (!isset($_REQUEST["wk"])) $wk=""; else $wk = $_REQUEST["wk"]; $partie_incDate = explode("/", $incDate); // mm/jj/yyyy if (!isset($_REQUEST["CatId"])) $CatId = ""; else $CatId = $_REQUEST["CatId"]; if ($wk == "") { ?> $_SESSION["CodeAdmin"])) $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]].$NomU." busy..
"; } if ($a_events[$partie_dt_occur[2]]=="") $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]]."".substr($row["event_name"],0,25); else $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]]."\n".substr($row["event_name"],0,25); } //fin while mysql_free_result($rs); $dateCount = $incDate; $count = 1; $dispDay = 1; for ($w = 1; $w <= 6; $w++) { ?> Date("w" , $incDateU)) && ($count < 8)) { ?> $dispDay"; if (!Empty($a_events[$dispDay])) { echo "
Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi
  $dispDay"; if (!Empty($a_events[$dispDay])){ ?>
"; } echo "
 
"; ?> "; ?> "; // echo ""; //le bouton a enlever ou a laisser echo " "; echo GetDateName(date("m",$nextmoU)); echo ">
"; }else{ //ligne 164 /******************************************Semaine**********************************/ ?> $_SESSION["CodeAdmin"])) $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]].$NomU." busy..
"; } if ($a_events[$partie_dt_occur[2]]=="") $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]]."".substr($row["event_name"],0,25); else $a_events[$partie_dt_occur[2]] = $a_events[$partie_dt_occur[2]]."\n".substr($row["event_name"],0,25); } //fin while ligne 570 mysql_free_result($rs); // Calendar loop $dateCount = $incDate; $count = 1; $partie_incDate = explode("/", $incDate); //mon ajout $dispDay = $incday; for ($d = 1; $d<=7; $d++) { if ($dispDay > $days_in_month) { // le cas ou le 1er du mois se // trouve entre 2 semaines $dispDay=1; $incmonth = $incmonth+1; if ( $incmonth>=12 ) { $incmonth=1; $incyear=$incyear+1; } } If ( checkdate($incmonth,$dispDay,$incyear)) { $currDy = $incmonth."/".$dispDay."/" ; $currDay = $incmonth."/".$dispDay."/".$incyear; ?>
  Suivant >>
"") { $rs=mysql_query($detail_Events_sql); if (!$rs) { echo "Could not successfully run query ($detail_Events_sql) from DB: " . mysql_error(); exit; } if ($rs) { //move first $num_recs = mysql_num_rows($rs); $results = true; }else{ $results = false; mysql_free_result($rs); } }else { //else du if ligne 717 $results = false; } $rec_count = 0; /////////////////////////////////////////////////////////////////// $partie_incDate = explode("/", $incDate); /****************Ajouté pour eviter redondance**********/ $incday= $partie_incDate[1]; $incmonth= $partie_incDate[0]; // mon ajout $incyear= $partie_incDate[2]; ?>
Horaire Titre Equipement
"") && ($tm_end1 <> "")) { $tm_start = $tm_start1." - ".$tm_end1; }elseif ($tm_start1 <> "") { $tm_start = $tm_start1; }else{ $tm_start = " --Toute la journée-- "; } echo ($tm_start); ?> $CodeAdmin)) { echo $NomU; ?> busy
[Pas de réservation]



Liste des réservations confirmées pour le ".$jour."/".$mois."/".$annee."

"); ?>

") ; Echo( ""); $h=7; for ($k=2; $k <= 18; $k++) { Echo( ""); $h = $h+1; } Echo ( "" ); ?>
"); Echo( ""); Echo( ""); Echo( "") ; Echo( ""); for ($p=0; $p<$str_nbSalle; $p++) { Echo( ""); Echo( ""); Echo( ""); } Echo( ""); Echo( ""); Echo( ""); Echo( "
Nom de l'équipement
".$journee[1][$p]."
Nom de l'équipement
"); Echo( "
") ; Echo( ""); Echo( ""); Echo( ""); Echo( ""); for ($j=1; $j<=$str_nbSalle; $j++) { if (isset($journee[$k][$j])&& ($journee[$k][$j]=="X")) { Echo( ""); Echo( ""); Echo( ""); }else{ Echo( ""); Echo( ""); Echo( ""); } } Echo( ""); Echo( ""); Echo( ""); Echo( "
".$h."
 
".$h."
"); Echo( "