function action_with_answer() { $main = new Model_Main(); $new = $main->getActivePetitions('with_answer'); $answer = $main->getAnswers(); $count = $main->countOfSignes(); include_once 'views/answer.php'; }
public function action() { $model = new Model_Category(); $valuesMain['catList'] = $model->getCategoryAll(); $model = new Model_Main(); $values = $model->getIndex(); $view = new View(); $view->addBufferMain('layout', $valuesMain); $view->addBuffers('index', $values); $view->renderBuffer(); }
function action_registration() { $model = new Model_Main(); $host = $_SERVER['HTTP_HOST']; if ($_GET['recieve'] == 1) { $options['result'] = $model->try_registration(); if ($options['result'] == '') { $options['result'] = 'Вы успешно зарегистрированы, теперь вы можете войти.'; $this->view->generate('view_main_login.php', 'view_skeleton_main.php', $data, $auth_opt, $options); } else { $this->view->generate('view_main_registration.php', 'view_skeleton_main.php', $data, $auth_opt, $options); } } else { $this->view->generate('view_main_registration.php', 'view_skeleton_main.php', $data, $auth_opt); } }
public function getMaxPage() { $model = new Model_Main(); $result = $model->getMaxPage(); return $result; }