mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
History Clean Up
This commit is contained in:
commit
8cf912993d
112 files changed
+11395
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<div class="modal-container" id="modal">
|
||||
<div class="modal">
|
||||
<a href=""><i class="fa fa-times close"></i></a>
|
||||
<h4 class="mb-4"><?php echo $LANG['t_createAutomation']?></h4>
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<input type="hidden" name="atSelector" value="<?php if (isset($_POST['atTime'])) {
|
||||
echo $_POST['atTime'];
|
||||
} else if (isset($_POST['atDeviceValue'])) {
|
||||
$subDeviceId = $_POST['atDeviceValue'];
|
||||
$subDeviceValue = $_POST['atDeviceValueInt'];
|
||||
$subDevice = SubDeviceManager::getSubDevice($subDeviceId);
|
||||
$subDeviceMaster = SubDeviceManager::getSubDeviceMaster($subDeviceId,$subDevice['type']);
|
||||
|
||||
$json = json_encode([
|
||||
'deviceID' => $subDeviceMaster['device_id'],
|
||||
'type'=> htmlspecialchars($subDevice['type']),
|
||||
'value'=> $subDeviceValue,
|
||||
]);
|
||||
echo htmlspecialchars($json);
|
||||
}
|
||||
else {
|
||||
echo $_POST['atSelector'];
|
||||
} ?>" required/>
|
||||
<input type="hidden" name="atDays" value="<?php echo htmlspecialchars(($_POST['day'] != '' ? json_encode($_POST['day']) : '')); ?>" required/>
|
||||
<?php foreach ($_POST['devices'] as $value) { ?>
|
||||
<?php $deviceData = DeviceManager::getDeviceById($value); ?>
|
||||
<div class="label"><?php echo $deviceData['name'];?></div>
|
||||
<select class="input" name="device[<?php echo $deviceData['device_id'];?>]">
|
||||
<option value="1">ON</option>
|
||||
<option value="0">OFF</option>
|
||||
</select>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<input type="submit" class="button" name="modalFinal" value="Next"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user