-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
330 lines (287 loc) · 11.3 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
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
<?php
include('functions.php');
include_once("config.php");
if (!isLoggedIn()) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php');
}
$result = mysqli_query($mysqli, "SELECT count(*) as total from users");
$data=mysqli_fetch_assoc($result);
$result1 = mysqli_query($mysqli, "SELECT count(*) as total from taxpayer");
$data1 =mysqli_fetch_assoc($result1);
$result2 = mysqli_query($mysqli, "SELECT count(*) as total from view");
$data2 =mysqli_fetch_assoc($result2);
?>
<!--
=========================================================
Paper Dashboard 2 - v2.0.0
=========================================================
Product Page: https://www.creative-tim.com/product/paper-dashboard-2
Copyright 2022 Creative Unis (https://www.creative-unis.com)
Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE)
Coded by Creative Unis.
=========================================================
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/logo.png">
<link rel="icon" type="image/png" href="../assets/img/logo.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>
FCC DASHBOARD
</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
<!-- CSS Files -->
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="../assets/css/paper-dashboard.css?v=2.0.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="../assets/demo/demo.css" rel="stylesheet" />
</head>
<body class="">
<div class="wrapper ">
<div class="sidebar" data-color="black" data-active-color="danger">
<!--
Tip 1: You can change the color of the sidebar using: data-color="blue | green | orange | red | yellow"
-->
<div class="logo">
<a href="" class="simple-text logo-mini">
<div class="logo-image-small">
<img src="../assets/img/logo.png">
</div>
</a>
<a href="/" class="simple-text logo-normal">
FCC DASHBOARD
<!-- <div class="logo-image-big">
<img src="../assets/img/logo.png">
</div> -->
</a>
</div>
<div class="sidebar-wrapper">
<ul class="nav">
<li class="active ">
<a href="/">
<i class="nc-icon nc-bank"></i>
<p>Dashboard</p>
</a>
</li>
<?php
if (isAdmin()) { ?>
<li>
<a href="create_user.php">
<i class="nc-icon nc-circle-10"></i>
<p>Add Users</p>
</a>
</li>
<?php }
?>
<?php
if (isAdmin()) { ?>
<li>
<a href="view_users.php">
<i class="nc-icon nc-zoom-split"></i>
<p>View Users</p>
</a>
</li>
<?php }
?>
<li>
<a href="add_record.php">
<i class="nc-icon nc-paper"></i>
<p>Add Record</p>
</a>
</li>
<li>
<a href="view_records.php">
<i class="nc-icon nc-zoom-split"></i>
<p>View Record</p>
</a>
</li>
<li>
<a href="index.php?logout='1'">
<i class="nc-icon nc-simple-remove"></i>
<p>LOGOUT</p>
</a>
</li>
<li>
<a href="/">
<img src="../assets/img/logo.png">
</a>
</li>
</ul>
</div>
</div>
<div class="main-panel">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-absolute fixed-top navbar-transparent">
<div class="container-fluid">
<div class="navbar-wrapper">
<div class="navbar-toggle">
<button type="button" class="navbar-toggler">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</button>
</div>
<a class="navbar-brand" href="#pablo">FREETOWN CITY COUNCIL DASHBOARD</a>
<strong><?php echo "Welcome " . $_SESSION['user']['username'];
?></strong>
<strong>
<i style="color: #888;">(<?php echo ucfirst($_SESSION['user']['user_type']); ?>)</i>
</strong>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navigation">
<ul class="navbar-nav">
<li class="nav-item btn-rotate dropdown">
<a class="nav-link dropdown-toggle" href="http://fcc.medal-media.com/" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="nc-icon nc-single-02"></i>
<p>
<span class="d-lg-none d-md-block">Some Actions</span>
</p>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">View Profile</a>
<a class="dropdown-item" href="#">Notification</a>
<a class="dropdown-item" href="index.php?logout='1'">Logout</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<!-- <div class="panel-header panel-header-lg">
<canvas id="bigDashboardChart"></canvas>
</div> -->
<div class="content">
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-body ">
<div class="row">
<div class="col-5 col-md-4">
<div class="icon-big text-center icon-warning">
<i class="nc-icon nc-single-02 text-success"></i>
</div>
</div>
<div class="col-7 col-md-8">
<div class="numbers">
<p class="card-category">Users</p>
<p class="card-title"> <?php echo $data['total']; ?>
<p>
</div>
</div>
</div>
</div>
<div class="card-footer ">
<hr>
<div class="stats">
<i class="fa fa-user"></i> Recorded few minutes ago
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-body ">
<div class="row">
<div class="col-5 col-md-4">
<div class="icon-big text-center icon-warning">
<i class="nc-icon nc-bullet-list-67 text-danger"></i>
</div>
</div>
<div class="col-7 col-md-8">
<div class="numbers">
<p class="card-category">Records</p>
<p class="card-title"><?php echo $data1['total']; ?>
<p>
</div>
</div>
</div>
</div>
<div class="card-footer ">
<hr>
<div class="stats">
<i class="fa fa-clock-o"></i> Seconds ago
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-body ">
<div class="row">
<div class="col-5 col-md-4">
<div class="icon-big text-center icon-warning">
<i class="nc-icon nc-zoom-split text-primary"></i>
</div>
</div>
<div class="col-7 col-md-8">
<div class="numbers">
<p class="card-category">views</p>
<p class="card-title"><?php echo $data2['total']; ?>
<p>
</div>
</div>
</div>
</div>
<div class="card-footer ">
<hr>
<div class="stats">
<i class="fa fa-binoculars"></i> At present
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="card-header ">
<h5 class="card-title">Users Behavior</h5>
<p class="card-category">24 Hours performance</p>
</div>
<div class="card-body ">
<canvas id=chartHours width="400" height="100"></canvas>
</div>
<div class="card-footer ">
<hr>
<div class="stats">
<i class="fa fa-history"></i> Updated 3 minutes ago
</div>
</div>
</div>
</div>
</div>
<!-- Core JS Files -->
<script src="../assets/js/core/jquery.min.js"></script>
<script src="../assets/js/core/popper.min.js"></script>
<script src="../assets/js/core/bootstrap.min.js"></script>
<script src="../assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
<!-- Google Maps Plugin -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Chart JS -->
<script src="../assets/js/plugins/chartjs.min.js"></script>
<!-- Notifications Plugin -->
<script src="../assets/js/plugins/bootstrap-notify.js"></script>
<!-- Control Center for Now Ui Dashboard: parallax effects, scripts for the example pages etc -->
<script src="../assets/js/paper-dashboard.min.js?v=2.0.0" type="text/javascript"></script>
<!-- Paper Dashboard DEMO methods, don't include it in your project! -->
<script src="../assets/demo/demo.js"></script>
<script>
$(document).ready(function() {
// Javascript method's body can be found in assets/assets-for-demo/js/demo.js
demo.initChartsPages();
});
</script>
</body>
</html>