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
@@ -5,6 +5,7 @@ include("header.php"); @@ -5,6 +5,7 @@ include("header.php");
5 require_once("accesBase.php"); 5 require_once("accesBase.php");
6 $capteurs = getSensors(); 6 $capteurs = getSensors();
7 $raspberrys = getRaspberrys(); 7 $raspberrys = getRaspberrys();
  8 +$nombre = count($raspberrys);
8 ?> 9 ?>
9 <div class="row"> 10 <div class="row">
10 <div class="col-4 col-md-4 offset-md-4 offset-4"> 11 <div class="col-4 col-md-4 offset-md-4 offset-4">
@@ -12,8 +13,10 @@ $raspberrys = getRaspberrys(); @@ -12,8 +13,10 @@ $raspberrys = getRaspberrys();
12 <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 <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 <img src="img/computer.jpg" alt="Ordinateur" style="width:100%; height:auto;"> 14 <img src="img/computer.jpg" alt="Ordinateur" style="width:100%; height:auto;">
14 <?php 15 <?php
  16 + $cpt = 0;
15 foreach($raspberrys as $raspberry) 17 foreach($raspberrys as $raspberry)
16 { 18 {
  19 + $cpt++;
17 $ip = $raspberry['ip']; 20 $ip = $raspberry['ip'];
18 ?> 21 ?>
19 <table class="table table-striped table-hover table-bordered"> 22 <table class="table table-striped table-hover table-bordered">
@@ -47,8 +50,13 @@ $raspberrys = getRaspberrys(); @@ -47,8 +50,13 @@ $raspberrys = getRaspberrys();
47 ?> 50 ?>
48 </tbody> 51 </tbody>
49 </table> 52 </table>
50 - <img src="img/empty.jpg" alt="Ligne" style="width:100%; height:auto;">  
51 <?php 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 </div> 62 </div>