-
Notifications
You must be signed in to change notification settings - Fork 1
/
blank_page.php
74 lines (66 loc) · 2.1 KB
/
blank_page.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
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
<?php
/**
* File: blank_page.php
*
* Blank page
*
* @see https://github.com/AlandSailingRobots/SailingRobotsWebsite
*/
session_start();
define('__ROOT__', dirname(__FILE__));
require_once __ROOT__.'/globalsettings.php';
$relative_path = './';
// If we are connected
if (isset($_SESSION['id']) AND isset($_SESSION['username'])) {
// TODO
$connected = true;
} else {
$connected = false;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php // Head of the HTML document
require $relative_path . 'include/head.php';
?>
</head>
<body class="nav-md">
<div class="container body">
<!-- sidebar -->
<?php require $relative_path . 'include/sidebar.php'; ?>
<!-- /sidebar -->
<!-- top navigation -->
<?php require $relative_path . 'include/top_navigation.php'; ?>
<!-- /top navigation -->
<!-- page content -->
<div class="right_col" role="main">
<?php
if ($connected and $_SESSION['right'] == 'admin') {
echo '<p> You are an ' . $_SESSION['right'] . '! ';
} elseif ($connected) {
echo '<p> You don\'t have the right to view this webpage </p>';
} else {
echo '<p> Vous must log-in to view this page. Click <strong><a href='
.$relative_path.'pages/users/login.php">here</a></strong> to log-in. </p>';
}
?>
</div>
<!-- /page content -->
<!-- footer content -->
<?php require $relative_path . 'include/footer.php'; ?>
<!-- /footer content -->
</div>
<!-- ########################## JAVASCRIPT ########################## -->
<?php // Not very clean, but the default configs includes too many JS for a beginner
// That way, main file is 'clean' ?>
<?php //require $relative_path . 'include/js_scripts.php'; ?>
<!-- jQuery -->
<script src=<?php echo $relative_path."assets/vendors/jquery/dist/jquery.min.js"?>></script>
<!-- Bootstrap -->
<script src=<?php echo $relative_path."assets/vendors/bootstrap/dist/js/bootstrap.min.js"?>></script>
<!-- Custom Theme Scripts -->
<script src=<?php echo $relative_path."assets/js/custom.min.js"?>></script>
<!-- ########################## JAVASCRIPT ########################## -->
</body>
</html>