function indexAction() { if (!$this->postAds) { $view = new installView(); $result = $view->render(); //показываем форму установки } else { $errMes = $this->postConfig($this->postAds); //получаем результат после проверки пост данных if (!empty($errMes)) { $view = new installView(); $result = $view->render($errMes); //показываем форму установки } else { $this->db = DB::Conn(); if (!is_object($this->db)) { $view = new installView(); $result = $view->render($this->db); //показываем форму установки } else { header('Location: http://' . $_SERVER['HTTP_HOST']); } } } $fc = FrontController::getInstance(); $fc->setBody($result); }