From a9f97537ea07f99bd8dc12592dfd5e379f6dd840 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Fri, 4 Oct 2024 21:28:19 +0000 Subject: [PATCH] added cabrillo value "certificate" --- application/controllers/Cabrillo.php | 1 + application/libraries/Cabrilloformat.php | 6 +++++- application/views/cabrillo/export.php | 2 +- application/views/cabrillo/index.php | 8 ++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/application/controllers/Cabrillo.php b/application/controllers/Cabrillo.php index 73264612b..95764fd63 100644 --- a/application/controllers/Cabrillo.php +++ b/application/controllers/Cabrillo.php @@ -131,6 +131,7 @@ class Cabrillo extends CI_Controller { $data['addresscountry'] = $this->security->xss_clean($this->input->post('addresscountry')); $data['soapbox'] = $this->security->xss_clean($this->input->post('soapbox')); $data['gridlocator'] = $station->station_gridsquare; + $data['certificate'] = $this->security->xss_clean($this->input->post('certificate')); $this->load->view('cabrillo/export', $data); }else { diff --git a/application/libraries/Cabrilloformat.php b/application/libraries/Cabrilloformat.php index cf1e01d9f..7d3500f20 100644 --- a/application/libraries/Cabrilloformat.php +++ b/application/libraries/Cabrilloformat.php @@ -5,7 +5,7 @@ class Cabrilloformat { public function header($contest_id, $callsign, $claimed_score, $operators, $club, $location, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator, - $categoryoverlay, $categorytransmitter, $categorytime, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email) { + $categoryoverlay, $categorytransmitter, $categorytime, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email, $certificate) { $cab_header = ""; $cab_header .= "START-OF-LOG: 3.0"."\r\n"; $cab_header .= "CONTEST: ".$contest_id."\r\n"; @@ -43,6 +43,10 @@ class Cabrilloformat { $cab_header .= "ADDRESS-COUNTRY: ".$addresscountry."\r\n"; $cab_header .= "EMAIL: ".$email."\r\n"; $cab_header .= "SOAPBOX: ".$soapbox."\r\n"; + + if ($certificate != null || $certificate != "") { + $cab_header .= "CERTIFICATE: ".$certificate."\r\n"; + } if($gridlocator != null) { $cab_header .= "GRID-LOCATOR: ".$gridlocator."\r\n"; diff --git a/application/views/cabrillo/export.php b/application/views/cabrillo/export.php index 5e8d6af92..aeba10dba 100644 --- a/application/views/cabrillo/export.php +++ b/application/views/cabrillo/export.php @@ -7,7 +7,7 @@ $CI->load->library('Cabrilloformat'); echo $CI->cabrilloformat->header($contest_id, $callsign, $claimed_score, $operators, $club, $location, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator, - $categoryoverlay, $categorytransmitter, $categorytime, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email); + $categoryoverlay, $categorytransmitter, $categorytime, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email, $certificate); foreach ($qsos->result() as $row) { echo $CI->cabrilloformat->qso($row); } diff --git a/application/views/cabrillo/index.php b/application/views/cabrillo/index.php index 0ea33531e..7956b7fa3 100644 --- a/application/views/cabrillo/index.php +++ b/application/views/cabrillo/index.php @@ -188,6 +188,14 @@
:
+