Commit 6896d9833c90a37ed881ef609da74a9e0cf7a6e4

Authored by grouille
1 parent 3b1d5fcf

MAJ

Showing 1 changed file with 25 additions and 0 deletions   Show diff stats
site/remove.php
... ... @@ -22,6 +22,31 @@ session_start();
22 22 <?php
23 23 if(remove($_POST['nom']))
24 24 {
  25 + $arduino_simple = "[Arduino_delete]\r\n";
  26 + $arduino_spi = "[Arduino_delete]\r\n";
  27 + $nucleo = "[Nucleo_delete]\r\n";
  28 +
  29 + $version = getVersion($_POST['nom']);
  30 +
  31 + if($version == 0)
  32 + {
  33 + $ini = $arduino_simple;
  34 + }
  35 + elseif($version == 1)
  36 + {
  37 + $ini = $arduino_spi;
  38 + }
  39 + elseif($version == 2)
  40 + {
  41 + $ini = $nucleo;
  42 + }
  43 +
  44 + $numero = getNumero($_POST['nom']);
  45 + $raspberry = getRaspberry($_POST['nom']);
  46 + $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n";
  47 + file_put_contents('upload/inventaire.ini', $ini);
  48 +
  49 + //exec("super cmd.sh");
25 50 ?>
26 51 <div class="alert alert-success" role="alert">
27 52 Le capteur a bien été supprimé !
... ...