/** * Return the Citizen Code text based on the supplied * citizen code. Return either "Invalid" or an empty * string when the code cannot be mapped. * * @param string citizen code * @param boolean optional invalid mapping * @return string citizen code description */ function GetCitizenCode($code, $invalid = true) { $FT_SDIF_CITIZEN_CODES = array(FT_SDIF_CITIZENSHIP_CODE_DUAL_VALUE => FT_SDIF_CITIZENSHIP_CODE_DUAL_LABEL, FT_SDIF_CITIZENSHIP_CODE_FOREIGN_VALUE => FT_SDIF_CITIZENSHIP_CODE_FOREIGN_LABEL); // The citizen code can also come from the list of // Country codes so look there first! $cc = SDIFCodeTables::GetCountryCode($code); if ($cc != "") { return $cc; } else { if (array_key_exists($code, $FT_SDIF_CITIZEN_CODES)) { return $FT_SDIF_CITIZEN_CODES[$code]; } else { if ($invalid) { return "Invalid"; } else { return ""; } } } }
/** * 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($resultid = null) { // Alternate the row colors $this->set_alt_color_flag(true); $result = new SwimResult(); if (is_null($resultid)) { $resultid = $this->getResultId(); } if (!is_null($resultid) || $result->ResultExistsById($resultid)) { $result->LoadResultById($resultid); $this->add_row(html_b("Swim Meet Id"), $result->getSwimmeetid()); $this->add_row(html_b("Swim Team Id"), $result->getSwimteamid()); $this->add_row(html_b("Swimmer Id"), $result->getSwimmerid()); $this->add_row(html_b("Organization"), SDIFCodeTables::GetOrgCode($result->getOrgCode())); $this->add_row(html_b("Swimmer Name"), $result->getSwimmerName()); $this->add_row(html_b("USS"), $result->getUSS()); $this->add_row(html_b("USS (new)"), $result->getUSSNew()); $this->add_row(html_b("USS (old)"), $result->getUSSOld()); $this->add_row(html_b("Attached"), SDIFCodeTables::GetAttachedCode($result->getAttachCode())); $this->add_row(html_b("Citizen"), SDIFCOdeTables::GetCitizenCode($result->getCitizenCode())); $this->add_row(html_b("Birth Date"), $result->getBirthDate(true)); $this->add_row(html_b("Age or Class"), $result->getAgeOrClass()); $this->add_row(html_b("Gender"), SDIFCodeTables::GetGenderCode($result->getGender())); $this->add_row(html_b("Event Gender"), SDIFCodeTables::GetEventGenderCode($result->getEventGender())); $this->add_row(html_b("Event Distance"), $result->getEventDistance()); $this->add_row(html_b("Stroke Code"), SDIFCodeTables::GetStrokeCode($result->getStrokeCode())); $this->add_row(html_b("Event Number"), $result->getEventNumber()); $this->add_row(html_b("Event Age Code"), $result->getEventAgeCode()); $this->add_row(html_b("Swim Date"), $result->getSwimDate(true)); $this->add_row(html_b("Seed Time"), $result->getSeedTime()); $this->add_row(html_b("Seed Course"), SDIFCodeTables::GetCourseCode($result->getSeedCourseCode())); $this->add_row(html_b("Prelim Time"), $result->getPrelimTime()); $this->add_row(html_b("Prelim Course"), SDIFCodeTables::GetCourseCode($result->getPrelimCourseCode())); $this->add_row(html_b("Swim Off Time"), $result->getSwimOffTime()); $this->add_row(html_b("Swim Off Course"), SDIFCodeTables::GetCourseCode($result->getSwimOffCourseCode())); $this->add_row(html_b("Finals Time"), $result->getFinalsTime()); $this->add_row(html_b("Finals Course"), SDIFCodeTables::GetCourseCode($result->getFinalsCourseCode())); $this->add_row(html_b("Prelim Heat Number"), $result->getPrelimHeatNumber()); $this->add_row(html_b("Prelim Lane Number"), $result->getPrelimLaneNumber()); $this->add_row(html_b("Finals Heat Number"), $result->getFinalsHeatNumber()); $this->add_row(html_b("Finals Lane Number"), $result->getFinalsLaneNumber()); $this->add_row(html_b("Prelim Place Ranking"), $result->getPrelimPlaceRanking()); $this->add_row(html_b("Finals Place Ranking"), $result->getFinalsPlaceRanking()); $this->add_row(html_b("Finals Points"), $result->getFinalsPoints()); $this->add_row(html_b("Event Time Class Code"), $result->getEventTimeClassCode()); $this->add_row(html_b("Swimmer Flight Status"), $result->getSwimmerFlightStatus()); } else { $this->add_row("No swim result details available."); } }
/** * Construct a summary of the active season. * */ function BuildInfoTable($fulldetails = true, $swimmeetid = null) { // Alternate the row colors $this->set_alt_color_flag(true); $meet = new SwimMeet(); if (is_null($swimmeetid)) { $swimmeetid = $this->getSwimMeetId(); } if (!is_null($swimmeetid) || $meet->SwimMeetExistsById($swimmeetid)) { $meet->LoadSwimMeetById($swimmeetid); $meetstartdate = date("D M j, Y", strtotime($meet->getMeetStart())); $meetenddate = date("D M j, Y", strtotime($meet->getMeetEnd(true))); $meetenddate = date("D M j, Y", strtotime($meet->getMeetEnd(true))); if ($fulldetails) { $this->add_row(html_b("Organization"), SDIFCodeTables::GetOrgCode($meet->getOrgCode())); } $this->add_row(html_b("Meet Name"), $meet->getMeetName()); if ($fulldetails) { $this->add_row(html_b("Meet Addresss 1"), $meet->getMeetAddress1()); } if ($fulldetails) { $this->add_row(html_b("Meet Addresss 2"), $meet->getMeetAddress2()); } $this->add_row(html_b("City"), $meet->getMeetCity()); $this->add_row(html_b("State"), $meet->getMeetState()); if ($fulldetails) { $this->add_row(html_b("Postal Code"), $meet->getMeetPostalCode()); } if ($fulldetails) { $this->add_row(html_b("Country"), SDIFCodeTables::GetCountryCode($meet->getMeetCountryCode())); } $this->add_row(html_b("Type"), SDIFCodeTables::GetMeetCode($meet->getMeetCode())); $this->add_row(html_b("Start Date"), $meetstartdate); $this->add_row(html_b("End Date"), $meetenddate); if ($fulldetails) { $this->add_row(html_b("Pool Altitude (feet)"), $meet->getPoolAltitude()); } $this->add_row(html_b("Course"), SDIFCodeTables::GetCourseCode($meet->getCourseCode())); //$this->add_row(html_b("State"), ucfirst($meet->getLocation())) ; } else { $this->add_row("No swim meet 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."); } }