-1){ $qry = "UPDATE autoActions SET `floor` = '".$floor."', `window_from`= '".$tFrom."', `window_to` = '".$tTo."', `force_once` = '".$force."', `mo` = '".$mo."', `di` = '".$di."', `mi` = '".$mi."', `do` = '".$do."', `fr` = '".$fr."', `sa` = '".$sa."', `so` = '".$so."', `ferien` = '".$ferien."', `feiertag` = '".$feiertag."' WHERE id=".$id.";"; mysqli_query($mysql, $qry); mysqli_query($mysql, "DELETE FROM autoactionsActors WHERE actionID=".$id.";"); mysqli_query($mysql, "DELETE FROM autoactionsSensors WHERE actionID=".$id.";"); $actionID = $id; }else{ $qry = "INSERT into autoActions (`id`, `floor`, `window_from`, `window_to`, `force_once`, `mo`, `di`, `mi`, `do`, `fr`, `sa`, `so`, `ferien`, `feiertag`, `last_run`) VALUES (NULL, '".$floor."', '".$tFrom."', '".$tTo."', '".$force."', '".$mo."', '".$di."', '".$mi."', '".$do."', '".$fr."', '".$sa."', '".$so."', '".$ferien."', '".$feiertag."', '2020-01-01 12:00:00.000000')"; mysqli_query($mysql, $qry); $actionID = mysqli_insert_id($mysql); } //Get all Sensors: $num=1; while(isset($_POST["sensorSelect".$num])){ $id = intval($_POST["sensorSelect".$num]); if($_POST["sensorSelect".$num] != "0" && $id == 0){ $id = -1; } if(isset($_POST["btnLogic".$num])){ if(strtolower($_POST["btnLogic".$num]) == "oder"){ $weight = "or"; }else{ $weight = "and"; } }else{ $weight = "and"; } if (in_array($_POST["btnOperator".$num], array('+','-','=','<','>','!='))) { $cond = $_POST["btnOperator".$num]; }else{ $cond = "="; echo $_POST["btnOperator".$num]; } echo $_POST["btnOperator".$num]; $valID = intval($_POST["paramSelect".$num]); if($_POST["paramSelect".$num] != "0" && $id == 0){ $valID = -1; } $state = mysqli_real_escape_string($mysql, $_POST["threshold".$num]); $qry = "INSERT INTO `autoactionsSensors` (`id`, `sensorID`, `state`, `valID`, `condType`, `link`, `actionID`) VALUES (NULL, '".$id."', '".$state."', '".$valID."', '".$cond."', '".$weight."', '".$actionID."')"; mysqli_query($mysql, $qry); $num++; } $close=1; } } else { $close = 1; } if (!$close) { echo << input[type='range']::-webkit-slider-runnable-track { background: linear-gradient(to right, #00788F, #00788F), #D7D7D7; background-size: var(--background-size, 0%) 100%; background-repeat: no-repeat; }

Aktiver Zeitraum:
Aktive Wochentage:
Ferien/Feiertage:
Falls die Bedingung bis zuletzt nicht erfüllt wurde:

ENDE; }