-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
447 lines (388 loc) · 20.9 KB
/
index.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<?php
session_start();
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="76x76" href="./public/assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="./public/assets/img/favicon.png">
<title>
Election du PCO | JI-2022
</title>
<script src="config/security/deconnexion.js"></script>
<!-- Fonts and icons -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
<!-- Nucleo Icons -->
<link href="./public/assets/css/nucleo-icons.css" rel="stylesheet" />
<link href="./public/assets/css/nucleo-svg.css" rel="stylesheet" />
<!-- Font Awesome Icons -->
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
<!-- Material Icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
<!-- CSS Files -->
<link id="pagestyle" href="./public/assets/css/material-kit.css?v=3.0.0" rel="stylesheet" />
</head>
<body>
<!-- modal -->
<div class="me-2">
<div class="modal fade" id="modal-notification" tabindex="-1" aria-labelledby="modal-notification" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-danger modal-dialog-centered modal-" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title" id="modal-title-notification">Votre attention est requise</h6>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="py-3 text-center">
<i class="ni ni-bell-55 ni-3x"></i>
<h4 class="text-gradient text-danger mt-4">Vous n'être pas autorisé à voter !</h4>
<p>Pour voter vous Veuillez d'abord vous identifier</p>
</div>
</div>
<div class="modal-footer">
<a href="view/sign-in.php" type="button" class="btn btn-secondary">Ok, J'ai compris</a>
<button type="button" class="btn btn-link ml-auto" data-bs-dismiss="modal">Fermer</button>
</div>
</div>
</div>
</div>
</div>
<!-- Navbar Transparent -->
<nav class="navbar navbar-expand-lg position-absolute top-0 z-index-3 w-100 shadow-none my-3 navbar-transparent">
<div class="container">
<a class="navbar-brand text-white " href="#" rel="tooltip" title="Designed and Coded by Creative Tim" data-placement="bottom">
Election du PCO | JI-2022
</a>
<button class="navbar-toggler shadow-none ms-2" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon mt-2">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</span>
</button>
<div class="collapse navbar-collapse w-100 pt-3 pb-2 py-lg-0 ms-lg-12 ps-lg-5" id="navigation">
<ul class="navbar-nav navbar-nav-hover ms-auto">
<!-- <li class="nav-item dropdown dropdown-hover mx-2 ms-lg-6">
<a class="nav-link ps-2 d-flex cursor-pointer align-items-center" id="dropdownMenuPages2" data-bs-toggle="dropdown" aria-expanded="false">
<i class="material-icons opacity-6 me-2 text-md">dashboard</i>
Pages
<img src="./public/assets/img/down-arrow-white.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-block d-none">
<img src="./public/assets/img/down-arrow-dark.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-none d-block">
</a>
</li>
<li class="nav-item dropdown dropdown-hover mx-2">
<a class="nav-link ps-2 d-flex cursor-pointer align-items-center" id="dropdownMenuBlocks" data-bs-toggle="dropdown" aria-expanded="false">
<i class="material-icons opacity-6 me-2 text-md">view_day</i>
Sections
<img src="./public/assets/img/down-arrow-white.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-block d-none">
<img src="./public/assets/img/down-arrow-dark.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-none d-block">
</a>
</li> -->
<li class="nav-item dropdown dropdown-hover mx-2">
<a class="nav-link ps-2 d-flex cursor-pointer align-items-center" id="dropdownMenuDocs" data-bs-toggle="dropdown" aria-expanded="false">
<i class="material-icons opacity-6 me-2 text-md">article</i>
<?php
if (!isset($_SESSION['auth'])) {
echo 'Connexion';
} else {
echo htmlspecialchars($_SESSION['NOM']);
}
?>
<img src="./public/assets/img/down-arrow-white.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-block d-none">
<img src="./public/assets/img/down-arrow-dark.svg" alt="down-arrow" class="arrow ms-auto ms-md-2 d-lg-none d-block">
</a>
<?php
if (!isset($_SESSION['auth'])) {
echo '<ul class="dropdown-menu dropdown-menu-end dropdown-menu-animation dropdown-md dropdown-md-responsive mt-0 mt-lg-3 p-3 border-radius-lg" aria-labelledby="dropdownMenuDocs">
<div class="d-none d-lg-block">
<ul class="list-group">
<li class="nav-item list-group-item border-0 p-0">
<a class="dropdown-item py-2 ps-3 border-radius-md" href="view/sign-in.php">
<h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Connexion</h6>
<span class="text-sm">Cliquer pour vous connecter</span>
</a>
</li>
</ul>
</div>
</ul>';
} else {
echo '<ul class="dropdown-menu dropdown-menu-end dropdown-menu-animation dropdown-md dropdown-md-responsive mt-0 mt-lg-3 p-3 border-radius-lg" aria-labelledby="dropdownMenuDocs">
<div class="d-none d-lg-block">
<ul class="list-group">
<li class="nav-item list-group-item border-0 p-0">
<a class="dropdown-item py-2 ps-3 border-radius-md" href="config/security/deconnexion.php">
<h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Déconnexion</h6>
<span class="text-sm">Cliquer pour vous deconnecter</span>
</a>
</li>
</ul>
</div>
</ul>';
}
?>
</li>
<?php
if (!isset($_SESSION['admin'])) {
echo '<button type="button" class="btn bg-gradient-primary btn-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" title="Désolé, vous n\'être pas membre du jury." data-container="body" data-animation="true">Pour les jurés</button>
';
} else {
echo '<li class="nav-item ms-lg-auto my-auto ms-3 ms-lg-0 mt-2 mt-lg-0">
<a href="admin/index.php" class="btn btn-sm bg-gradient-primary mb-0 me-1 mt-2 mt-md-0">Pour les jurés</a>
</li>';
}
?>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<div class="page-header min-vh-80" style="background-image: url('https://images.unsplash.com/photo-1630752708689-02c8636b9141?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2490&q=80')">
<span class="mask bg-gradient-dark opacity-6"></span>
<div class="container">
<div class="row">
<div class="col-md-8 mx-auto">
<div class="text-center">
<h1 class="text-white">Bienvenue sur la plateforme de l'élection du PCO pour le JI-2022</h1>
<h3 class="text-white">Je donne ma voix et c'est la JI qui gagne</h3>
</div>
</div>
</div>
</div>
</div>
<div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6">
<?php require_once 'model/listeCandidat.php';
?>
</div>
<footer class="footer pt-5 mt-5">
<div class="container">
<div class=" row">
<div class="col-md-3 mb-4 ms-auto">
<div>
<a href="#">
<img src="./public/assets/img/logo-ct-dark.png" class="mb-3 footer-logo" alt="main_logo">
</a>
<h6 class="font-weight-bolder mb-4">JI-2022</h6>
</div>
<div>
<ul class="d-flex flex-row ms-n3 nav">
<li class="nav-item">
<a class="nav-link pe-1" href="#" target="_blank">
<i class="fab fa-facebook text-lg opacity-8"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link pe-1" href="#" target="_blank">
<i class="fab fa-twitter text-lg opacity-8"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link pe-1" href="#" target="_blank">
<i class="fab fa-dribbble text-lg opacity-8"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link pe-1" href="#" target="_blank">
<i class="fab fa-github text-lg opacity-8"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link pe-1" href="#" target="_blank">
<i class="fab fa-youtube text-lg opacity-8"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="col-md-2 col-sm-6 col-6 mb-4">
<div>
<h6 class="text-sm">Notre Filière</h6>
<ul class="flex-column ms-n3 nav">
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
A propos
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Cadeaux
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Pourquoi la JI-2022
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Blog
</a>
</li>
</ul>
</div>
</div>
<div class="col-md-2 col-sm-6 col-6 mb-4">
<div>
<h6 class="text-sm">Resources</h6>
<ul class="flex-column ms-n3 nav">
<li class="nav-item">
<a class="nav-link" href="https://iradesign.io/" target="_blank">
Illustrations
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Bits et extraits
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Programme d'affiliation
</a>
</li>
</ul>
</div>
</div>
<div class="col-md-2 col-sm-6 col-6 mb-4">
<div>
<h6 class="text-sm">Support d'aide</h6>
<ul class="flex-column ms-n3 nav">
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Nous contacter
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Centre de connaissances
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Développement personnalisé
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Parrainages
</a>
</li>
</ul>
</div>
</div>
<div class="col-md-2 col-sm-6 col-6 mb-4 me-auto">
<div>
<h6 class="text-sm">Légale</h6>
<ul class="flex-column ms-n3 nav">
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
termes & conditions
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Privacy Policy
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
Licenses (EULA)
</a>
</li>
</ul>
</div>
</div>
<div class="col-12">
<div class="text-center">
<p class="text-dark my-4 text-sm font-weight-normal">
Tous les droits sont réservés. Copyright © <script>
document.write(new Date().getFullYear())
</script> pateforme de vote par <a href="#" target="_blank">MIAGE promo 2019 équipe dev JI-2022</a>.
</p>
</div>
</div>
</div>
</div>
</footer>
The Modal
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Expiration de la session</h4>
</div>
<!-- Modal body -->
<div class="modal-body">
Parce que vous avez été inactif, votre session est sur le point d'expirer.
</div>
<!-- Modal footer -->
<div class="modal-footer">
<a href="view/sign-in.php" class="btn btn-primary btn-sm">Connectez-vous à nouveau</a>
</div>
</div>
</div>
</div>
<!-- Core JS Files -->
<script src="./assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="./assets/js/core/bootstrap.min.js" type="text/javascript"></script>
<script src="./assets/js/plugins/perfect-scrollbar.min.js"></script>
<!-- Plugin for TypedJS, full documentation here: https://github.com/inorganik/CountUp.js -->
<script src="./assets/js/plugins/countup.min.js"></script>
<script src="./assets/js/plugins/choices.min.js"></script>
<script src="./assets/js/plugins/prism.min.js"></script>
<script src="./assets/js/plugins/highlight.min.js"></script>
<!-- Plugin for Parallax, full documentation here: https://github.com/dixonandmoe/rellax -->
<script src="./assets/js/plugins/rellax.min.js"></script>
<!-- Plugin for TiltJS, full documentation here: https://gijsroge.github.io/tilt.js/ -->
<script src="./assets/js/plugins/tilt.min.js"></script>
<!-- Plugin for Selectpicker - ChoicesJS, full documentation here: https://github.com/jshjohnson/Choices -->
<script src="./assets/js/plugins/choices.min.js"></script>
<!-- Plugin for Parallax, full documentation here: https://github.com/wagerfield/parallax -->
<script src="./assets/js/plugins/parallax.min.js"></script>
<!-- Control Center for Material UI Kit: parallax effects, scripts for the example pages etc -->
<!-- Google Maps Plugin -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDTTfWur0PDbZWPr7Pmq8K3jiDp0_xUziI"></script>
<script src="./assets/js/material-kit.min.js?v=3.0.0" type="text/javascript"></script>
<script type="text/javascript">
if (document.getElementById('state1')) {
const countUp = new CountUp('state1', document.getElementById("state1").getAttribute("countTo"));
if (!countUp.error) {
countUp.start();
} else {
console.error(countUp.error);
}
}
if (document.getElementById('state2')) {
const countUp1 = new CountUp('state2', document.getElementById("state2").getAttribute("countTo"));
if (!countUp1.error) {
countUp1.start();
} else {
console.error(countUp1.error);
}
}
if (document.getElementById('state3')) {
const countUp2 = new CountUp('state3', document.getElementById("state3").getAttribute("countTo"));
if (!countUp2.error) {
countUp2.start();
} else {
console.error(countUp2.error);
};
}
</script>
<!-- -------- END FOOTER 5 w/ DARK BACKGROUND ------- -->
<!-- Core JS Files -->
<script src="../public/assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="../public/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
<script src="../public/assets/js/plugins/perfect-scrollbar.min.js"></script>
<!-- Plugin for Parallax, full documentation here: https://github.com/wagerfield/parallax -->
<script src="../public/assets/js/plugins/parallax.min.js"></script>
<!-- Control Center for Material UI Kit: parallax effects, scripts for the example pages etc -->
<!-- Google Maps Plugin -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDTTfWur0PDbZWPr7Pmq8K3jiDp0_xUziI"></script>
<script src="../public/assets/js/material-kit.min.js?v=3.0.0" type="text/javascript"></script>
</body>
</html>