</div> </div> <div class="box-body"> <?php echo "<h4>" . $dayArr[$dayNum] . " " . $jour . " " . getMonthName($mois) . " " . $annee . " <small class=\"badge bg-blue\" data-toggle=\"tooltip\" title=\"Sélectionnez un poste pour y faire une réservation et laissez-vous guider par la procédure\"><i class=\"fa fa-info\"></i></small></h4>"; echo "<p>Horaires d'ouverture : " . getHoraireTexte($dayNum, $epn) . "</p>"; // Affichage des machines // et affichage du planning // on efface d'eventuel session restante unset($_SESSION['resa']); // on garde l'url d'origine pour la redirection a la fin de l'enregistrement de la resa $_SESSION['resa']['url'] = $_SERVER['REQUEST_URI']; // on stocke la date du jour de la resa $_SESSION['resa']['date'] = $annee . "-" . $mois . "-" . $jour; $row = getHoraire($dayNum, $epn); $table = getPlanning($_SESSION['resa']['date'], $row["hor1_begin_horaire"], $row["hor1_end_horaire"], $row["hor2_begin_horaire"], $row["hor2_end_horaire"], $epn, $salle); if ($table != FALSE) { // affichage du planning echo $table; echo '</div></div>'; // fin du cadre avec les plages horaires et planning // Affichage des reservations par utilisateur pour les admins if ($_SESSION['status'] == 3 or $_SESSION['status'] == 4) { $resultresa = getResa('All', $_SESSION['resa']['date'], $salle); ?> <div class="box box-info"><div class="box-header"><h3 class="box-title">Réservation par utilisateur</h3></div> <div class="box-body no-padding"><table class="table table-condensed"> <thead><tr> <th></th>
include/user_reservation_form.php V0.1 */ // fonctions additionnelles $semaine = get_lundi_dimanche_from_week(date('W')); $date1 = strftime("%Y-%m-%d", $semaine[0]); $date2 = strftime("%Y-%m-%d", $semaine[1]); $epn = $_GET["idepn"]; // affichage de form de reservation if (FALSE != is_numeric($_GET["idcomp"])) { // initialisation $step1 = 'step'; $step2 = 'step'; $step3 = 'step'; // affichage des etapes $row = getHoraire(date("N", strtotime($_SESSION['resa']['date'])), $epn); switch ($step) { default: // etape 1: choix de l'heure de debut $step1 = 'currentStep'; $submit = 'Etape suivante'; //recuperation des GET $_SESSION['resa']['idcomp'] = $_GET['idcomp']; $_SESSION['resa']['nomcomp'] = $_GET['nomcomp']; $_SESSION['resa']['materiel'] = getMateriel($_GET['idcomp']); $titre = 'Choix de l\'heure de début de la réservation'; $step = getResaComp(1, $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], getHorDebutSelect(getConfig("unit_config", "unit_default_config", $epn), $row["hor1_begin_horaire"], $row["hor1_end_horaire"], $row["hor2_begin_horaire"], $row["hor2_end_horaire"], $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], $_SESSION['debut'])); break; case 2: // etape 2 dure $step2 = 'currentStep';
<div class="box-body no-padding"> <?php $dayArray = array("", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"); if ($_GET["mess"] == "Hwrong") { echo getError(15); } $table = " <table class=\"table\">\n <form method=\"post\" action=\"index.php?a=42\">\r\n\n <tr>\r\n\n <th style=\"width: 10px\"> </th>\n\t\t\t <th>TRANCHE 1 (Matin)</th>\n\t\t\t <th>TRANCHE 2 (Apres-midi)</th></tr>\r\n"; // affichage for ($i = 1; $i < 8; $i++) { if ($i != $_GET["dayline"]) { $color = "#EEEEEE"; } else { $color = "#CC9999"; } $row = getHoraire($i, $epn); $table .= "<tr><td>" . $dayArray[$i] . "</td>"; $table .= "<td>de "; // H1 begin // tableau des heures $H = ""; $H .= "<option value=\"\"></option>\r\n"; // $H .= "<option value=\"0\">Fermé</option>\r\n" ; for ($a = 6; $a <= 23; $a++) { if (strlen($a) < 2) { $a = "0" . $a; } $M = ""; for ($b = 0; $b <= 59; $b = $b + 15) { if ($row["hor1_begin_horaire"] == convertHoraire($a . "h" . $b)) { $select = "selected";
function checkHoraireDay($j, $m, $y, $epn) { $row = getHoraire(date("w", mktime(0, 0, 0, $m, $j, $y)), $epn); if ($row["hor1_begin_horaire"] == 0 and $row["hor1_end_horaire"] == 0 and $row["hor2_begin_horaire"] == 0 and $row["hor2_end_horaire"] == 0) { return FALSE; } else { return TRUE; } }