-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.php
More file actions
101 lines (90 loc) · 3.33 KB
/
layout.php
File metadata and controls
101 lines (90 loc) · 3.33 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
// layout.php
?>
<!DOCTYPE html>
<html class="h-100" lang="pt">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title><?= isset($pageTitle) ? $pageTitle : "Projeto Labirinto" ?></title>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
>
<link rel="stylesheet" href="css/styles.css">
</head>
<body class="d-flex flex-column h-100 bg-light">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container d-flex justify-content-between align-items-center">
<div class="navbar-brand d-flex align-items-center">
<img
src="images/rgb_ista_pt_horizontal_negative.png"
alt="ISCTE Logo"
style="height: 40px;"
class="mr-2"
>
<span>Projeto Labirinto</span>
</div>
<?php if (isset($_SESSION['dbUser'])): ?>
<div class="d-flex align-items-center">
<!-- Show the current user next to the user icon -->
<div class="text-white mr-3">
<?= htmlspecialchars($_SESSION['dbUser']) ?>
</div>
<!-- Link to user_details.php -->
<a href="user_details.php" class="mr-3">
<img
src="images/user_icon.png"
alt="User Icon"
style="height: 30px;"
>
</a>
<!-- Link to the Marsamis chart -->
<a href="marsamis_chart.php" class="mr-3">
<img
src="images/bar-chart.png"
alt="Bar Chart"
style="height: 30px;"
>
</a>
<!-- Link to the Noise chart -->
<a href="noise_chart.php" class="mr-3">
<img
src="images/line-chart.png"
alt="Line Chart"
style="height: 30px;"
>
</a>
<!-- Logout button -->
<a class="btn btn-outline-light" href="login.php?logout=1">Logout</a>
</div>
<?php else: ?>
<a class="btn btn-outline-light" href="login.php">Login</a>
<?php endif; ?>
</div>
</nav>
<main class="flex-shrink-0">
<div class="container my-4">
<?php
if (isset($contentFile) && file_exists($contentFile)) {
include($contentFile);
} else {
echo "<p>Content file not found.</p>";
}
?>
</div>
</main>
<footer class="bg-dark text-white text-center py-3 mt-auto">
<div class="container">
<p class="mb-0">
Projeto de Integração de Sistemas de Informação Distribuídos <br>
ISCTE - Instituto Universitário de Lisboa
</p>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>