admin.aprsto/htdocs/includes/models/cadatabase.class.php
Steve White ae9ece5266 *** Initial Commit of Files for APRS.TO Backend Administration Panel ***
This code is non-functional at this point.
2025-02-02 15:53:34 -05:00

71 lines
1.3 KiB
PHP

<?php
class CADatabase extends Model
{
public function __construct($id)
{
parent::__construct($id);
}
/**
* Get the call sign of the station
*
* @return string (Call sign of the licensee)
*/
public function getCallSign()
{
return trim($this->callSign);
}
/**
* Get the license class from the Canadian License file for the station
*
* @return array (false on no records found)
*/
public function getLicenseClass()
{
if ($this->advancedQualification == 'D')
{
return 'Advanced';
}
else if ($this->basicWithHonors == 'E')
{
return 'Basic w/ Honors';
}
else if ($this->basicQualification == 'E')
{
return 'Basic';
}
}
/**
* Get the license status from the Canadian database for the station
*
* @return boolean (true if vanity call else false)
*/
public function isClub()
{
return $this->clubName1 != null ? true : false;
}
/**
* Get the license qualification codes from the Canadian database for the station
*
* @return boolean (true if vanity call else false)
*/
public function getQualifications()
{
return
$this->basicQualification
.$this->fiveWpmQualification
.$this->twelveWpmQualification
.$this->advancedQualification
.$this->basicWithHonors;
}
}
?>