Commit 40e67c4b2024466a75d00c7adad40e00f0181d03

Authored by grouille
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 20 <br/>
21 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 22 <?php
23   - if(remove($_POST['nom']))
  23 + $nom = $_POST['nom'];
  24 + if(remove($nom))
24 25 {
25 26 $arduino_simple = "[Arduino_delete]\r\n";
26 27 $arduino_spi = "[Arduino_delete]\r\n";
27 28 $nucleo = "[Nucleo_delete]\r\n";
28 29  
29   - $version = getVersion($_POST['nom']);
  30 + $version = getVersion($nom);
30 31  
31 32 if($version == 0)
32 33 {
... ... @@ -41,8 +42,8 @@ session_start();
41 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 47 $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n";
47 48 file_put_contents('upload/inventaire.ini', $ini);
48 49  
... ...