-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutside.php
executable file
·57 lines (46 loc) · 1.8 KB
/
outside.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
<?PHP
include("./include/sensorclass.php");
include("./include/drawerclass.php");
$db = mysqli_connect("localhost","datalogger","datalogger") or die("DB Connect error");
mysqli_select_db($db, "datalogger");
$creator=new DiagrammScriptCreator($db);
$sensor1=SensorFactory::getOutsideSensor();
$errorcount=0;
$errorcount+=$sensor1->getErrorCount($db);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title><?php echo($sensor1->title)?></title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
</head>
<body>
<div class="jumbotron">
<div class="container">
<?php include 'menu.php';?>
<h2><?php echo($sensor1->title)?></h2>
</div>
</div>
<div class="container">
<?php
echo ("Messung: <b>".date("Y-m-d H:i")."</b>");
if ($errorcount>0)
echo ("<h3>Im Fehlerprotokoll stehen für diese Sensoren $errorcount Fehler an</h3>");
?>
<h3>CURRENT CONDITIONS</h3>
<div class="row">
<?php $creator->CreateGauge($sensor1, $sensor1->getValue($db)); ?>
</div>
<hr>
<?php $creator->CreateXY(array($sensor1), 3); ?>
<?php $creator->CreateXY(array($sensor1), 24); ?>
<?php $creator->CreateXY(array($sensor1), 90); ?>
<?php $creator->CreateXY(array($sensor1), 360); ?>
</div>
<?php include 'footer.php';?>
</body>
</html>