$eveningends = 12; $eveningends_minutes = count($periods_name) - 1; } // Si format imprimable ($_GET['pview'] = 1), on n'affiche pas cette partie if ($_GET['pview'] != 1) { echo "<table width=\"100%\" cellspacing=\"15\" border=\"0\"><tr>"; if (isset($_SESSION['default_list_type']) || Settings::get("authentification_obli") == 1) { $area_list_format = $_SESSION['default_list_type']; } else { $area_list_format = Settings::get("area_list_format"); } //show either a select box or the normal html list if ($area_list_format != "list") { echo "<td>\n"; echo make_site_select_html('year.php', $id_site, $from_year, $from_month, $day, getUserName()); echo make_area_select_html('year.php', $id_site, $area, $from_year, $from_month, $day, getUserName()); echo "</td>\n"; } else { echo "<td>\n"; echo make_site_list_html('year.php', $id_site, $from_year, $from_month, $day, getUserName()); echo "</td><td>"; echo make_area_list_html('year.php', $id_site, $area, $from_year, $from_month, $day, getUserName()); echo "</td>\n"; } echo "\n<td><form method=\"get\" action=\"year.php\">"; echo "<table border=\"0\">\n"; echo "<tr><td>" . get_vocab("report_start") . get_vocab("deux_points") . "</td>"; echo "<td>"; echo genDateSelector("from_", "", $from_month, $from_year, ""); echo "</td></tr>"; echo "<tr><td>" . get_vocab("report_end") . get_vocab("deux_points");
} else { $midnight[$j] = mktime(12, 0, 0, $month, $j, $year, is_dst($month, $j, $year, 0)); $midnight_tonight[$j] = mktime(12, count($periods), 59, $month, $j, $year, is_dst($month, $j, $year, 23)); } } if ($pview != 1) { # Table with areas, rooms, minicals. echo "<table width=\"100%\"><tr>"; $this_area_name = ""; $this_room_name = ""; # Show all areas echo "<td width=\"30%\"><u>" . get_string('areas', 'block_mrbs') . "</u><br>"; } # show either a select box or the normal html list if ($area_list_format == "select") { echo make_area_select_html('month.php', $area, $year, $month, $day); # from functions.php $this_area_name = sql_query1("select area_name from {$tbl_area} where id={$area}"); $this_room_name = sql_query1("select room_name from {$tbl_room} where id={$room}"); } else { $sql = "select id, area_name from {$tbl_area} order by area_name"; $res = sql_query($sql); if ($res) { for ($i = 0; $row = sql_row($res, $i); $i++) { if ($pview != 1) { echo "<a href=\"month.php?year={$year}&month={$month}&area={$row['0']}\">"; } if ($row[0] == $area) { $this_area_name = htmlspecialchars($row[1]); if ($pview != 1) { echo "<font color=\"red\">{$this_area_name}</font></a><br>\n";
$result = strftime($format, $time); $result = utf8_convert_from_locale($result, $temp_locale); // Restore the original locale if (!empty($temp_locale)) { setlocale(LC_TIME, $old_locale); } return $result; }*/ $user = $_GET['user']; print_header($day, $month, $year, $user); echo "<div id=\"dwm_header\" class=\"screenonly\">\n"; echo make_area_select_html('temp.php', $user, $year, $month, $day); if (!$display_calendar_bottom) { minicals($year, $month, $day, $area, $room, 'temp', $user); } echo "</div>\n"; if (!isset($_GET['user'])) { echo '<h1>Select your log</h1>'; $sql = "SELECT DISTINCT team\n FROM users"; $result = $sql_mysqli_conn->query($sql); while ($row = $result->fetch_assoc()) { $team = $row['team']; if ($team != 'test') { echo '<h2>' . $team . '</h2>'; $sql2 = "SELECT * FROM users WHERE team ='" . $team . "' ORDER BY name "; $result2 = $sql_mysqli_conn->query($sql2); while ($row2 = $result2->fetch_assoc()) {
if ($_GET['pview'] != 1) { # Table with areas, rooms, minicals. echo "\n<table width=\"100%\" cellspacing=\"15\"><tr>\n"; $this_area_name = ""; if (isset($_SESSION['default_list_type']) or (getSettingValue("authentification_obli")==1)) { $area_list_format = $_SESSION['default_list_type']; } else { $area_list_format = getSettingValue("area_list_format"); } # Sélection des sites, domaines et ressources if ($area_list_format != "list") { # Sélection sous la forme de listes déroulantes echo "<td>\n"; echo make_site_select_html('week_all.php',$id_site,$year,$month,$day,getUserName()); echo make_area_select_html('week_all.php',$id_site, $area, $year, $month, $day, getUserName()); # from functions.inc.php echo make_room_select_html('week', $area, $room, $year, $month, $day); echo "</td>\n"; } else { # Sélection sous la forme de listes echo "<td>\n"; echo make_site_list_html('week_all.php',$id_site,$year,$month,$day,getUserName()); echo "</td><td>"; echo make_area_list_html('week_all.php',$id_site, $area, $year, $month, $day, getUserName()); # from functions.inc.php echo "</td>\n<td>\n"; make_room_list_html('week.php', $area, $room, $year, $month, $day); echo "</td>\n\n"; } #Draw the three month calendars minicals($year, $month, $day, $area, '', 'week_all');
if ($_GET['pview'] != 1) { #Table avec areas, rooms, minicals. echo "<table width=\"100%\" cellspacing=\"15\"><tr>"; $this_area_name = ""; $this_room_name = ""; if (isset($_SESSION['default_list_type']) or (getSettingValue("authentification_obli")==1)) $area_list_format = $_SESSION['default_list_type']; else $area_list_format = getSettingValue("area_list_format"); # Sélection des sites, domaines et ressources if ($area_list_format != "list") { # Sélection sous la forme de listes déroulantes echo "<td>\n"; echo make_site_select_html($type_month_all.'.php',$id_site,$year,$month,$day,getUserName()); echo make_area_select_html($type_month_all.'.php',$id_site, $area, $year, $month, $day, getUserName()); echo make_room_select_html('month',$area, $room, $year, $month, $day); echo "</td>\n"; } else { # Sélection sous la forme de listes echo "<td>\n"; echo make_site_list_html($type_month_all.'.php',$id_site,$year,$month,$day,getUserName()); echo "</td><td>"; echo make_area_list_html($type_month_all.'.php',$id_site, $area, $year, $month, $day, getUserName()); echo "</td>\n<td>\n"; make_room_list_html('month.php', $area, $room, $year, $month, $day); echo "</td>\n\n"; } #Affiche le calendrier des mois minicals($year, $month, $day, $area, $room, 'month');
} // Section with areas, rooms, minicals. ?> <div class="screenonly"> <div id="dwm_header"> <?php // Get the area and room names (we will need them later for the heading) $this_area_name = ""; $this_room_name = ""; $this_area_name = sql_query1("SELECT area_name FROM {$tbl_area} WHERE id={$area} AND disabled=0 LIMIT 1"); $this_room_name = sql_query1("SELECT room_name FROM {$tbl_room} WHERE id={$room} AND disabled=0 LIMIT 1"); // The room is invalid if it doesn't exist, or else it has been disabled, either explicitly // or implicitly because the area has been disabled $room_invalid = $this_area_name === -1 || $this_room_name === -1; // Show all available areas echo make_area_select_html('week', $area, $year, $month, $day); // Show all available rooms in the current area: echo make_room_select_html('week', $area, $room, $year, $month, $day); // Draw the three month calendars minicals($year, $month, $day, $area, $room, 'week'); echo "</div>\n"; // End of "screenonly" div echo "</div>\n"; // Don't continue if this room is invalid, which could be because the area // has no rooms, or else the room or area has been disabled if ($room_invalid) { echo "<h1>" . get_vocab("no_rooms_for_area") . "</h1>"; require_once "trailer.inc"; exit; } // Show area and room:
echo "<table width=\"100%\" cellspacing=\"15\"><tr>\n"; if (isset($_SESSION['default_list_type']) or (getSettingValue("authentification_obli")==1)) { $area_list_format = $_SESSION['default_list_type']; } else { $area_list_format = getSettingValue("area_list_format"); } # Sélection des sites, domaines et ressources if ($area_list_format != "list") { # Sélection sous la forme de listes déroulantes echo "<td>\n"; echo make_site_select_html('day.php',$id_site,$year,$month,$day,getUserName()); echo make_area_select_html('day.php',$id_site,$area,$year,$month,$day,getUserName()); echo make_room_select_html('week',$area,"",$year,$month,$day); echo "</td>\n"; } else { # Sélection sous la forme de listes echo "<td>\n"; echo make_site_list_html('day.php',$id_site,$year,$month,$day,getUserName()); echo "</td><td>"; echo make_area_list_html('day.php',$id_site,$area,$year,$month,$day,getUserName()); echo "</td><td>"; make_room_list_html('week.php',$area,"",$year,$month,$day); echo "</td>"; } #Affichage des calendriers minicals($year, $month, $day, $area, -1, 'day');