Commit 57e3933cc239af42fd7772bc69df667475c72796

Authored by grouille
1 parent dfeb0498

Affichage du réseau

Showing 1 changed file with 9 additions and 1 deletions   Show diff stats
site/network.php
... ... @@ -5,6 +5,7 @@ include("header.php");
5 5 require_once("accesBase.php");
6 6 $capteurs = getSensors();
7 7 $raspberrys = getRaspberrys();
  8 +$nombre = count($raspberrys);
8 9 ?>
9 10 <div class="row">
10 11 <div class="col-4 col-md-4 offset-md-4 offset-4">
... ... @@ -12,8 +13,10 @@ $raspberrys = getRaspberrys();
12 13 <h1 style="margin-bottom:20px; margin-top:60px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-project-diagram"></i> Le réseau</h1>
13 14 <img src="img/computer.jpg" alt="Ordinateur" style="width:100%; height:auto;">
14 15 <?php
  16 + $cpt = 0;
15 17 foreach($raspberrys as $raspberry)
16 18 {
  19 + $cpt++;
17 20 $ip = $raspberry['ip'];
18 21 ?>
19 22 <table class="table table-striped table-hover table-bordered">
... ... @@ -47,8 +50,13 @@ $raspberrys = getRaspberrys();
47 50 ?>
48 51 </tbody>
49 52 </table>
50   - <img src="img/empty.jpg" alt="Ligne" style="width:100%; height:auto;">
51 53 <?php
  54 + if($cpt < $nombre)
  55 + {
  56 + ?>
  57 + <img src="img/empty.jpg" alt="Ligne" style="width:100%; height:auto;">
  58 + <?php
  59 + }
52 60 }
53 61 ?>
54 62 </div>
... ...