Esempio n. 1
0
function Btn()
{
    if ($ID_CHB == 1) {
        sendCommandToRPi('SET_TEMP A ' . $_POST['setTemp']);
    }
    if ($ID_CHB == 2) {
        sendCommandToRPi('SET_TEMP B ' . $_POST['setTemp']);
    }
    if ($ID_CHB == 3) {
        sendCommandToRPi('SET_TEMP C ' . $_POST['setTemp']);
    }
}
Esempio n. 2
0
    
        <?php 
include "functions.php";
$ID_CHB = 1;
if (isset($_POST['setTemp'])) {
    if ($ID_CHB == 1) {
        sendCommandToRPi('SET_TEMP D ' . $_POST['setTemp']);
    }
}
if (isset($_POST['setTempVoulue']) && isset($_POST['datepicker']) && isset($_POST['datepicker2'])) {
    if ($ID_CHB == 1) {
        $timeStart = strtotime($_POST['datepicker']);
        $timeEnd = strtotime($_POST['datepicker2']);
        if ($timeStart < $timeEnd) {
            sendCommandToRPi('SET_CONSIGNE D ' . $_POST['setTempVoulue'] . ' ' . $timeStart . ' ' . $timeEnd);
        } else {
            echo '<p style="color:red"> La date de debut doit etre inferieure a la date de fin!</p>';
        }
    }
}
?>
				




        <?php 
include "header.php";
?>
 <!--En-tête-->