Commit 40e67c4b2024466a75d00c7adad40e00f0181d03
1 parent
6896d983
MAJ
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
site/remove.php
@@ -20,13 +20,14 @@ session_start(); | @@ -20,13 +20,14 @@ session_start(); | ||
20 | <br/> | 20 | <br/> |
21 | <h1 style="margin-bottom:20px; margin-top:70px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-history"></i> Suppression d'un capteur</h1> | 21 | <h1 style="margin-bottom:20px; margin-top:70px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-history"></i> Suppression d'un capteur</h1> |
22 | <?php | 22 | <?php |
23 | - if(remove($_POST['nom'])) | 23 | + $nom = $_POST['nom']; |
24 | + if(remove($nom)) | ||
24 | { | 25 | { |
25 | $arduino_simple = "[Arduino_delete]\r\n"; | 26 | $arduino_simple = "[Arduino_delete]\r\n"; |
26 | $arduino_spi = "[Arduino_delete]\r\n"; | 27 | $arduino_spi = "[Arduino_delete]\r\n"; |
27 | $nucleo = "[Nucleo_delete]\r\n"; | 28 | $nucleo = "[Nucleo_delete]\r\n"; |
28 | 29 | ||
29 | - $version = getVersion($_POST['nom']); | 30 | + $version = getVersion($nom); |
30 | 31 | ||
31 | if($version == 0) | 32 | if($version == 0) |
32 | { | 33 | { |
@@ -41,8 +42,8 @@ session_start(); | @@ -41,8 +42,8 @@ session_start(); | ||
41 | $ini = $nucleo; | 42 | $ini = $nucleo; |
42 | } | 43 | } |
43 | 44 | ||
44 | - $numero = getNumero($_POST['nom']); | ||
45 | - $raspberry = getRaspberry($_POST['nom']); | 45 | + $numero = getNumero($nom); |
46 | + $raspberry = getRaspberry($nom); | ||
46 | $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n"; | 47 | $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n"; |
47 | file_put_contents('upload/inventaire.ini', $ini); | 48 | file_put_contents('upload/inventaire.ini', $ini); |
48 | 49 |