-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
executable file
·251 lines (203 loc) · 11 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
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
<?php
//index.php
$page_title = "Home | GBV";
$current_page = "Home";
require_once 'includes/global.inc.php';
//check to see if they're logged in
if(isset($_SESSION['logged_in'])) {
//get the user object from the session
$user = unserialize($_SESSION['user']);
include "includes/Dash_header.php";
?>
<div id="sidebar">
<center><h3 style="text-size:18px; font-family: TStar-Bol"></h3></center>
<div class="sidebar-nav">
<?php
include "includes/sidebar.php";
?>
</div>
</div>
<div id="main-content">
<div id="bread-crumbs">
<!--breadcrumbs-->
</div>
<div id="content-body">
<center><h3 class="page-title">Welcome to GBVIS</h3></center>
<hr size="1" color="#CCCCCC">
<div class="profile-data" align="left">
<center>
<div id="dashboard" >
<div id="dashboardTop" >
<!--<h2>Main features</h2>-->
<section class="float_left">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="4" width="20px"><b><center>
Judiciary Sector
</center>
</b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="">Indicator</b></th>
<th align="left"><b>Prosecuted </b></th>
<th align="left"><b>Total </b></th>
<th align="left"><b>Percentage(%) </b></th>
</thead>
<?php $result = mysql_query("SELECT * FROM viewsummarytriedcases");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" >
<td><p style="padding-left:5px; font-size: 10px;"><?php echo $ro['indicator'];?></p></td>
<td><?php echo $ro['nationalTriedTotal'];?></td>
<td><?php echo $ro['nationalProsecutionTotal'];?></td>
<td><?php echo $ro['IndicatorPercentage'];?></td>
</tr>
<?php } ?>
</table>
</section>
<section class="float_right">
<script src="Highcharts/js/highcharts.js"></script>
<script src="Highcharts/js/modules/exporting.js"></script>
<section id="container" style="min-width: 350px; height: 200px; max-width: 420px; margin: 0 auto"></section>
</section>
</div>
<div id="dashboardBottom" >
<section class="float_left">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>Health Sector</center></b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px;">Indicator</b></th>
<th align="left"><b>Aggregates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewhealthsummary a inner join indicators_titles b
On a.indicator_id=b.titleid");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['title'];?></p></td><td><?php echo $ro['Aggregates'];?></td></tr>
<?php } ?>
</table>
</section>
<section class="float_right">
<center>
Top 5 Counties
</center>
<section class="float_right_section1">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>
Number of health cases reported
</center>
</b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px;">County</b></th>
<th align="left"><b>Aggreagates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewtop5healthcasesreported");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['county'];?></p></td><td><?php echo $ro['countyAggregate'];?></td></tr>
<?php } ?>
</table>
</section>
<section class="float_right_section2">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>Number of service providers trained</center></b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px;">County</b></th>
<th align="left"><b>Aggreagates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewtop5serviceproviderstrained");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['county'];?></p></td><td><?php echo $ro['countyAggregate'];?></td></tr>
<?php } ?>
</table>
</section>
<section class="float_right_section3">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>
Survivors initiated on PEP
</center>
</b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px;">County</b></th>
<th align="left"><b>Aggreagates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewtop5pepinitiated");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['county'];?></p></td><td><?php echo $ro['countyAggregate'];?></td></tr>
<?php } ?>
</table>
</section>
<section class="float_right_section4">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" ><b><center>
Survivors who have completed PEP
</center></b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px;">County</b></th>
<th align="left"><b>Aggreagates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewtop5pepcompleted");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['county'];?></p></td><td><?php echo $ro['countyAggregate'];?></td></tr>
<?php } ?>
</table>
</section>
</section>
<section class="float_left">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>Police Sector</center></b></th>
</thead>
<?php $result = mysql_query("select b.title,a.aggregates from viewpolicesummary a
inner join indicators_titles b on a.indicator_id=b.titleid");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px;"><?php echo $ro['title'];?></p></td><td><?php echo $ro['aggregates'];?></td></tr>
<?php } ?>
</table>
</section>
<section class="float_right">
<table width="100%" border="0" align="center" cellspacing="1" class="table-hover" >
<thead>
<th align="left" colspan="2" width="20px"><b><center>Number of sgbv cases reported to police</center></b></th>
</thead>
<thead style="padding-left:5px;">
<th align="left" ><b style="padding-left:5px; ">County</b></th>
<th align="left"><b>Aggreagates </b></th>
<!--<th align="left"><b>More</b></th>-->
</thead>
<?php $result = mysql_query("SELECT * FROM viewtop5casesreported");
while($ro = mysql_fetch_array($result)){ ?>
<tr bgcolor="#FFFFFF" ><td><p style="padding-left:5px; font-size: 9px;"><?php echo $ro['county'];?></p></td><td><?php echo $ro['countyTotal'];?></td></tr>
<?php } ?>
</table>
</section>
</div>
</div>
<a href="moreDashboard.php" align="left" style="font-family:Verdana, Geneva, sans-serif; font-size:15px; color:#3E1F60; text-decoration:none;padding-right:2px;">More Summary</a>
</div>
</center>
<br clear="all">
</div><br clear="all">
</center>
</div>
<?php
include "includes/footer.php";
}
else
{
//Redirect user back to login page if there is no valid session created
header("Location: login.php");
}
?>