} else { echo get_vocab("time"); } echo '</th>' . PHP_EOL; $room_column_width = (int) (90 / grr_sql_count($res)); $nbcol = 0; $rooms = array(); $a = 0; for ($i = 0; $row = grr_sql_row($res, $i); $i++) { $id_room[$i] = $row['2']; $nbcol++; if (verif_acces_ressource(getUserName(), $id_room[$i])) { $room_name[$i] = $row['0']; $statut_room[$id_room[$i]] = $row['4']; $statut_moderate[$id_room[$i]] = $row['7']; $acces_fiche_reservation = verif_acces_fiche_reservation(getUserName(), $id_room[$i]); if ($row['1'] && $_GET['pview'] != 1) { $temp = '<br /><span class="small">(' . $row['1'] . ' ' . ($row['1'] > 1 ? get_vocab("number_max2") : get_vocab("number_max")) . ')</span>' . PHP_EOL; } else { $temp = ''; } if ($statut_room[$id_room[$i]] == "0" && $_GET['pview'] != 1) { $temp .= '<br /><span class="texte_ress_tempo_indispo">' . get_vocab("ressource_temporairement_indisponible") . '</span>' . PHP_EOL; } if ($statut_moderate[$id_room[$i]] == "1" && $_GET['pview'] != 1) { $temp .= '<br /><span class="texte_ress_moderee">' . get_vocab("reservations_moderees") . '</span>' . PHP_EOL; } echo '<th style="width:' . $room_column_width . '%;" '; if ($statut_room[$id_room[$i]] == "0") { echo 'class="avertissement" '; }
echo '<h4 class="titre">' . ucfirst($this_area_name) . ' - ' . get_vocab("all_areas") . '<br>' . ucfirst(utf8_strftime("%B %Y", $month_start)) . ' </h4>' . PHP_EOL; if ($_GET['pview'] != 1) { echo ' <a href="month_all2.php?year=' . $year . '&month=' . $month . '&area=' . $area . '"><img src="img_grr/change_view.png" alt="' . get_vocab("change_view") . '" title="' . get_vocab("change_view") . '" class="image" /></a>' . PHP_EOL; } echo '</div>' . PHP_EOL; if (isset($_GET['precedent'])) { if ($_GET['pview'] == 1 && $_GET['precedent'] == 1) { echo '<span id="lienPrecedent">' . PHP_EOL; echo '<button class="btn btn-default btn-xs" onclick="charger();javascript:history.back();">Précedent</button>' . PHP_EOL; echo '</span>' . PHP_EOL; } } echo '<div class="contenu_planning">' . PHP_EOL; for ($i = 0; $row = grr_sql_row($res, $i); $i++) { $verif_acces_ressource[$row[10]] = verif_acces_ressource(getUserName(), $row[10]); $acces_fiche_reservation[$row[10]] = verif_acces_fiche_reservation(getUserName(), $row[10]); $t = max((int) $row[0], $month_start); $end_t = min((int) $row[1], $month_end); $day_num = date("j", $t); if ($enable_periods == 'y') { $midnight = mktime(12, 0, 0, $month, $day_num, $year); } else { $midnight = mktime(0, 0, 0, $month, $day_num, $year); } while ($t < $end_t) { $d[$day_num]["id"][] = $row[2]; $d[$day_num]["id_room"][] = $row[10]; if (Settings::get("display_info_bulle") == 1) { $d[$day_num]["who"][] = get_vocab("reservee au nom de") . affiche_nom_prenom_email($row[4], $row[9], "nomail"); } else { if (Settings::get("display_info_bulle") == 2) {
$tplArray['vocab']['fiche_ressource'] = get_vocab('fiche_ressource'); $tplArray['vocab']['ressource_actuellement_empruntee'] = get_vocab('ressource actuellement empruntee'); $tplArray['vocab']['reservation_a_confirmer_au_plus_tard_le'] = get_vocab('reservation_a_confirmer_au_plus_tard_le'); $tplArray['vocab']['en_attente_moderation'] = get_vocab('en_attente_moderation'); $tplArray['vocab']['reservation_impossible'] = get_vocab('reservation_impossible'); $tplArray['vocab']['cliquez_pour_effectuer_une_reservation'] = get_vocab('cliquez_pour_effectuer_une_reservation'); $tplArray['vocab']['top_of_page'] = get_vocab('top_of_page'); $li = 0; /* incrément des room accessibles, todo peut faire dvoublon avec $li, à refactoriser */ $incrementRoomAccessible = 0; for ($ir = 0; $row = grr_sql_row($res, $ir); $ir++) { /* un tour de boucle par room */ $verif_acces_ressource = verif_acces_ressource(getUserName(), $row['2']); if ($verif_acces_ressource) { /* l'incrément est différent de celui de la boucle si certaines room ne sont pas accessibles */ $acces_fiche_reservation = verif_acces_fiche_reservation(getUserName(), $row['2']); $UserRoomMaxBooking = UserRoomMaxBooking(getUserName(), $row['2'], 1); $authGetUserLevel = authGetUserLevel(getUserName(), -1); $auth_visiteur = auth_visiteur(getUserName(), $row['2']); $tplArray['rooms'][$incrementRoomAccessible]['id'] = $row[2]; $tplArray['rooms'][$incrementRoomAccessible]['capacity'] = $row[1]; $tplArray['rooms'][$incrementRoomAccessible]['description'] = $row[3]; //echo '<tr>'.PHP_EOL; /* remplacé par la class "table_stripped de bootstrap */ /*if ($ir % 2 == 1) { echo tdcell('cell_hours'); } else { echo tdcell('cell_hours2'); }*/ /*echo '<a title="'.htmlspecialchars(get_vocab('see_week_for_this_room')).'" href="week.php?year='.$year.'&month='.$month.'&day='.$day.'&area='.$area.'&room='.$row['2'].'">'.htmlspecialchars($row[0]).'</a><br />'.PHP_EOL;*/ /**
} header("Location: ".$_GET['back'].""); die(); } } #If we dont know the right date then make it up if(!isset($day) or !isset($month) or !isset($year)) { $day = date("d"); $month = date("m"); $year = date("Y"); } // Calcul du niveau d'accès aux fiche de réservation détaillées des ressources if (!verif_acces_fiche_reservation(getUserName(), $room_id)) { showAccessDenied($day, $month, $year, $area,$back); exit(); } // Fichiers de personnalisation de langue pour le domaine if (@file_exists("language/lang_subst_".$area.".".$locale)) include "language/lang_subst_".$area.".".$locale; if((authGetUserLevel(getUserName(),-1) < 1) and (getSettingValue("authentification_obli")==1)) { showAccessDenied($day, $month, $year, $area,$back); exit(); }