PHP_SMART_HOME_V3/app/controls/scene.php

20 lines
476 B
PHP
Raw Normal View History

2019-08-23 11:39:42 +00:00
<?php
if (isset($_POST) && !empty($_POST)){
2019-10-11 14:52:52 +00:00
if (sset($_POST['devices']) && $_POST['devices'] != '') {
SceneManager::create($_POST['sceneIcon'], $_POST['sceneName'], json_encode($_POST['devices']));
}
2019-08-23 11:39:42 +00:00
//Debug
if (DEBUGMOD == 1) {
echo '<pre>';
var_dump($_POST);
echo '</pre>';
2019-10-11 14:32:05 +00:00
echo '<a href="/' . BASEDIR . strtolower(basename(__FILE__, '.php')).'">CONTINUE</a>';
2019-08-23 11:39:42 +00:00
die();
}
2019-10-11 14:32:05 +00:00
header('Location: ' . BASEDIR . strtolower(basename(__FILE__, '.php')));
2019-08-23 11:39:42 +00:00
die();
}