Exemple #1
0
$cal->day['vendredi'] = $vendredi;
$cal->day['samedi'] = $samedi;
$cal->day['dimanche'] = $dimanche;
$zibase->setCalendar($_POST['id'],$cal);
}
if(isset($_POST['Modifier_vcj'])) {
$zibase->setVariable($_POST['id'],$_POST['temperature']*10);
}
if(isset($_POST['Modifier_vcn'])) {
$zibase->setVariable($_POST['id'],$_POST['temperature']*10);
}
if(isset($_POST['Modifier_mode'])) {
$zibase->setVariable($_POST['id'],$_POST['mode']);
}

$thermostat=$zibase->getThermostat($idzibase,$tokenzibase);
$thermostatnb = count($thermostat);
$i = 1;
while($i <= $thermostatnb) {

echo "<p align=center>".$thermostat[$i]['0']."</p>";

echo "<p align=center>Temperature d'entree : ".(($zibase->getVariable($thermostat[$i]['3']))/10)."&deg;</p>";
?> <FORM method="post" action="./index.php?page=thermostat"> <?
echo "<p align=center>Consigne de jour : ".(($zibase->getVariable($thermostat[$i]['4']))/10)."&deg; ";
?>
<INPUT TYPE="HIDDEN" NAME="id" VALUE="<? echo $thermostat[$i]['4']; ?>">
<INPUT TYPE="text" size="3" NAME="temperature" VALUE="<? echo (($zibase->getVariable($thermostat[$i]['4']))/10); ?>">
<INPUT TYPE="SUBMIT" NAME="Modifier_vcj" VALUE="Valider">
</p></FORM>
<FORM method="post" action="./index.php?page=thermostat">