-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·57 lines (52 loc) · 1.7 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
<?php
namespace Teknix\NAV;
require_once('./Bedriftsundersokelse.class.php');
?>
<style>
.table {
border:1px solid #eee;
}
.table td {
padding:2px;
border-bottom:1px solid #eee;
}
.table tr:hover {
background:rgba(0,0,0,0.1);
}
</style>
<h1>NAVs bedriftsundersøkelse - etterspørsel etter arbeidskraft per næring</h1>
<?php
$data = Bedriftsundersokelse::getInstance();
echo '<h1>Antall treff før filter: '.$data->count().'</h1>';
if(isset($_GET['filter'])) {
$data->filterByYear($_GET['filter']);
echo '<h1>Antall treff etter filter: '.$data->count().'</h1>';
}
if($data->count() > 0) {
?>
<table class="table">
<tr>
<th>År</th>
<th>Næring</th>
<th>Mangel på arbeidskraft<br>Antall Personer</th>
<th>95% konfidens-intervall for<br>est. mangel, nedre grense</th>
<th>95% konfidens-intervall for<br>est. mangel, øvre grense</th>
<th>% bedrifter med<br>alvorlige rekrutteringsproblemer</th>
</tr>
<?php foreach($data->results() as $data) { ?>
<tr>
<td><?php echo $data['År']; ?></td>
<td><?php echo $data['Næring ']; ?></td>
<td><?php echo $data['Estimert mangel på arbeidskraft i antall personer']; ?></td>
<td><?php echo $data['95 % konfidens-intervall for estimert mangel , nedre grense']; ?></td>
<td><?php echo $data['95 % konfidens-intervall for estimert mangel , øvre grense']; ?></td>
<td><?php echo $data['Prosentvis andel bedrifter med alvorlige rekrutteringsproblemer']; ?></td>
</tr>
<?php }
}
elseif($data->error()) {
echo '<p>En feil har oppstått</p>';
}
else {
echo '<p>Ingen treff</p>';
}