-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
332 lines (295 loc) · 16.3 KB
/
dashboard.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
331
332
<!-- Smart Farming Dashboard-->
<?php
// Session Start
session_start();
// Silecnce error reporting
error_reporting(0);
// Import database connection file
include('includes/dbconnection.php');
// Logic for logged on admin access
if (strlen($_SESSION['smaid']==0)) {
// If not Logged on redirect them to index page
header('location:logout.php');
// Else display this
} else{
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<title>Dashboard | Smart Farming System</title>
<!-- Bootstrap CSS
============================================ -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap CSS
============================================ -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- adminpro icon CSS
============================================ -->
<link rel="stylesheet" href="css/adminpro-custon-icon.css">
<!-- meanmenu icon CSS
============================================ -->
<link rel="stylesheet" href="css/meanmenu.min.css">
<!-- mCustomScrollbar CSS
============================================ -->
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.min.css">
<!-- animate CSS
============================================ -->
<link rel="stylesheet" href="css/animate.css">
<!-- jvectormap CSS
============================================ -->
<link rel="stylesheet" href="css/jvectormap/jquery-jvectormap-2.0.3.css">
<!-- normalize CSS
============================================ -->
<link rel="stylesheet" href="css/data-table/bootstrap-table.css">
<link rel="stylesheet" href="css/data-table/bootstrap-editable.css">
<!-- normalize CSS
============================================ -->
<link rel="stylesheet" href="css/normalize.css">
<!-- charts CSS
============================================ -->
<link rel="stylesheet" href="css/c3.min.css">
<!-- style CSS
============================================ -->
<link rel="stylesheet" href="style.css">
<!-- responsive CSS
============================================ -->
<link rel="stylesheet" href="css/responsive.css">
<!-- modernizr JS
============================================ -->
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body class="materialdesign">
<!-- Header top area start-->
<div class="wrapper-pro">
<?php include_once('includes/sidebar.php');?>
<!-- Header top area start-->
<?php include_once('includes/header.php');?>
<!-- Header top area end-->
<!-- Breadcome start-->
<div class="breadcome-area mg-b-30 small-dn">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="breadcome-list map-mg-t-40-gl shadow-reset">
<div class="row">
<div class="col-lg-12">
<ul class="breadcome-menu">
<li><a href="dashboard.php">Home</a> <span class="bread-slash">/</span>
</li>
<li><span class="bread-blod">Dashboard</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcome End-->
<!-- Breadcome End-->
<!-- income order visit user Start -->
<div class="income-order-visit-user-area">
<div class="container-fluid" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif">
<div class="row">
<div class="col-lg-4">
<?php
// Query the database and collect the recent row
$sql ="SELECT * from farm_data where ID=(SELECT MAX(ID) from farm_data)";
$query = $Conn -> query($sql);
// Collect its data as an array
$row=$query->fetch_assoc();
$totalnewapp=$query->num_rows;
?>
<div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<div class="income-title">
<div class="main-income-head">
<h2>Temperature</h2>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Temperature'];?></span> ℃</h3>
</div>
</div>
<div class="income-range order-cl">
<a class="block text-center" href="temperature-view-data.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- Display the current Temprature readings here -->
<div class="col-lg-4">
<div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<div class="income-title">
<div class="main-income-head">
<h2 >Moisture Content</h2>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Moisture'];?></span> %</h3>
</div>
</div>
<div class="income-range order-cl">
<a class="block text-center" href="moisture-view-detail.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- Disply the current Moisture readings here -->
<div class="col-lg-4">
<div class="income-dashone-total income-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<!-- Display the current readings for PH here -->
<div class="income-title">
<div class="main-income-head">
<h2>PH</h2>
<div class="main-income-phara">
<!-- <p style="background: yellow; color: black">New Application</p> -->
</div>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Ph'];?></span> </h3>
</div>
</div>
<div class="income-range">
<a class="block text-center" href="ph-view-data.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- Display the current Nitrogen contents here -->
<div class="col-lg-4">
<div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<div class="income-title">
<div class="main-income-head">
<h2>Nitrogen</h2>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Nitrogen'];?></span> mg/Kg</h3>
</div>
</div>
<div class="income-range order-cl">
<a class="block text-center" href="nitrogen-view-data.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- Display the current Phosphorus readings here-->
<div class="col-lg-4" >
<div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<div class="income-title">
<div class="main-income-head">
<h2>Phosphorus</h2>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Phosphorus'];?></span> mg/Kg</h3>
</div>
</div>
<div class="income-range order-cl">
<a class="block text-center" href="phosphorus-view-data.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- Display the current potassum readings here -->
<div class="col-lg-4">
<div class="income-dashone-total visitor-monthly shadow-reset nt-mg-b-30" style="background:#05866C">
<div class="income-title">
<div class="main-income-head">
<h2>Potassium</h2>
</div>
</div>
<div class="income-dashone-pro">
<div class="income-rate-total">
<div class="price-adminpro-rate">
<h3><span class="counter"><?php echo $row['Potassium'];?></span> mg/Kg</h3>
</div>
</div>
<div class="income-range visitor-cl">
<a class="block text-center" href="potassium-view-detail.php"><strong style="color:white">View Detail</strong></a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer End-->
<!-- jquery
============================================ -->
<script src="js/vendor/jquery-1.11.3.min.js"></script>
<!-- bootstrap JS
============================================ -->
<script src="js/bootstrap.min.js"></script>
<!-- meanmenu JS
============================================ -->
<script src="js/jquery.meanmenu.js"></script>
<!-- mCustomScrollbar JS
============================================ -->
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<!-- sticky JS
============================================ -->
<script src="js/jquery.sticky.js"></script>
<!-- scrollUp JS
============================================ -->
<script src="js/jquery.scrollUp.min.js"></script>
<!-- scrollUp JS
============================================ -->
<script src="js/wow/wow.min.js"></script>
<!-- counterup JS
============================================ -->
<script src="js/counterup/jquery.counterup.min.js"></script>
<script src="js/counterup/waypoints.min.js"></script>
<script src="js/counterup/counterup-active.js"></script>
<!-- jvectormap JS
============================================ -->
<script src="js/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
<script src="js/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="js/jvectormap/jvectormap-active.js"></script>
<!-- peity JS
============================================ -->
<script src="js/peity/jquery.peity.min.js"></script>
<script src="js/peity/peity-active.js"></script>
<!-- sparkline JS
============================================ -->
<script src="js/sparkline/jquery.sparkline.min.js"></script>
<script src="js/sparkline/sparkline-active.js"></script>
<!-- flot JS
============================================ -->
<script src="js/flot/Chart.min.js"></script>
<script src="js/flot/dashtwo-flot-active.js"></script>
<!-- data table JS
============================================ -->
<script src="js/data-table/bootstrap-table.js"></script>
<script src="js/data-table/tableExport.js"></script>
<script src="js/data-table/data-table-active.js"></script>
<script src="js/data-table/bootstrap-table-editable.js"></script>
<script src="js/data-table/bootstrap-editable.js"></script>
<script src="js/data-table/bootstrap-table-resizable.js"></script>
<script src="js/data-table/colResizable-1.5.source.js"></script>
<script src="js/data-table/bootstrap-table-export.js"></script>
<!-- main JS
============================================ -->
<script src="js/main.js"></script>
</body>
</html><?php } ?>