-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatistics.php
More file actions
53 lines (47 loc) · 1.47 KB
/
statistics.php
File metadata and controls
53 lines (47 loc) · 1.47 KB
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
<?php
include_once "config.php";
$PAGE="stats";
include_once "includes/header.php";
$stats = array ('atrisk' =>'At Risk',
'anc1defaulters'=>"ANC 1 Non Defaulters",
'anc2defaulters'=>"ANC 2 Non Defaulters",
'pnc1defaulters'=>"PNC 1 Non Defaulters",
'distributions' => "Distributions");
$stat = optional_param('stat','atrisk',PARAM_TEXT);
//select KPI....
$counter = 1;
foreach ($stats as $k=>$v){
if ($k == $stat){
printf("<span class='selected'>%s</span>",$v);
} else {
printf("<a href='?stat=%s'>%s</a>",$k,$v);
}
if($counter < count($stats)){
echo " | ";
}
$counter++;
}
if ($stat == "atrisk"){
$viewopts = array('height'=>400,'width'=>500,'class'=>'graph','comparison'=>true);
include_once "includes/statistics/atrisk.php";
}
if ($stat == "anc1defaulters"){
$viewopts = array('height'=>500,'width'=>800,'class'=>'graph','comparison'=>true);
$opts = array('months'=>6);
include_once "includes/statistics/anc1defaulters.php";
}
if ($stat == "anc2defaulters"){
$viewopts = array('height'=>500,'width'=>800,'class'=>'graph','comparison'=>true);
$opts = array('months'=>6);
include_once "includes/statistics/anc2defaulters.php";
}
if ($stat == "pnc1defaulters"){
$viewopts = array('height'=>500,'width'=>800,'class'=>'graph','comparison'=>true);
$opts = array('months'=>6);
include_once "includes/statistics/pnc1defaulters.php";
}
if ($stat == "distributions"){
include_once "includes/statistics/distributions.php";
}
include_once "includes/footer.php";
?>