public function settingsAction() { require_once 'library/Country.php'; require_once 'models/homeModel.php'; $model = new homeModel(); if ($_POST['send'] == "save") { $model->updateSettings($_POST); } $room_name = $model->getRoomNameById($_GET['id']); $lampsByRoomId = $model->getLampsByRoomId($_GET['id']); $timezones = $model->timezone(); $this->_view->title = TITEL_SETTINGS; $this->_view->room_name = $room_name; $this->_view->lampen = $lampsByRoomId; $this->_view->timezones = $timezones; $this->_view->countries = $countries; $this->_view->display('settings/index.tpl.php'); }