-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoisture-view-detail.php
214 lines (193 loc) · 9.88 KB
/
moisture-view-detail.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
<!-- Plant record search-->
<?php
// Session start
session_start();
// Silence erro reporting
error_reporting(0);
// Import database connection and functions script
include('includes/dbconnection.php');
include('includes/functions.php');
// Logic for Logged on access
if (strlen($_SESSION['smaid']==0)) {
// If not redirect access to index page
header('location:logout.php');
// If logged on display this
} else{
// If Admin enters data to redirect them to a record editing point
if(isset($_GET['submit'])){
// Assign verified data as a session input
$plant= $_SESSION['editplant']=$_GET['submit'];
echo "<script type='text/javascript'> document.location ='edit-plant-record.php'; </script>";
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<title>Moisture Record | 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">
<!-- 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">
<div class="wrapper-pro">
<?php include_once('includes/sidebar.php');?>
<?php include_once('includes/header.php');?>
<!-- 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 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">Today's Moisture Data</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcome End-->
<!-- Static Table Start -->
<div class="data-table-area mg-b-15">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="sparkline13-list shadow-reset">
<div class="sparkline13-hd">
<div class="main-sparkline13-hd">
<h1>Today's <span class="table-project-n"></span> Moisture Data</h1>
<div class="sparkline13-outline-icon">
<span class="sparkline13-collapse-link"><i class="fa fa-chevron-up"></i></span>
<span><i class="fa fa-wrench"></i></span>
<span class="sparkline13-collapse-close"><i class="fa fa-times"></i></span>
</div>
</div>
</div>
<div class="sparkline13-graph">
<div class="datatable-dashv1-list custom-datatable-overright">
<form method="get">
<!-- <h4 class="align-center" style="margin-bottom: 30px">Result against "<?php #cho $sdata;?>" keyword </h4> -->
<table class="table table-bordered table-hover">
<thead>
<tr>
<th style="text-align: center">S.No</th>
<th style="text-align: center">Moisture</th>
<th style="text-align: center">Time Recorded</th>
</tr>
</thead>
<tbody>
<?php
// Query the database
$sql="SELECT Moisture, Time from farm_data where date ='".date("Y-m-d")."' ORDER BY ID DESC";
$query = $Conn -> query($sql);
$cnt=1;
while($row = $query->fetch_assoc()){
;
?>
<tr>
<!-- Output data collected as a table -->
<td style="text-align: center"><?php echo $cnt;?></td>
<td style="text-align: center"><?php echo $row['Moisture'];?> %</td>
<td style="text-align: center"><?php echo $row['Time'];?></td>
</tbody>
<?php
$cnt=$cnt+1;
} ?>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Static Table End -->
</div>
</div>
<!-- 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>
<!-- counterup JS
============================================ -->
<script src="js/counterup/jquery.counterup.min.js"></script>
<script src="js/counterup/waypoints.min.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>
<!-- 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 } ?>