public function getTeam() { if ($this->teamObj == UNPREPARED) { $this->teamObj = Team::getTeam($this->team); } return $this->teamObj; }
/** * static function to find players on other teams for any game */ public static function OtherTeams($teamID, $playerID) { $tournamentName = "2016"; // @todo Tournament::currentTournamentName(); $params = array('id' => $playerID); $player = CRM_Contact_BAO_Contact::retrieve($params, $defaults); $playerName = $player->sort_name; $team = Team::getTeam($teamID, $values); $team->otherTeamGamePlayerMessages('E', self::$_E, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('O', self::$_O, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('L', self::$_L, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('P', self::$_P, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('M', self::$_M, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('A', self::$_A, $playerID, $playerName, $tournamentName, $messages); $team->otherTeamGamePlayerMessages('W', self::$_W, $playerID, $playerName, $tournamentName, $messages); return $messages; }
- <?php echo $per->getAddress()->getCity(); ?> / <?php echo $per->getAddress()->getState(); ?> </p> <p><label>Observações</label>: <?php echo $per->getAddress()->getPs(); ?> </p> <?php break; case 'team': $cod = filter_input(INPUT_POST, 'cod', FILTER_SANITIZE_NUMBER_INT); $team = Team::getTeam('WHERE id_team = ' . $cod); ?> <p><label>Nome Equipe</label>: <?php echo $team->getName(); ?> </p> <p><label>Líder</label>: <?php echo $team->getLeader()->getName(); ?> </p> <p><label>Status</label>: <?php echo $team->getStatus(); ?> <p><label>Integrantes</label>:<br/> <?php
public static function getMissions($where = null) { $dados = Database::ReadAll("mission", "*", $where); if (!$dados) { return ''; } foreach ($dados as $dado) { $mission = new Mission(); $mission->setId($dado['ID_MISSION']); $mission->setName($dado['NAME_MISSION']); $mission->setDateBegin($dado['DATE_INICIAL']); $mission->setDateEnd($dado['DATE_END']); $mission->setStatus($dado['STATUS']); $team = Team::getTeam("WHERE id_team = " . $dado['ID_TEAM']); $mission->setTeam($team); if (!empty($dado['ID_ADDRESS'])) { $address = Address::getAddress("AND id_address = " . $dado['ID_ADDRESS']); $mission->setAddress($address); } if (!empty($dado['ID_CHURCH'])) { $church = Church::getChurch("WHERE id_church = " . $dado['ID_CHURCH']); $mission->setChurch($church); } $missions[] = $mission; } return $missions; }
break; case 'remove': $user = Person::getPersonBySUNetID($sunetid); if ($user) { if ($user->getTeam()->getID() == $team_id) { $user->makeChanges(array('team' => null)); $user->doUpdate("Removed user {$sunetid} successfully."); } else { add_notification("User {$sunetid} is not on this team!"); } } else { add_notification("No user with SUNetID {$sunetid} exists!"); } break; case 'rename': $team = Team::getTeam($team_id); $team->makeChanges(array('name' => $team_name)); $team->doUpdate("Changed name to {$team_name} successfully."); break; } // VIEW $page = new UIPage(); // condition on whether user is admin function team_summary($position, Team $team) { switch ($position) { case POSITION_NONE: return ''; case POSITION_ACCOUNT: case POSITION_PLAYER: return '<b>' . $team->getName() . '</b>';
function getTeam() { $team = new Team(); echo $team->getTeam(); }
<?php if ($_SESSION['login']['role'] < 2) { echo '<h2 style="text-align: center; vertical-align: middle">Página Restrita</h2>'; } else { include_once 'class/Team.php'; $id = filter_input(INPUT_GET, 'cod', FILTER_SANITIZE_NUMBER_INT); if (Team::getTeam("WHERE id_team = {$id}")) { $team = Team::getTeam("WHERE id_team = {$id}"); } else { echo '<script>window.location = "index.php";</script>'; } ?> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">Alterar Equipe</h1> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="col-md-6 col-md-offset-3"> <ul class="nav nav-wizard"> <li class="active" id="1"><a href="#">Dados da Equipe</a></li> <li class="disabled" id="2"><a href="#">Finalizar</a></li> </ul> </div> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="box dark">