diff --git a/application/libraries/AdifHelper.php b/application/libraries/AdifHelper.php index 20ff3f80..9bddfe9d 100644 --- a/application/libraries/AdifHelper.php +++ b/application/libraries/AdifHelper.php @@ -189,6 +189,8 @@ class AdifHelper { $line .= $this->getAdifFieldLine("MY_SOTA_REF", $qso->station_sota); + $line .= $this->getAdifFieldLine("MY_WWFF_REF", $qso->station_wwff); + $line .= $this->getAdifFieldLine("MY_CQ_ZONE", $qso->station_cq); $line .= $this->getAdifFieldLine("MY_ITU_ZONE", $qso->station_itu); diff --git a/application/migrations/096_add_wwff_columns.php b/application/migrations/096_add_wwff_columns.php index d80d0be5..85c85eb9 100644 --- a/application/migrations/096_add_wwff_columns.php +++ b/application/migrations/096_add_wwff_columns.php @@ -17,6 +17,7 @@ class Migration_add_wwff_columns extends CI_Migration { if (!$this->db->field_exists('COL_WWFF_REF', 'TABLE_HRD_CONTACTS_V01')) { $fields = array( 'COL_WWFF_REF VARCHAR(30) DEFAULT NULL', + 'COL_MY_WWFF_REF VARCHAR(50) DEFAULT NULL', ); $this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS'); @@ -27,11 +28,19 @@ class Migration_add_wwff_columns extends CI_Migration { $this->db->set('COL_SIG', ''); $this->db->where('COL_SIG', 'WWFF'); $this->db->update('TABLE_HRD_CONTACTS_V01'); + + // Add MY_WWFF_REF to station profile + $fields = array( + 'station_wwff varchar(50) DEFAULT NULL', + ); + $this->dbforge->add_column('station_profile', $fields); } } public function down() { $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_WWFF_REF'); + $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_MY_WWFF_REF'); + $this->dbforge->drop_column('station_profile', 'station_wwff'); } } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3d42502c..5c900aa4 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -210,6 +210,7 @@ class Logbook_model extends CI_Model { $data['COL_MY_CITY'] = strtoupper(trim($station['station_city'])); $data['COL_MY_IOTA'] = strtoupper(trim($station['station_iota'])); $data['COL_MY_SOTA_REF'] = strtoupper(trim($station['station_sota'])); + $data['COL_MY_WWFF_REF'] = strtoupper(trim($station['station_wwff'])); $data['COL_STATION_CALLSIGN'] = strtoupper(trim($station['station_callsign'])); $data['COL_MY_DXCC'] = strtoupper(trim($station['station_dxcc'])); @@ -2609,6 +2610,7 @@ class Logbook_model extends CI_Model { 'COL_MY_SIG_INFO_INTL' => (!empty($record['my_sig_info_intl'])) ? $record['my_sig_info_intl'] : '', 'COL_MY_SIG_INTL' => (!empty($record['my_sig_intl'])) ? $record['my_sig_intl'] : '', 'COL_MY_SOTA_REF' => (!empty($record['my_sota_ref'])) ? $record['my_sota_ref'] : '', + 'COL_MY_WWFF_REF' => (!empty($record['my_wwff_ref'])) ? $record['my_wwff_ref'] : '', 'COL_MY_STATE' => (!empty($record['my_state'])) ? $record['my_state'] : '', 'COL_MY_STREET' => (!empty($record['my_street'])) ? $record['my_street'] : '', 'COL_MY_STREET_INTL' => (!empty($record['my_street_intl'])) ? $record['my_street_intl'] : '', @@ -2695,6 +2697,7 @@ class Logbook_model extends CI_Model { $data['COL_MY_CITY'] = trim($row['station_city']); $data['COL_MY_IOTA'] = strtoupper(trim($row['station_iota'])); $data['COL_MY_SOTA_REF'] = strtoupper(trim($row['station_sota'])); + $data['COL_MY_WWFF_REF'] = strtoupper(trim($row['station_wwff'])); $data['COL_STATION_CALLSIGN'] = strtoupper(trim($row['station_callsign'])); $data['COL_MY_DXCC'] = strtoupper(trim($row['station_dxcc'])); diff --git a/application/models/Stations.php b/application/models/Stations.php index 9b01ff74..7dcfc8fc 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -64,6 +64,7 @@ class Stations extends CI_Model { 'station_city' => xss_clean($this->input->post('city', true)), 'station_iota' => xss_clean(strtoupper($this->input->post('iota', true))), 'station_sota' => xss_clean(strtoupper($this->input->post('sota', true))), + 'station_wwff' => xss_clean(strtoupper($this->input->post('wwff', true))), 'station_sig' => xss_clean(strtoupper($this->input->post('sig', true))), 'station_sig_info' => xss_clean(strtoupper($this->input->post('sig_info', true))), 'station_callsign' => xss_clean($this->input->post('station_callsign', true)), @@ -89,6 +90,7 @@ class Stations extends CI_Model { 'station_city' => xss_clean($this->input->post('city', true)), 'station_iota' => xss_clean($this->input->post('iota', true)), 'station_sota' => xss_clean($this->input->post('sota', true)), + 'station_wwff' => xss_clean($this->input->post('wwff', true)), 'station_sig' => xss_clean($this->input->post('sig', true)), 'station_sig_info' => xss_clean($this->input->post('sig_info', true)), 'station_callsign' => xss_clean($this->input->post('station_callsign', true)), @@ -242,6 +244,10 @@ class Stations extends CI_Model { $this->db->where('COL_MY_SOTA_REF', $row->station_sota); } + if($row->station_wwff != "") { + $this->db->where('COL_MY_WWFF_REF', $row->station_wwff); + } + if($row->station_sig != "") { $this->db->where('COL_MY_SIG', $row->station_sig); } diff --git a/application/views/station_profile/create.php b/application/views/station_profile/create.php index 9bacc828..d3465829 100644 --- a/application/views/station_profile/create.php +++ b/application/views/station_profile/create.php @@ -192,16 +192,22 @@ Station SOTA reference. +
+ + + Station WWFF reference (e.g. DLFF-0069). +
+
- Station Signature (e.g. WWFF). + Station Signature (e.g. POTA).
- Station Signature Info (e.g. DLFF-0029). + Station Signature Info (e.g. PA-0150).
diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index ac17e08d..fa98abba 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -264,6 +264,21 @@
+
+
+
WWFF
+
+
+ + station_wwff; } ?>"> + Station WWFF reference. +
+
+
+
+ + +
Signature
diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index cffa4ceb..94fd420a 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -359,6 +359,13 @@ COL_TX_PWR; ?>w + + COL_MY_WWFF_REF) { ?> + + Station WWFF Reference + COL_MY_WWFF_REF; ?> + +