-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewCalendar.php
40 lines (36 loc) · 1.16 KB
/
viewCalendar.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
31
32
33
34
35
36
37
38
39
40
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Car Booking | View Calendar</title>
<link rel="stylesheet" href="css/stylesheet.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/calendar_stylesheet.css" type="text/css" media="screen" />
</head>
<body>
<div id="page">
<?php include_once('includes/header.php'); ?>
<?php include_once('includes/menu.php'); ?>
<div id="content">
<?php
// Checked that user is logged in and may access this page
if (isset($_SESSION["userId"])) {
require_once('includes/calendar.php');
if (isset($_GET["navMonth"])) {
$month = $_GET["navMonth"];
$year = $_GET["navYear"];
} // if
else {
$month = date('m');
$year = date('Y');
} // else
renderCalendar($month, $year);
} // if
else {
echo "You are not authorised to view this page. Please <a href='login.php'>login</a>.";
} // else
?>
</div> <!-- content -->
<?php include_once('includes/footer.php'); ?>
</div> <!-- page -->
</body>
</html>