-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_by_week.php
30 lines (29 loc) · 1.42 KB
/
search_by_week.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$title = '«Αναζήτηση Απουσίας Μαθητή ΣΠΗΥ»';
include('templates/header.inc.php');
check_session();
if ($_SESSION['username'] == "diaxstis") {
require_once('includes/mysqli_connect.php');
?>
<h2>Αναζήτηση απουσιών μαθητών ΣΠΗΥ ανά εβδομάδα του έτους</h2>
<p>Αναζητήστε απουσίες μαθητών ΣΠΗΥ</p>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$search = $_POST['week'];
$query = "SELECT id_apousies, imerominia, id_seires, seires_name, id_students, vathmoi_abbr, spec_abbr, students_surname, students_name, id_aitia, aitia, tekmiriosi, id_roles, roles, xronosfragida
FROM apousies NATURAL JOIN students NATURAL JOIN vathmoi NATURAL JOIN specialization NATURAL JOIN seires NATURAL JOIN aitia NATURAL JOIN roles WHERE apousia = 1 AND stud_deleted = 0 AND deleted = 0 AND week(imerominia) = ? ORDER BY imerominia, xronosfragida, students_surname, students_name, seires_name";
apousies_form ($dbc, $query, $search);
}
mysqli_close($dbc);
include('templates/footer.inc.php');
?>
</body>
</html>
<?php
ob_end_flush(); // Αποστολή του buffer στον browser και απενεργοποίηση output buffering
} else {
$title = 'Σφάλμα πρόσβασης';
print "<p>Δεν έχετε δικαίωμα πρόσβασης σε αυτή τη σελίδα.";
include('templates/footer.inc.php');
}
?>