"Prima ora
7:50 - 8:50",
2 => "Seconda ora
8:50 - 9:45",
3 => "Terza ora
9:55 - 10:50",
4 => "Quarta ora
10:50 - 11:45",
5 => "Quinta ora
11:55 - 12:50",
6 => "Sesta ora
12:50 - 13:50"
];
if ($teacher == "No Lezione" || $teacher == "sconosciuto") {
header("Location: index.php");
exit;
}
else if (!isset($_GET['teacher'])) {
header("Location: index.php");
exit;
}
$teacher = $conn->real_escape_string($_GET['teacher']);
$res = $conn->query("SELECT DISTINCT teacher FROM subjects WHERE teacher = '$teacher' LIMIT 1");
if ($res->num_rows === 0) {
header("Location: index.php");
exit;
}
?>
$d"; ?> | ||
---|---|---|
$hlabel | "; foreach($days as $d){ $q = $conn->query("SELECT subjects.name, classes.name AS class_name, subjects.room FROM timetable LEFT JOIN subjects ON timetable.subject_id = subjects.id LEFT JOIN classes ON timetable.class_id = classes.id WHERE subjects.teacher='$teacher' AND timetable.day='$d' AND timetable.hour=$hnum"); if($row = $q->fetch_assoc()){ echo "
{$row['name']}
{$row['class_name']}
{$row['room']}
| ";
} else {
echo ""; } } echo " |
Copyright (C) 2025 EmmeV. All rights reserved.