-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhistorique.php
123 lines (120 loc) · 6.06 KB
/
historique.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
<?php
require_once('includes/load.php');
$user = current_user();
page_require_level(2);
if (!$session->isUserLoggedIn(true)) {
redirect('index', false);
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="Croix rouge ixelles - Préventif" />
<title>Historique - Hélio</title>
<link rel="icon" type="image/png" href="./libs/img/helio-blanc.png" />
<link href="./libs/css/bootstrap-icons.css" rel="stylesheet" />
<link href="./libs/css/styles.css" rel="stylesheet" />
<link href='./libs/css/bootstrap.css' rel='stylesheet' />
<link href='fullcalendar/main.css' rel='stylesheet' />
<script src='fullcalendar/main.js'></script>
<script src='fullcalendar/locales/fr.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
allDaySlot: false,
weekNumbers: true,
weekText: "",
height: 900,
headerToolbar: {
start: 'title',
center: '',
end: 'today prev,next'
},
buttonText: {
today: 'Cette semaine',
},
initialView: 'listWeek',
events: 'loadhisto.php',
eventColor: '#db3434',
eventClick: function(info) {
titleeventdate = info.event.title;
titreevent = titleeventdate.split(" | ");
troisdateevent = titreevent[3];
deuxdateevent = troisdateevent.split("-");
dateevent = deuxdateevent[2] + "-" + deuxdateevent[1] + "-" + deuxdateevent[0];
window.location = "eventadmin?nom=" + titreevent[2] + "DATE" + dateevent;
}
});
calendar.render();
calendar.setOption('locale', 'fr');
});
</script>
</head>
<body class="d-flex flex-column h-100">
<main class="flex-shrink-0">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container px-6">
<a href="index">
<img class="navbar-brand" src="./libs/img/helio-blanc.png" height="60" wight="60">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item"><a class="nav-link" href="index">Accueil</a></li>
<li class="nav-item"><a class="nav-link" href="prev-att">Liste Préventifs</a></li>
<?php if ($user['user_level'] == 1 || $user['user_level'] == 2) : ?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownBlog" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Volontaires</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownBlog">
<li><a class="dropdown-item" href="utilisateuradmin">Gestion volontaires</a></li>
<li><a class="dropdown-item" href="view_alluser">Voir les statistiques</a></li>
<li><a class="dropdown-item" href="ajout_utilisateur">Ajouter volontaires</a></li>
</ul>
</li>
<?php else : ?>
<li class="nav-item"><a class="nav-link" href="utilisateur">Volontaires</a></li>
<?php endif; ?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownBlog" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Profil</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownBlog">
<li><a class="dropdown-item" href="icsurl">Exporter calendrier</a></li>
<li><a class="dropdown-item" href="changer_mdp">Changer de mots de passe</a></li>
<li><a class="dropdown-item" href="logout">Déconnexion</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section class="py-3">
<div class="container">
<div class="text-center mb-5">
<h1 class="fw-bolder">Historique</h1>
<p class="lead fw-normal text-muted mb-0">Par semaine</p>
<div id='calendar'></div>
</div>
<div id='calendar'></div>
<div class="row gx-5">
</div>
</section>
</main>
<footer class="bg-dark py-4 mt-auto">
<div class="container px-5">
<div class="row align-items-center justify-content-between flex-column flex-sm-row">
<div class="col-auto">
<div class="small m-0 text-white">Copyright © Helio 2021</div>
</div>
<div class="col-auto">
<span class="text-white mx-1">·</span>
<a class="link-light small" href="./credits.php">Crédits</a>
<span class="text-white mx-1">·</span>
</div>
</div>
</div>
</footer>
<script src="./libs/js/bootstrap.bundle.min.js"></script>
</body>
</html>