-
Notifications
You must be signed in to change notification settings - Fork 4
/
backoffice.php
109 lines (84 loc) · 2.76 KB
/
backoffice.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
<?php /*
Copyright 2015 Cédric Levieux, Parti Pirate
This file is part of Recrutement.
Recrutement is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Recrutement is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Recrutement. If not, see <http://www.gnu.org/licenses/>.
*/
include_once("header.php");
require_once("engine/bo/CandidateBo.php");
require_once("engine/bo/CandidateAnswerBo.php");
$candidateBo = CandidateBo::newInstance($connection, $config);
$candidateAnswerBo = CandidateAnswerBo::newInstance($connection, $config);
$sexPositionStats = $candidateBo->getStats();
$stats = $candidateAnswerBo->getStats();
?>
<div class="container theme-showcase" role="main">
<ol class="breadcrumb">
<li class="active"><?php echo lang("breadcrumb_backoffice"); ?></li>
</ol>
<?php if ($isConnected) {?>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Répartition genre/position</div>
<table class="table">
<thead>
<tr>
<th>Genre</th>
<th>Position</th>
<th class="text-right">Nombre de personnes</th>
</tr>
</thead>
<tbody>
<?php foreach($sexPositionStats as $stat) { ?>
<tr>
<td><?php echo $stat["can_sex"] ? lang("common_sex_" . $stat["can_sex"]) : "-"; ?></td>
<td><?php echo $stat["cpo_position"] ? lang("candidate_position_" . $stat["cpo_position"]) : "-"; ?></td>
<td class="text-right"><?php echo $stat["number_of_persons"]; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Contacts</div>
<table class="table">
<thead>
<tr>
<th>Status</th>
<th class="text-right">Nombre de personnes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Contactés</td>
<td class="text-right"><?php echo $stats["contacted"]; ?></td>
</tr>
<tr>
<td>À contacter</td>
<td class="text-right"><?php echo $stats["to_be_contacted"]; ?></td>
</tr>
<tr>
<td>-</td>
<td class="text-right"><?php echo $stats["contacted"] + $stats["to_be_contacted"]; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php }?>
<?php include("connect_button.php"); ?>
</div>
<div class="lastDiv"></div>
<?php include("footer.php");?>
</body>
</html>