PHP_SMART_HOME_V3/app/controllers/sceneController.php
2020-04-28 11:52:14 +02:00

19 lines
486 B
PHP

<?php
if (isset($_POST) && !empty($_POST)){
if (isset($_POST['submitFinal']) && $_POST['submitFinal'] != "") {
SceneManager::create($_POST['sceneIcon'], $_POST['sceneName'], json_encode($_POST['devices']));
header('Location: ' . BASEURL . strtolower(basename(__FILE__, '.php')));
die();
}
//Debug
if (DEBUGMOD == 1) {
echo '<pre>';
var_dump($_POST);
echo '</pre>';
echo '<a href="/' . BASEURL . strtolower(basename(__FILE__, '.php')).'">CONTINUE</a>';
die();
}
}