Exemplo n.º 1
0
 public function ActionRegister()
 {
     if (!isset($_POST['submit'])) {
         $view = new View();
         $view->notification = Notification::Get();
         $view->display('Visitor/register');
     } else {
         $this->Register();
     }
 }
Exemplo n.º 2
0
 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;
     }
 }