$deviceOwnerUserId, 'name' => $deviceName, 'icon' => $deviceIcon, 'permission' => $permissionsInJson, 'sleep_time' => $sleepTime, 'room_id' => $deviceOwnerRoomId, ); DeviceManager::edit($deviceId, $args); } catch (\Exception $e) { echo $e->message(); } //Debug if (DEBUGMOD == 1) { echo '
';
			echo $permissionsInJson;
			echo $deviceId;
			var_dump(json_decode ($permissionsInJson));
			echo '
'; echo 'CONTINUE'; die(); } } else if (isset($_POST['approveDevice'])) { $deviceId = $_POST['deviceId']; $args = array( 'approved' => 1, ); DeviceManager::edit($deviceId, $args); } else if (isset($_POST['disableDevice'])) { $deviceId = $_POST['deviceId']; $args = array( 'approved' => 2, ); DeviceManager::edit($deviceId, $args); } //Debug if (DEBUGMOD == 1) { echo '
';
		var_dump($POST);
		echo '
'; echo 'CONTINUE'; die(); } header('Location: ' . BASEDIR ); die(); } ?>