Ejemplo n.º 1
0
 public function renderUpravit()
 {
     $this->addCss("input-specific.css");
     $this->addJs("input-specific.js");
     $this->renderZobrazit();
     $event = $this->template['event'];
     $this->template['games'] = Tables\Event::addNoGame(Views\GameTypeExtended::fetchAll($this->pdo));
     $this->template['links'] = ['back' => ['controller' => 'udalost', 'action' => 'zobrazit', 'id' => $this->getParam('id')], 'submit' => ['controller' => 'udalost', 'action' => 'ulozit']];
 }
Ejemplo n.º 2
0
 public function renderHry()
 {
     $this->addCss("hra.css");
     $this->addJs('odber_prepinac.js');
     $this->template['pageTitle'] = "Výpis her";
     $this->template['col_game'] = 4;
     $games = Views\GameTypeExtended::fetchAll($this->pdo);
     $this->user->setSubscribedItems(Views\Subscription::fetchGamesByUser($this->pdo, $this->user->user_id));
     $this->template['games'] = $games;
 }
Ejemplo n.º 3
0
 private function renderProfile($user)
 {
     $this->addCss('rezervace_vypis.css');
     $this->template['rUser'] = $user;
     $rw = $this->reservationManager->prepareReservationWeek(0, $user->user_id);
     $this->template["reservationDays"] = $rw['days'];
     $this->template['resRend'] = new \model\ReservationRenderer(Tables\Reservation::EARLY_RESERVATION, Tables\Reservation::LATE_RESERVATION);
     $this->template['subscriptions'] = $this->buildSubscriptions($user->user_id);
     $this->template['ratings'] = $this->buildRatings($user->user_id);
     $this->template['games'] = Views\GameTypeExtended::fetchAll($this->pdo);
     $this->template['resLink'] = ['controller' => 'rezervace', 'action' => 'vypis'];
     $this->template['gameListLink'] = ['controller' => 'vypis', 'action' => 'hry'];
     $this->template['resListColSize'] = $this->colSizeFromGet();
 }
Ejemplo n.º 4
0
 public function renderRezervace()
 {
     $this->addCss('rezervace_vypis.css');
     $week = $this->getParam("tyden");
     if (!is_numeric($week)) {
         $week = 0;
     }
     $rw = $this->reservationManager->prepareReservationWeek($week);
     $this->template['reservationWeek'] = $rw;
     $this->template['pageTitle'] = $rw['pageTitle'];
     $this->template['resListColSize'] = $this->colSizeFromGet();
     $this->template['resRend'] = new \model\ReservationRenderer(Tables\Reservation::EARLY_RESERVATION, Tables\Reservation::LATE_RESERVATION);
     $this->template['games'] = Views\GameTypeExtended::fetchAll($this->pdo);
 }
Ejemplo n.º 5
0
 /**
  * 
  * @return Views\GameTypeExtended[]
  */
 private function prepareGames($timePars = [])
 {
     $games = Views\GameTypeExtended::fetchAllWithCounts($this->pdo);
     $date_from = isset($timePars['time_from']) ? $timePars['time_from'] : DatetimeManager::format(strtotime('now'), DatetimeManager::DB_FULL);
     $date_to = isset($timePars['time_to']) ? $timePars['time_to'] : DatetimeManager::format(strtotime('+ 1 month'), DatetimeManager::DB_FULL);
     $resCounts = $this->reservaions->countWithin($date_from, $date_to);
     foreach ($resCounts as $count) {
         $games[$count['game_type_id']]->reservationCount = $count['count'];
     }
     return $games;
 }
Ejemplo n.º 6
0
 public function renderInventory()
 {
     $this->template["game_type"] = Views\GameTypeExtended::fetchAll($this->pdo);
     $this->template["game_box"] = Views\GameBoxExtended::fetchAll($this->pdo, false);
 }
Ejemplo n.º 7
0
 public function renderHromadnyMail()
 {
     $this->addCss('input-specific.css');
     $this->addJs('input-specific.js');
     $this->template['pageTitle'] = 'Hromadný mail';
     $this->template['default_subject'] = MailSender::getDefaultSubject();
     $this->template['send_url'] = ['controller' => 'sprava', 'action' => 'poslatMail'];
     $games = array_merge([$this->mockAllUserGameEntry()], Views\GameTypeExtended::fetchAll($this->pdo));
     $this->template['games'] = $games;
     $this->template['active'] = $this->getParam('id');
 }