-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomplex.php
162 lines (139 loc) · 6.72 KB
/
complex.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?php
require_once __DIR__ . "/src/Bootstrapper.php";
use Physler\Session\SessionVisitor;
$user = SessionVisitor::GetActive()->GetVisitorUser();
if ($user == false) {
header("Location: /");
die;
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<link rel="manifest" href="/app.webmanifest">
<script src="/pwa_init.js"></script>
<title>PhysiRec</title>
<meta name="theme-color" content="#0A0A0A"/>
<link rel="apple-touch-icon" sizes="180x180" href="/mat/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="/mat/img/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/mat/img/android-chrome-512x512.png">
<link rel="icon" type="image/png" sizes="32x32" href="/mat/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/mat/img/favicon-16x16.png">
<link href="/common/app/imports.css" rel="stylesheet" crossorigin="anonymous">
<script>
var user = <?php echo json_encode($user); ?>;
</script>
<!-- Custom styles for this template -->
<link href="/common/app/complex.css" rel="stylesheet">
<link rel="stylesheet" href="/common/vendor/sweetalert2/sweetalert2.min.css">
<script src="/common/vendor/sweetalert2/sweetalert2.min.js"></script>
<script src="/common/vendor/jquery/script.js"></script>
<script src="/common/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</head>
<body class="dark-mode ambient-lighting">
<div class="loader">
<div class="loader-content">
<i class="fa fa-spinner-third fa-spin"></i>
<div class="loader-context">Downloading content...</div>
</div>
</div>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand me-0 px-3 fs-6" href="#"><img width="120px" src="/mat/img/woosh.png" alt="PhysyRec Logo"></a>
<ul class="pnav">
<?php if ($user->IsStudent()): ?>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/complex.php/dashboard" data-ajax="dashboard">
<i class="fas fa-house"></i>
Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/complex.php/activity" data-ajax="activity">
<i class="fas fa-wave-pulse"></i>
Activity
</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/complex.php/settings" data-ajax="settings">
<i class="fas fa-cogs"></i>
Preferences
</a>
</li>
<li class="nav-item shine" hidefrom="installed">
<a class="nav-link active" aria-current="page" href="/complex.php/install" data-ajax="install">
<i class="fas fa-download"></i>
Install
</a>
</li>
<?php elseif ($user->IsTeacher()): ?>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/complex.php/teachers/dashboard" data-ajax="teachers/dashboard">
<i class="fas fa-house"></i>
Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/complex.php/teachers/students" data-ajax="teachers/students">
<i class="fas fa-screen-users"></i>
Students
</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/complex.php/teachers/access" data-ajax="teachers/access">
<i class="fas fa-users-gear"></i>
Collaborators
</a>
</li>
<?php if($user->IsSuperuser()): ?>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/complex.php/admin/console" data-ajax="admin/console">
<i class="fas fa-user-shield"></i>
Superuser
</a>
</li>
<?php endif; ?>
<li class="nav-item shine" hidefrom="installed">
<a class="nav-link active" aria-current="page" href="/complex.php/install" data-ajax="install">
<i class="fas fa-download"></i>
Install
</a>
</li>
<?php endif; ?>
</ul>
<div class="navbar-nav">
<div class="nav-item text-nowrap mx-2">
<span class="me-1"><?= $user->display_name ?></span>
<img class="rounded" width="25px" src="<?= $user->profile_picture ?>" alt="Google Profile Picture">
</div>
</div>
</header>
<div class="scroll-container">
<div class="row">
<main class="col-md-9 px-md-4 page-shown mx-auto" id="ajax-container">
</main>
</div>
<div class="fixed-bottom mobile-navbar-bg">
<div class="mobile-navbar">
<?php if ($user->IsStudent()): ?>
<button class="nav-btn active" data-ajax="dashboard" aria-label="Home"><i class="fa-home"></i></button>
<button class="nav-btn" data-ajax="activity" aria-label="Activity"><i class="fa-wave-pulse"></i></button>
<button class="nav-btn" data-ajax="settings" aria-label="Preferences"><i class="fa-cogs"></i></button>
<?php elseif ($user->IsTeacher()): ?>
<button class="nav-btn active" data-ajax="teachers/dashboard" aria-label="Home"><i class="fa-home"></i></button>
<button class="nav-btn" data-ajax="teachers/students" aria-label="Students"><i class="fa-screen-users"></i></button>
<button class="nav-btn" data-ajax="teachers/access" aria-label="Collaborators"><i class="fa-users-gear"></i></button>
<?php if($user->IsSuperuser()): ?>
<button class="nav-btn" data-ajax="admin/console" aria-label="Superuser"><i class="fa-user-shield"></i></button>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
<script src="/common/vendor/feather-icons/dist/feather.min.js"></script>
<script src="/common/vendor/chart-js/dist/chart.min.js"></script>
<script src="/common/app/complex.js"></script>
<!-- <script src="/common/vendor/duration-picker/out.js"></script> -->
</body>
</html>