Blame view

site/stop.php 583 Bytes
3722a6bb   grouille   MAJ
1
  <?php
13bd3d94   grouille   MAJ
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  require_once("accesBase.php");
  
  $arduino_simple = "[Arduino_stop]\r\n";
  $arduino_spi = "[Arduino_stop]\r\n";
  $nucleo = "[Nucleo_stop]\r\n";
  
  $version = getVersion($_POST['nom']);
  
  if($version == 0)
  {
  	$ini = $arduino_simple;
  }
  elseif($version == 1)
  {
  	$ini = $arduino_spi;
  }
  elseif($version == 2)
  {
  	$ini = $nucleo;
  }
  
  $numero = getNumero($_POST['nom']);
  $raspberry = getRaspberry($_POST['nom']);
  $ini = $ini.$raspberry." capteur=".$numero."-".$version." setup=0\n";
  file_put_contents('upload/inventaire.ini', $ini);
  
  //exec("super cmd.sh");
2197e6fa   grouille   MAJ
29
  header("Location: values.php");
3722a6bb   grouille   MAJ
30
  ?>