Commit b268e61c28f98f9345fb5dbd94e3838ce4de8258
1 parent
a93105b5
MAJ
Showing
3 changed files
with
19 additions
and
5 deletions
Show diff stats
site/reception.php
@@ -55,11 +55,22 @@ if(isset($_POST['sensor'])) | @@ -55,11 +55,22 @@ if(isset($_POST['sensor'])) | ||
55 | { | 55 | { |
56 | exec("super cmd.sh", $retour, $statut); | 56 | exec("super cmd.sh", $retour, $statut); |
57 | $size = count($retour); | 57 | $size = count($retour); |
58 | - $message = "Upload du fichier réussi !".$statut; | ||
59 | - $color = "alert-success"; | 58 | + |
59 | + if($statut == 0) | ||
60 | + { | ||
61 | + $message = "Upload du fichier réussi !"; | ||
62 | + $color = "alert-success"; | ||
63 | + } | ||
64 | + else | ||
65 | + { | ||
66 | + $ansible = "Code retour : ".$statut."<br/>"; | ||
67 | + $message = "Erreur lors du transfert du fichier..."; | ||
68 | + $color = "alert-danger"; | ||
69 | + } | ||
70 | + | ||
60 | for($i = 0; $i<$size; $i++) | 71 | for($i = 0; $i<$size; $i++) |
61 | { | 72 | { |
62 | - $message = $message."---".$retour[$i]."---"; | 73 | + $ansible = $ansible."---".$retour[$i]."---"; |
63 | } | 74 | } |
64 | } | 75 | } |
65 | else | 76 | else |
site/reponse.php
1 | <div class="row"> | 1 | <div class="row"> |
2 | - <div class="col-4 col-md-4 offset-4 offset-md-4" style="margin-top:70px;"> | 2 | + <div class="col-6 col-md-6 offset-3 offset-md-3" style="margin-top:70px;"> |
3 | <br/> | 3 | <br/> |
4 | <div class="alert <?php echo $color;?>" role="alert"> | 4 | <div class="alert <?php echo $color;?>" role="alert"> |
5 | <?php echo $message;?> | 5 | <?php echo $message;?> |
6 | </div> | 6 | </div> |
7 | + <div class="alert alert-secondary" role="alert"> | ||
8 | + <?php echo $ansible;?> | ||
9 | + </div> | ||
7 | </div> | 10 | </div> |
8 | </div> | 11 | </div> |
site/tableau.php
1 | <div class="row"> | 1 | <div class="row"> |
2 | - <div class="col-4 col-md-4 offset-4 offset-md-4"> | 2 | + <div class="col-6 col-md-6 offset-3 offset-md-3"> |
3 | <h1 style="margin-bottom:20px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-info-circle"></i> Informations complémentaires</h1> | 3 | <h1 style="margin-bottom:20px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-info-circle"></i> Informations complémentaires</h1> |
4 | <table class="table table-striped table-bordered"> | 4 | <table class="table table-striped table-bordered"> |
5 | <tbody> | 5 | <tbody> |