-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
82 lines (70 loc) · 2.39 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
<?php require($_SERVER['DOCUMENT_ROOT'] . '/assets/php/getTemp.php' );?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/bootstrap.css" media="screen">
<link rel="stylesheet" href="../assets/css/main.css">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
var jsonData = <?php echo json_encode($table); ?>;
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
function drawChart() {
// Create our data table out of JSON data loaded from server.
var data = new google.visualization.DataTable(jsonData);
var options = {
curveType: 'function',
'height':500
};
// Instantiate and draw our chart, passing in some options.
// Do not forget to check your div ID
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div class="container">
<div class="page-header">
<div class="row">
<div class="col-lg-6">
</div>
</div>
<div class="col-lg-6">
</div>
</div>
<div class="main" id="content">
<div class="col-lg-4">
</div>
<div class="col-lg-4">
<h3 style="text-align:center">Letzte Messung</h3>
<table class="table table-striped table-hover">
<tr class="">
<th>Datum</th>
<th>Volumen</th>
</tr>
<?php while( $row = $result2->fetch(PDO::FETCH_ASSOC) ) { ?>
<tr class="">
<td><?php echo $row['Datum']; ?></td>
<td><?php echo $row['Volumen']; ?></td>
</tr>
<?php } ?>
</table>
</div>
<div class="col-lg-4">
</div>
</div>
</div>
<div class="container">
<div id="curve_chart" style="width:100%"></div>
</div>
<div class="container">
</div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
</body>
</html>