/** * Construct a summary of the active season. * */ function BuildInfoTable($swimteamid = null) { // Alternate the row colors $this->set_alt_color_flag(true); $team = new SwimTeam(); if (is_null($swimteamid)) { $swimteamid = $this->getSwimTeamId(); } if (!is_null($swimteamid) || $team->SwimTeamExistsById($swimteamid)) { $team->LoadSwimTeamById($swimteamid); $this->add_row(html_b("Organization"), SDIFCodeTables::GetOrgCode($team->getOrgCode())); $this->add_row(html_b("Team Code"), $team->getTeamCode()); $this->add_row(html_b("Team Name"), $team->getTeamName()); $this->add_row(html_b("Team Name Abbreviation"), $team->getTeamNameAbrv()); $this->add_row(html_b("Team Addresss 1"), $team->getTeamAddress1()); $this->add_row(html_b("Team Addresss 2"), $team->getTeamAddress2()); $this->add_row(html_b("City"), $team->getTeamCity()); $this->add_row(html_b("State"), $team->getTeamState()); $this->add_row(html_b("Postal Code"), $team->getTeamPostalCode()); $this->add_row(html_b("Country"), SDIFCodeTables::GetCountryCode($team->getTeamCountryCode())); $this->add_row(html_b("Region"), SDIFCodeTables::GetRegionCode($team->getRegionCode())); $this->add_row(html_b("Team Code 5th Character"), $team->getTeamCode5()); } else { $this->add_row("No swim team details available."); } }
/** * Construct a summary of the active season. * */ function BuildInfoTable($swimmerid = null) { include_once 'swimteams.class.php'; // Alternate the row colors $this->set_alt_color_flag(true); $swimmer = new Swimmer(); if (is_null($swimmerid)) { $swimmerid = $this->getSwimmerId(); } if (!is_null($swimmerid) || $swimmer->SwimmerExistsById($swimmerid)) { $swimmer->LoadSwimmerById($swimmerid); $swimteam = new SwimTeam(); $swimteam->LoadSwimTeamById($swimmer->getSwimTeamId()); $this->add_row(html_b("Team Name"), $swimteam->getTeamName()); $this->add_row(html_b("Last Name"), $swimmer->getSwimmerLastName()); $this->add_row(html_b("First Name"), $swimmer->getSwimmerFirstName()); $this->add_row(html_b("Middle Name"), $swimmer->getSwimmerMiddleName()); $this->add_row(html_b("Birth Date"), $swimmer->getBirthDate(true)); $this->add_row(html_b("USS"), $swimmer->getUSS()); $this->add_row(html_b("USS (calculated)"), $swimmer->getUSSNew()); $this->add_row(html_b("Gender"), SDIFCodeTables::GetGenderCode($swimmer->getGender())); } else { $this->add_row("No swim swimmer details available."); } }
/** * Get the array of opponent swim club key and value pairs * * @return mixed - array of opponent swim club key value pairs */ function SwimTeamSelections() { // Swim Club options and labels, seed "None" as an // option as some meet types don't have an opponent. $s = array(ucfirst(FT_NONE) => FT_NULL_ID); $swimteam = new SwimTeam(); $swimteamIds = $swimteam->getAllSwimTeamIds(); // Make sure we have swim clubs to build a list of! if ($swimteamIds != null) { foreach ($swimteamIds as $swimteamId) { $swimteam->LoadSwimTeamById($swimteamId['swimteamid']); $team = $swimteam->getTeamName(); $s[$team] = $swimteam->getSwimTeamId(); } } return $s; }
/** * This method is called only the first time the form * page is hit. This enables u to query a DB and * pre populate the FormElement objects with data. * */ function form_init_data() { $this->set_hidden_element_value('_action', FT_ACTION_UPDATE); $this->set_hidden_element_value('swimteamid', $this->getSwimTeamId()); $swimteam = new SwimTeam(); $swimteam->LoadSwimTeamById($this->getSwimTeamId()); $this->set_element_value('Organization', $swimteam->getOrgCode()); $this->set_element_value('Team Code', $swimteam->getTeamCode()); $this->set_element_value('Team Name', $swimteam->getTeamName()); $this->set_element_value('Team Name Abbreviation', $swimteam->getTeamNameAbrv()); $this->set_element_value('Team Address 1', $swimteam->getTeamAddress1()); $this->set_element_value('Team Address 2', $swimteam->getTeamAddress2()); $this->set_element_value('Team City', $swimteam->getTeamCity()); $this->set_element_value('Team State', $swimteam->getTeamState()); $this->set_element_value('Team Postal Code', $swimteam->getTeamPostalCode()); $this->set_element_value('Team Country', $swimteam->getTeamCountryCode()); $this->set_element_value('Region', $swimteam->getRegionCode()); $this->set_element_value('Team Code 5th Character', $swimteam->getTeamCode5()); }