Example #1
0
 /**
  * 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.");
     }
 }
Example #2
0
 /**
  * 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 "";
             }
         }
     }
 }
Example #3
0
 /**
  * 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.");
     }
 }