public function ActionRegister() { if (!isset($_POST['submit'])) { $view = new View(); $view->notification = Notification::Get(); $view->display('Visitor/register'); } else { $this->Register(); } }
public function init() { //если не авторизован перенаврабляем на страницу авторизации if (!Auth::IsAuth()) { header('location: /visitor/login'); die; } $this->view = new View(); $this->view->notification = Notification::Get(); $stats = Stats::FindByColumn('login', Auth::GetLogin()); if ($stats === false) { Auth::Logout(); header('location: /visitor/login'); die; } $this->view->stats = $stats; $state = State::FindByColumn('login', Auth::GetLogin()); if ($state->state == 'gamer') { header('location: /game'); die; } }