Commit 23bc4cb1aa750dc28a31fea6a8c0153cf061105c
1 parent
d45e80e7
Affichage du réseau
Showing
1 changed file
with
29 additions
and
16 deletions
Show diff stats
site/network.php
... | ... | @@ -15,26 +15,39 @@ $raspberrys = getRaspberrys(); |
15 | 15 | { |
16 | 16 | $ip = $raspberry['ip']; |
17 | 17 | ?> |
18 | - <table class="table table-striped table-bordered table-hover"> | |
18 | + <table class="table table-striped table-hover"> | |
19 | 19 | <thead class="thead-dark"> |
20 | 20 | <th width="15%"><img src="img/pi.png" alt="Raspberry" style="width:auto; height:50px;"></th> |
21 | - <th width="85%"><p style="font-size: 14px;"><?php echo $ip;?></p></th> | |
21 | + <th width="85%" colspan="3"><p style="font-size: 14px;"><?php echo $ip;?></p></th> | |
22 | 22 | </thead> |
23 | 23 | <tbody> |
24 | - <tr> | |
25 | - <td><label for="start">Date de début :</label></td> | |
26 | - <td>ok</td> | |
27 | - </tr> | |
28 | - | |
29 | - <tr> | |
30 | - <td><label for="end">Date de fin :</label></td> | |
31 | - <td>ok</td> | |
32 | - </tr> | |
33 | - | |
34 | - <tr> | |
35 | - <td><label for="nombre">Nombre de points :</label></td> | |
36 | - <td>ok</td> | |
37 | - </tr> | |
24 | + <?php | |
25 | + foreach($capteurs as $capteur) | |
26 | + { | |
27 | + if($capteur['raspberry'] != $ip) { continue; } | |
28 | + ?> | |
29 | + <tr> | |
30 | + <?php | |
31 | + if($ | |
32 | + { | |
33 | + $source = "img/temperature.png"; | |
34 | + } | |
35 | + else | |
36 | + { | |
37 | + $source = "img/pi.png"; | |
38 | + } | |
39 | + ?> | |
40 | + <td><img src=<?php echo $source;?> alt="Capteur" style="width:auto; height:50px;"></td> | |
41 | + <?php | |
42 | + | |
43 | + ?> | |
44 | + <td>ok</td> | |
45 | + <td>ok</td> | |
46 | + <td>ok</td> | |
47 | + </tr> | |
48 | + <?php | |
49 | + } | |
50 | + ?> | |
38 | 51 | </tbody> |
39 | 52 | </table> |
40 | 53 | <?php | ... | ... |