-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.php
453 lines (420 loc) · 14.6 KB
/
dashboard.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
448
449
450
451
452
453
<?php
$thisFileName = basename(__FILE__);
require_once (dirname(__FILE__) . '/Pages/header.php');
require_once (dirname(__FILE__) . '/Classes/Recours.php');
for ($m = 1; $m <= 12; $m++)
{
$month = date('F', mktime(0, 0, 0, $m, 1, date('Y')));
$recoursTotale[$month] = 0;
}
$rec = new recours(-1);
foreach ($rec->getAllrecours() as $key => $row)
$recoursTotale[$row['dateR']]++;
?>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-purple" style="bg-color: #F39C12;">
<div class="inner">
<h3><?=$nbrEtudiant?></h3>
<p>Nombre<br>Étudiants</p>
</div>
<div class="icon">
<i class="ion ion-ios-people"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-indigo">
<div class="inner">
<h3><?=$nbrEnseignant?></h3>
<p>Nombre<br>Enseignants</p>
</div>
<div class="icon">
<i class="ion ion-android-contact"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-blue">
<div class="inner">
<h3><?=$nbrUtilisateur?></h3>
<p>Inscriptions<br>Utilisateurs</p>
</div>
<div class="icon">
<i class="ion ion-person-add"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-pink">
<div class="inner">
<h3><?=$nbrVisiteur?></h3>
<p>Nombre<br>Visiteurs</p>
</div>
<div class="icon">
<i class="ion ion-ios-body"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
</div>
<!-- /.row -->
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-info">
<div class="inner">
<h3><?=$nbrAdministrateur?></h3>
<p>Nombre<br>Administrateurs</p>
</div>
<div class="icon">
<i class="ion ion-person"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-info">
<div class="inner">
<h3><?=$nbrRecours?></h3>
<p>Nombre Totale<br>des Recours</p>
</div>
<div class="icon">
<i class="ion ion-document-text"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-success">
<div class="inner">
<h3><?=$nbrRecoursValidePerc?><sup style="font-size: 22px">%</sup></h3>
<p>Recours<br>Validé</p>
</div>
<div class="icon">
<i class="ion ion-checkmark-circled"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-danger">
<div class="inner">
<h3><?=$nbrRecoursRefusePerc?><sup style="font-size: 22px">%</sup></h3>
<p>Recours<br>Refusé</p>
</div>
<div class="icon">
<i class="ion ion-close-circled"></i>
</div>
<?php if ($_SESSION['TU'] == 'Administrateur'): ?>
<a href="./trafic.php" class="small-box-footer">Plus d'info <i class="fas fa-arrow-circle-right"></i></a>
<?php endif; ?>
</div>
</div>
<!-- ./col -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">
<i class="ion ion-stats-bars mr-1"></i>
Statut Des Recours
</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse">
<i class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="row">
<div class="col-md-8">
<p class="text-center">
<strong>Recours: 1 Sep, 2019 - 30 Mai, 2020</strong>
</p>
<div class="chart">
<!-- Rec Chart Canvas -->
<canvas id="recChart" height="180"></canvas>
</div>
<!-- /.chart-responsive -->
</div>
<!-- /.col -->
<div class="col-md-4">
<p class="text-center">
<strong>États des recours</strong>
</p>
<div class="progress-group">
Recours Totale
<span class="float-right"><b><?=$nbrRecours?></b>/<?=$nbrRecours?></span>
<div class="progress progress-sm">
<div class="progress-bar bg-info" style="width: 100%"></div>
</div>
</div>
<!-- /.progress-group -->
<div class="progress-group">
Recours Validé
<span class="float-right"><b><?=$nbrRecoursValide?></b>/<?=$nbrRecours?></span>
<div class="progress progress-sm">
<div class="progress-bar bg-success" style="width: <?=$nbrRecoursValidePerc?>%"></div>
</div>
</div>
<!-- /.progress-group -->
<div class="progress-group">
<span class="progress-text">Recours Refusé</span>
<span class="float-right"><b><?=$nbrRecoursRefuse?></b>/<?=$nbrRecours?></span>
<div class="progress progress-sm">
<div class="progress-bar bg-danger" style="width: <?=$nbrRecoursRefusePerc?>%"></div>
</div>
</div>
<!-- /.progress-group -->
<div class="progress-group">
Recours En Progrès
<span class="float-right"><b><?=$nbrRecoursEnCours?></b>/<?=$nbrRecours?></span>
<div class="progress progress-sm">
<div class="progress-bar bg-warning" style="width: <?=$nbrRecoursEnCoursPerc?>%"></div>
</div>
</div>
<!-- /.progress-group -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.card-footer -->
</div>
<!-- /.card -->
<!-- Main row -->
<div class="row">
<!-- Left col -->
<section class="col-lg-7 connectedSortable">
<div class="card">
<div class="card-header">
<h3 class="card-title">
<i class="ion ion-stats-bars mr-1"></i>
Status Des Utilisateurs
</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse">
<i class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="chart">
<!-- Rec Chart Canvas -->
<canvas id="radarChart" height="200"></canvas>
</div>
</div>
<!-- /.card-footer -->
</div>
<!-- /.card -->
</section>
<!-- /.Left col -->
<section class="col-lg-5 connectedSortable">
<!-- Calendar -->
<div class="card bg-gradient-success">
<div class="card-header border-0">
<h3 class="card-title">
<i class="far fa-calendar-alt mr-1"></i>
Calendrier
</h3>
<!-- tools card -->
<div class="card-tools">
<button type="button" class="btn btn-success btn-sm" data-card-widget="collapse">
<i class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-success btn-sm" data-card-widget="remove">
<i class="fas fa-times"></i>
</button>
</div>
<!-- /. tools -->
</div>
<!-- /.card-header -->
<div class="card-body pt-0">
<!--The calendar -->
<div id="calendar" style="width: 100%"></div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
<!-- /.card-body -->
<div class="d-none">
<div id="sparkline-1"></div>
<!-- ./col -->
<div id="sparkline-2"></div>
<!-- ./col -->
<div id="sparkline-3"></div>
<!-- ./col -->
</div>
<!-- /.row -->
<!-- /.card -->
</section>
<!-- right col -->
</div>
<!-- /.row (main row) -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
<script>
$(function () {
'use strict'
// The Calendar
$('#calendar').datetimepicker({
format: 'L',
inline: true
})
// AREA CHART (Recours Totale)
var recChartCanvas = $('#recChart').get(0).getContext('2d')
var recChartData = {
labels : ['Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Fév', 'Mar', 'Avr', 'Mai'],
datasets: [
{
label : 'Recours Totale',
backgroundColor : 'rgb(100, 181, 246)',
borderColor : 'rgb(63, 81, 181)',
data : [
<?=$recoursTotale['September']?>,
<?=$recoursTotale['October']?>,
<?=$recoursTotale['November']?>,
<?=$recoursTotale['December']?>,
<?=$recoursTotale['January']?>,
<?=$recoursTotale['February']?>,
<?=$recoursTotale['March']?>,
<?=$recoursTotale['April']?>,
<?=$recoursTotale['May']?>
]
},
]
}
var recChartOptions = {
maintainAspectRatio: false,
responsive: true,
legend: {
display: false
},
elements: {
point: {
hoverBackgroundColor: 'rgb(63, 81, 181)',
radius: 5,
hoverRadius: 10,
},
},
scales: {
xAxes: [{
gridLines: {
display: false
}
}],
yAxes: [{
gridLines: {
display: false
}
}]
}
}
var recChart = new Chart(recChartCanvas, {
type: 'line',
data: recChartData,
options: recChartOptions
})
})
</script>
<script>
$(function () {
'use strict'
var radarChartCanvas = $('#radarChart').get(0).getContext('2d')
var radarChartData = {
labels : ["𝗘𝗻𝘀𝗲𝗶𝗴𝗻𝗮𝗻𝘁𝘀","𝗘𝘁𝘂𝗱𝗶𝗮𝗻𝘁𝘀","𝗔𝗱𝗺𝗶𝗻𝗶𝘀𝘁𝗿𝗮𝘁𝗲𝘂𝗿𝘀","𝗩𝗶𝘀𝗶𝘁𝗲𝘂𝗿𝘀"],
datasets : [
{
label: "Users",
fill : 'origin',
data :
[
<?=$nbrEnseignant?>,
<?=$nbrEtudiant?>,
<?=$nbrAdministrateur?>,
<?=$nbrVisiteur?>
]
},
]
}
var radarChartOptions = {
responsive: true,
legend: false,
spanGaps: true,
elements: {
line: {
backgroundColor: 'rgb(225, 190, 231)',
borderColor: 'rgb(171, 71, 188)'
},
point: {
backgroundColor: 'rgb(171, 71, 188)',
hoverBackgroundColor: 'rgb(186, 104, 200)',
radius: 5,
hoverRadius: 10,
},
},
scale: {
ticks: {
beginAtZero: true,
stepSize: 4
}
}
}
var radarChart = new Chart(radarChartCanvas, {
type: 'radar',
data: radarChartData,
options: radarChartOptions
})
})
</script>
<?php
require_once ('./Pages/footer.php');
?>