-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
62 lines (57 loc) · 3.29 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
<?php
include 'header.php';
?>
<!-- Gombok -->
<div class="container">
<div class="page-header" ></div>
<div class="kozepre">
<?php
$gpioList=gpioList();
?>
<div id="container" class="js-masonry"
data-masonry-options='{ "columnWidth": 0, "itemSelector": ".item" }'>
<?php
foreach ($gpioList as $gpio) {
echo '<div class="item szobauj">';
if ($gpio["value"] == 1) {
echo '<p><button id="'.$gpio["id"].'" name="name" type="button" class="btn btn-lg btn-default disabled" onclick="pushButton()"><span class="glyphicon glyphicon" style="{ visibility: hidden; }"></span>'.$gpio["name"].': <span class="btTemp">'.getTemp($gpio["id"]).'</span>°C</button></p>';
} else {
echo '<p><button id="'.$gpio["id"].'" name="name" type="button" class="btn btn-lg btn-default disabled" onclick="pushButton()"><span class="glyphicon glyphicon-fire" style="{ visibility: hidden; }"></span>'.$gpio["name"].': <span class="btTemp">'.getTemp($gpio["id"]).'</span>°C</button></p>';
}
echo '<div class="btn-group">';
echo '<button type="button" class="btn btn-xs btn-danger" onclick="changeTemp(this)">-</button>';
echo '<button id="setTempSensorid" data-sensorid="sensorid" data-type="settemp" type="button" class="btn btn-xs btn-info disabled" onclick="setTemp(this)">'.number_format(5,1).'</button>';
echo '<button type="button" class="btn btn-xs btn-success" onclick="changeTemp(this)">+</button> ';
echo '</div>';
if ($gpio["value"] == 1) {
echo '<button type="button" id="turnOnOff'.$gpio["id"].'" data-sensorid="'.$gpio["id"].'" data-type="off" class="btn btn-xs btn-danger" onclick="turnOnOff(this)" title="Turn On"><span class="glyphicon glyphicon-off"></span></button> ';
} else {
echo '<button type="button" id="turnOnOff'.$gpio["id"].'" data-sensorid="'.$gpio["id"].'" data-type="on" class="btn btn-xs btn-success" onclick="turnOnOff(this)" title="Turn Off"><span class="glyphicon glyphicon-off"></span></button> ';
}
echo '<p></p>';
echo '</div>';
}
?>
</div>
<?php
if ( 0 === 1) {
$power = ($gpioList['0']['value']) ? 'Off' : 'On';
$color = ($gpioList['0']['value']) ? 'red' : 'green';
?>
<div class="btn-group">
<button type="button" id="boilerpower" data-sensorid="boilerpower" data-type="<?php echo $power ?>" class="btn btn-default" onclick="turnOnOff(this)">
<span class="glyphicon glyphicon-off" style="color: <?php echo $color ?>;"></span>
</button>
<button type="button" id="turnOnOffboilerpower" class="btn btn-default disabled" aria-expanded="false">Kazán: <?php echo $power ?></button>
</div>
</div>
<?php } ?>
<div class="kozepre">
<p>Frissítve <span id='counter' style='font-weight:500; font-size:20px; padding:0px 2px;'>0</span> alkalommal.</p>
</div>
<div id="flot-placeholder" style="width:300px;height:150px"></div>
</div>
<script src="js/masonry.pkgd.min.js"></script>
<?php
include 'footer.php';
?>