Esempio n. 1
0
 public function getFinishedGames()
 {
     $aGames = array();
     $aTeamPersons = $this->getTeamPersons(false);
     foreach ($aTeamPersons as $oTeamPerson) {
         $aTeamGames = $oTeamPerson->getTeam()->getFinishedGames();
         foreach ($aTeamGames as $oGame) {
             if (!isset($aGames[$oGame->date])) {
                 $aGames[$oGame->date] = array();
             }
             $aGames[$oGame->date][$oGame->nefub_id] = array('teamperson' => $oTeamPerson, 'game' => $oGame);
             krsort($aGames[$oGame->date]);
         }
     }
     // From old teams: only the ones the person played in
     $aTeamPersons = $this->getTeamPersons(true, false);
     foreach ($aTeamPersons as $oTeamPerson) {
         $oTeam = $oTeamPerson->getTeam();
         $aGamePersons = GamePerson::getAll(array('person_nefub_id' => $oTeamPerson->person_nefub_id, 'team_nefub_id' => $oTeamPerson->team_nefub_id));
         foreach ($aGamePersons as $oGamePerson) {
             $oGame = $oGamePerson->getGame();
             if (!isset($aGames[$oGame->date])) {
                 $aGames[$oGame->date] = array();
             }
             $aGames[$oGame->date][$oGame->nefub_id] = array('teamperson' => $oTeamPerson, 'game' => $oGame);
             krsort($aGames[$oGame->date]);
         }
     }
     krsort($aGames);
     /*
     		$query = 'SELECT * from 
     			Game
     			WHERE 
     			team_nefub_id 
     WHERE'
     */
     return $aGames;
 }
Esempio n. 2
0
 protected function showGamePersons()
 {
     switch ($this->mode) {
         case 'bewerken':
             $oGamePerson = new GamePerson($this->editId);
             $this->editObject($oGamePerson);
             break;
         default:
             $aGamePersons = GamePerson::getAll(array(), 'id', 'asc');
             $this->assign('aGamePersons', $aGamePersons);
             $this->template = '/personen.tpl';
             $this->showOutput();
     }
 }
Esempio n. 3
0
 public function getTeam2Persons()
 {
     return GamePerson::getAll(array('team_nefub_id' => $this->team2_nefub_id, 'game_nefub_id' => $this->nefub_id), 'shirt_number');
 }