2020-03-09 16:49:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
require 'conn.php';
|
|
|
|
|
|
|
|
$result = $conn->query("SELECT * FROM docenten WHERE username = '" . $_SESSION['username'] . "';");
|
|
|
|
|
|
|
|
$docent = $result->fetch_assoc();
|
2020-03-09 19:09:41 +01:00
|
|
|
|
|
|
|
if (isset($_GET['date'])) {
|
|
|
|
$date = date("Y-m-d", strtotime($_GET['date']));
|
|
|
|
} else {
|
|
|
|
$date = date("Y-m-d"); // Create date in mysql DATE format.
|
|
|
|
}
|
|
|
|
|
|
|
|
$rooster = $conn->query("SELECT * FROM rooster WHERE docent = " . $docent['id'] . " AND dag = DATE('" . $date . "')")->fetch_assoc();
|