diff --git a/site/envoiFichiers.php b/site/envoiFichiers.php deleted file mode 100644 index 6f22674..0000000 --- a/site/envoiFichiers.php +++ /dev/null @@ -1,140 +0,0 @@ -0) ) { - $xml = "\r\n" - .''; - foreach($_POST['sensor'] as $sensor => $value) - { - $val = explode(":", $value); - if(count($types)<>0 && !in_array($val[2], $types)) {$error2 = true;} - else {$types[] = $val[2];} - $xml = $xml. '' . '' . htmlspecialchars($val[0]) . '' . '' . htmlspecialchars($val[1]) . '' . ''; - $xml = $xml."\r\n"; - } - $xml = $xml.''; - if(!$error2) {file_put_contents('upload/sensor.xml', $xml) ;} -}*/ - -if(isset($_POST['sensor']) && count($_POST['sensor']<>0)) -{ - $ini = ""; - $arduino_simple = "[Arduino]\r\n"; - $arduino_spi = "[Arduino_spi]\r\n"; - $nucleo = "[Nucleo]\r\n"; - $a_simple = false; - $a_spi = false; - $n = false; - foreach($_POST['sensor'] as $sensor => $value) - { - $val = explode(":", $value); - if(count($types)<>0 && !in_array($val[2], $types)) {$error = true;} - else {$types[] = $val[2];} - $version = 1;//getSensorVersion($val[0], $val[1]); - if($version == 0) - { - $a_simple = true; - $arduino_simple = $arduino_simple.$val[0]." capteur=".$val[1]."\n"; - } - elseif($version == 1) - { - $a_spi = true; - $arduino_spi = $arduino_spi.$val[0]." capteur=".$val[1]."\n"; - } - elseif($version == 2) - { - $n = true; - $nucleo = $nucleo.$val[0]." capteur=".$val[1]."\n"; - } - } - echo $arduino_simple; - echo $arduino_spi; - echo $nucleo; - if($a_simple) {$ini = $ini.$arduino_simple."\n";} - if($a_spi) {$ini = $ini.$arduino_spi."\n";} - if($n) {$ini = $ini.$nucleo."\n";} - if(!$error) {file_put_contents('upload/inventaire.ini', $ini);} -} -?> - - - - - - - - - - -
-
-
-

Envoi du fichier en ligne

- - - - -

Informations complémentaires

- - - - - - - - - - - - - - - - - - - - - - - - -
Nom du fichier
Type
Localisation
Erreur
Taille
- -
-
- -
-
-
-

Envoi du fichier en ligne

- - -
-
- - - diff --git a/site/upload/inventaire.ini b/site/upload/inventaire.ini index de0374a..dd2a1ca 100644 --- a/site/upload/inventaire.ini +++ b/site/upload/inventaire.ini @@ -1,6 +1,6 @@ [Arduino] -172.26.145.112 capteur=1 +172.26.145.112 capteur=1-0 [Arduino_spi] -172.26.145.111 capteur=1 +172.26.145.111 capteur=1-1 -- libgit2 0.21.2