From 8f1dcf3db62c5da2b73b083cf0c83b291c3b6528 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sun, 17 May 2020 14:57:28 +0200 Subject: [PATCH 1/6] Make modes customizable and editable As per request of some users, sometimes new modes or missing modes had to be added into the code. As that hardcoded lists are not eary maintainable, we created a new table with all modes and submodes listed and make this list editable. Now one can activate or deativate modes from beeing shown within the select- list in QSO Window. --- application/config/migration.php | 2 +- application/controllers/Mode.php | 93 +++++++++ application/controllers/Qso.php | 7 +- .../controllers/Uncfmd_Entity_Slots.php | 114 +++++++++++ application/libraries/Frequency.php | 41 ++-- .../migrations/041_create_modes_table.php | 180 ++++++++++++++++++ application/models/Modes.php | 61 ++++++ application/views/interface_assets/header.php | 6 +- application/views/mode/create.php | 64 +++++++ application/views/mode/edit.php | 69 +++++++ application/views/mode/index.php | 48 +++++ application/views/qso/index.php | 5 +- 12 files changed, 655 insertions(+), 35 deletions(-) create mode 100644 application/controllers/Mode.php create mode 100644 application/controllers/Uncfmd_Entity_Slots.php create mode 100644 application/migrations/041_create_modes_table.php create mode 100644 application/models/Modes.php create mode 100644 application/views/mode/create.php create mode 100644 application/views/mode/edit.php create mode 100644 application/views/mode/index.php diff --git a/application/config/migration.php b/application/config/migration.php index 31de43d68..37cfddba8 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 40; +$config['migration_version'] = 41; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Mode.php b/application/controllers/Mode.php new file mode 100644 index 000000000..a5afe7c3e --- /dev/null +++ b/application/controllers/Mode.php @@ -0,0 +1,93 @@ +load->helper(array('form', 'url')); + + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function index() + { + $this->load->model('modes'); + + $data['modes'] = $this->modes->all(); + + // Render Page + $data['page_title'] = "Modes"; + $this->load->view('interface_assets/header', $data); + $this->load->view('mode/index'); + $this->load->view('interface_assets/footer'); + } + + public function create() + { + $this->load->model('modes'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('mode', 'Mode', 'required'); + $this->form_validation->set_rules('qrgmode', 'QRG-Mode', 'required'); + + if ($this->form_validation->run() == FALSE) + { + $data['page_title'] = "Create Mode"; + $this->load->view('interface_assets/header', $data); + $this->load->view('mode/create'); + $this->load->view('interface_assets/footer'); + } + else + { + $this->modes->add(); + + redirect('mode'); + } + } + + public function edit($id) + { + $this->load->library('form_validation'); + + $this->load->model('modes'); + + $item_id_clean = $this->security->xss_clean($id); + + $mode_query = $this->modes->mode($item_id_clean); + + $data['my_mode'] = $mode_query->row(); + + $data['page_title'] = "Edit Mode"; + + $this->form_validation->set_rules('mode', 'Mode', 'required'); + $this->form_validation->set_rules('qrgmode', 'QRG-Mode', 'required'); + + if ($this->form_validation->run() == FALSE) + { + $this->load->view('interface_assets/header', $data); + $this->load->view('mode/edit'); + $this->load->view('interface_assets/footer'); + } + else + { + $this->modes->edit(); + + $data['notice'] = "Mode ".$this->security->xss_clean($this->input->post('mode', true))." Updated"; + + redirect('mode'); + } + } + + public function delete($id) { + $this->load->model('modes'); + $this->modes->delete($id); + + redirect('mode'); + } +} \ No newline at end of file diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 483f5d483..e69c831aa 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -16,7 +16,8 @@ class QSO extends CI_Controller { $this->load->model('stations'); $this->load->model('logbook_model'); $this->load->model('user_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + $this->load->model('modes'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $data['active_station_profile'] = $this->stations->find_active(); $data['notice'] = false; @@ -24,7 +25,9 @@ class QSO extends CI_Controller { $data['radios'] = $this->cat->radios(); $data['query'] = $this->logbook_model->last_custom('5'); $data['dxcc'] = $this->logbook_model->fetchDxcc(); - $data['iota'] = $this->logbook_model->fetchIota(); + $data['iota'] = $this->logbook_model->fetchIota(); + $data['modes'] = $this->modes->active(); + $this->load->library('form_validation'); diff --git a/application/controllers/Uncfmd_Entity_Slots.php b/application/controllers/Uncfmd_Entity_Slots.php new file mode 100644 index 000000000..e197f96ad --- /dev/null +++ b/application/controllers/Uncfmd_Entity_Slots.php @@ -0,0 +1,114 @@ +load->helper(array('form', 'url')); + + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function index() + { + $this->load->model('user_model'); + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + $data['page_title'] = "Showing unconfirmed Entities with Slots"; + + $this->load->view('interface_assets/header', $data); + $this->load->view('uncfmd_entity_slots/index'); + $this->load->view('interface_assets/footer'); + + } + + public function exportadif() + { + // Set memory limit to unlimited to allow heavy usage + ini_set('memory_limit', '-1'); + + $this->load->model('adif_data'); + + $data['qsos'] = $this->adif_data->export_printrequested(); + + $this->load->view('adif/data/exportall', $data); + } + + public function exportcsv() + { + // Set memory limit to unlimited to allow heavy usage + ini_set('memory_limit', '-1'); + + $this->load->model('logbook_model'); + + $myData = $this->logbook_model->get_qsos_for_printing(); + + // file name + $filename = 'qsl_export.csv'; + header("Content-Description: File Transfer"); + header("Content-Disposition: attachment; filename=$filename"); + header("Content-Type: application/csv;charset=iso-8859-1"); + + // file creation + $file = fopen('php://output', 'w'); + + $header = array("STATION_CALLSIGN", + "COL_CALL", + "COL_QSL_VIA", + "COL_TIME_ON", + "COL_MODE", + "COL_FREQ", + "COL_BAND", + "COL_RST_SENT", + "COL_SAT_NAME", + "COL_SAT_MODE", + "COL_QSL_RCVD", + "COL_COMMENT", + "COL_ROUTING", + "ADIF", + "ENTITY"); + + fputcsv($file, $header); + + foreach ($myData->result() as $qso) { + fputcsv($file, + array($qso->STATION_CALLSIGN, + str_replace("0", "Ø", $qso->COL_CALL), + $qso->COL_QSL_VIA!=""?"Via ".str_replace("0", "Ø", $qso->COL_QSL_VIA):"", + $qso->COL_TIME_ON, + $qso->COL_MODE, + $qso->COL_FREQ, + $qso->COL_BAND, + $qso->COL_RST_SENT, + $qso->COL_SAT_NAME, + $qso->COL_SAT_MODE, + $qso->COL_QSL_RCVD =='Y'?'TNX QSL':'PSE QSL', + $qso->COL_COMMENT, + $qso->COL_ROUTING, + $qso->ADIF, + $qso->ENTITY)); + } + + fclose($file); + exit; + } + + function qsl_printed() { + $this->load->model('qslprint_model'); + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + // Update Logbook to Mark Paper Card Received + + $this->qslprint_model->mark_qsos_printed(); + + $this->session->set_flashdata('notice', 'QSOs are marked as sent via buro'); + + redirect('logbook'); + } +} + +/* End of file Qslprint.php */ +/* Location: ./application/controllers/Qslprint.php */ \ No newline at end of file diff --git a/application/libraries/Frequency.php b/application/libraries/Frequency.php index 0c21b3430..f5c528432 100644 --- a/application/libraries/Frequency.php +++ b/application/libraries/Frequency.php @@ -1,11 +1,6 @@ array( 'SSB'=>"1900000", @@ -85,32 +80,22 @@ class Frequency { 'CW'=>"10225000000") ); - /* Class to convert band and mode into a frequnecy in a format based on the specifications of the database table */ - public function convent_band($band, $mode='SSB') - { - // Modes for which we've set a frequency - $known_modes = array('SSB', 'DATA', 'CW'); - - // Data modes that are being treated as 'DATA' for frequency lookup - $data_modes = array('PSK31','PSK63','RTTY', - 'JT65','JT65B','JT6C','JT9-1','JT9','FT4','FT8', 'JS8', - 'FSK441','JTMS','ISCAT','MSK144','JTMSK', - 'QRA64','PKT','SSTV','HELL','HELL80','MFSK16', 'JT6M', 'ROS'); - - // Use 'DATA' for any of the data modes - if(in_array($mode, $data_modes)){ - $mode= "DATA"; - } - - // If the mode isn't listed, default to SSB frequency - if (!in_array($mode, $known_modes)){ - $mode = 'SSB'; - } + /* Class to convert band and mode into a frequency in a format based on the specifications of the database table */ + public function convent_band($band, $mode='SSB') { + // Converting LSB and USB to SSB + if($mode =='LSB' or $mode =='USB'){ + $mode= "SSB"; + } + + // Use 'DATA' for any of the data modes + if($mode !='CW' and $mode !='SSB'){ + $mode= "DATA"; + } return $this->defaultFrequencies[$band][$mode]; - } + } - public function GetBand($Frequency) { + public function GetBand($Frequency) { $Band = NULL; if ($Frequency > 1000000 && $Frequency < 2000000) { $Band = "160m"; diff --git a/application/migrations/041_create_modes_table.php b/application/migrations/041_create_modes_table.php new file mode 100644 index 000000000..1d28ff0d9 --- /dev/null +++ b/application/migrations/041_create_modes_table.php @@ -0,0 +1,180 @@ +dbforge->add_field('id'); + + $this->dbforge->add_field(array( + 'mode' => array( + 'type' => 'VARCHAR', + 'constraint' => 12, + ), + 'qrgmode' => array( + 'type' => 'VARCHAR', + 'constraint' => 4, + ), + 'active' => array( + 'type' => 'INT', + ), + )); + $this->dbforge->create_table('adif_modes'); + + + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('AM', 'SSB', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('AMTORFEC', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ARDOP', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ASCI', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ATV', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('C4FM', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP128', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP64', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CLO', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CONTESTI', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CW', 'CW', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DIGITALVOICE', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINO', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINOEX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINOF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DSTAR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FAX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FM', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FMHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSK31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSK441', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSKHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSQCALL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FT4', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FT8', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('GTOR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HELL', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HELL80', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HFSK', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT-A', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT-B', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JS8', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT44', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4G', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65B', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65B2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65C2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT6C', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT6M', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-1', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-30', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-5', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9E FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9F FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9G', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9G FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9H', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9H FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JTMS', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JTMSK', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('LSB', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK11', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK128', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK16', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK22', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK32', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK64', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK8', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MSK144', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MT63', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 16/1000', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 16/500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 32/1000', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 4/125', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 4/250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 8/250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 8/500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA-BEACON', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA-QSO', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC3', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAX2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PCW', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PKT', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK1000', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK125', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK2K', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK31', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK63', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK63F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM50', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKFEC31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('Q15', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK125', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK31', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK63', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-EME', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-HF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-MF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('RTTY', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('RTTYM', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SIM31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SSB', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SSTV', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('T10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THOR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THRB', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THRBX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('TOR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('USB', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('V4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('VOI', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('WINMOR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('WSPR', 'DATA', 0);"); + } + + public function down(){ + $this->dbforge->drop_table('config'); + } +} diff --git a/application/models/Modes.php b/application/models/Modes.php new file mode 100644 index 000000000..1cdba3a34 --- /dev/null +++ b/application/models/Modes.php @@ -0,0 +1,61 @@ +db->get('adif_modes'); + } + + function active() { + $this->db->where('active', 1); + return $this->db->get('adif_modes'); + } + + function mode($id) { + // Clean ID + $clean_id = $this->security->xss_clean($id); + + + $this->db->where('id', $clean_id); + return $this->db->get('adif_modes'); + } + + + function add() { + $data = array( + 'mode' => xss_clean($this->input->post('mode', true)), + 'qrgmode' => xss_clean(strtoupper($this->input->post('qrgmode', true))), + 'active' => xss_clean($this->input->post('active', true)), + ); + + $this->db->insert('adif_modes', $data); + } + + function edit() { + $data = array( + 'mode' => xss_clean($this->input->post('mode', true)), + 'qrgmode' => xss_clean(strtoupper($this->input->post('qrgmode', true))), + 'active' => xss_clean($this->input->post('active', true)), + ); + + $this->db->where('id', xss_clean($this->input->post('id', true))); + $this->db->update('adif_modes', $data); + } + + function delete($id) { + // Clean ID + $clean_id = $this->security->xss_clean($id); + + // Delete Mode + $this->db->delete('adif_modes', array('id' => $clean_id)); + } + +} + +?> \ No newline at end of file diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 5652842e0..004804e4a 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -94,7 +94,11 @@ Station Profiles - + + + QSO Modes + + Radio Interface diff --git a/application/views/mode/create.php b/application/views/mode/create.php new file mode 100644 index 000000000..9fbca43ba --- /dev/null +++ b/application/views/mode/create.php @@ -0,0 +1,64 @@ + +
+ +
+ session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ + +
+
+ +
+
+
+

+ + session->flashdata('notice')) { ?> +
+ session->flashdata('notice'); ?> +
+ + + load->helper('form'); ?> + + + +
+
+ + + Name of mode in ADIF-specification +
+ +
+ + + Defines the QRG-segment in bandplan. +
+ +
+ + + Set to active if to be listed in Modes-list +
+ + + +
+
+
+ +
+ +
\ No newline at end of file diff --git a/application/views/mode/edit.php b/application/views/mode/edit.php new file mode 100644 index 000000000..0af936856 --- /dev/null +++ b/application/views/mode/edit.php @@ -0,0 +1,69 @@ + +
+ +
+ session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ + +
+
+ mode; ?> +
+
+
+

+ session->flashdata('notice')) { ?> +
+ session->flashdata('notice'); ?> +
+ + + load->helper('form'); ?> + + + +
+ + +
+ + mode; } ?>" required> + Name of mode in ADIF-specification +
+ +
+ + + Defines the QRG-segment in bandplan. +
+ +
+ + + Set to active if to be listed in Modes-list +
+ + + +
+
+
+ +
+ +
\ No newline at end of file diff --git a/application/views/mode/index.php b/application/views/mode/index.php new file mode 100644 index 000000000..f414f2451 --- /dev/null +++ b/application/views/mode/index.php @@ -0,0 +1,48 @@ +
+ +
+ session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ + +
+
+ +
+
+

This is the place you can customize your modes-list by activating/deactivating modes to be shown in the select-list.

+ + + + + + + + + + + + result() as $row) { ?> + + + + + + + + + + +
ModeSSB/DATA/CWActive
mode;?> (#id;?>)qrgmode;?>active == 1) { echo "active";} else { echo "not active";};?> + id; ?>" class="btn btn-info btn-sm"> Edit + + id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete mode mode; ?> ');"> Delete
+

Create a Mode

+ + + + + \ No newline at end of file diff --git a/application/views/qso/index.php b/application/views/qso/index.php index f16347f44..4ebfc69be 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -66,9 +66,8 @@ From ece34b756abcb6b080aabe68c994c14f0a75f829 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sun, 17 May 2020 15:08:21 +0200 Subject: [PATCH 2/6] Added all modes in edit mode... --- application/controllers/Qso.php | 2 ++ application/views/qso/edit.php | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index e69c831aa..d75502339 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -102,6 +102,7 @@ class QSO extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('user_model'); + $this->load->model('modes'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $query = $this->logbook_model->qso_info($this->uri->segment(3)); @@ -114,6 +115,7 @@ class QSO extends CI_Controller { $data['qso'] = $query->row(); $data['dxcc'] = $this->logbook_model->fetchDxcc(); $data['iota'] = $this->logbook_model->fetchIota(); + $data['modes'] = $this->modes->all(); if ($this->form_validation->run() == FALSE) { diff --git a/application/views/qso/edit.php b/application/views/qso/edit.php index 63606e931..a7ca1c8d9 100755 --- a/application/views/qso/edit.php +++ b/application/views/qso/edit.php @@ -70,12 +70,11 @@
From 396eaab53adc82a6f7007c5295fd294d9ea2a45d Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sun, 24 May 2020 00:06:08 +0200 Subject: [PATCH 3/6] Added Submode-Support in Logging/ADIF-Export etc. --- .../migrations/041_create_modes_table.php | 303 +++++++++--------- application/models/Logbook_model.php | 43 ++- application/models/Modes.php | 10 + application/views/adif/data/clublog.php | 2 +- .../views/adif/data/clublog_realtime.php | 2 +- application/views/adif/data/exportall.php | 2 +- application/views/adif/data/exportsat.php | 2 +- application/views/mode/create.php | 6 + application/views/mode/edit.php | 6 + application/views/mode/index.php | 4 +- application/views/qso/edit.php | 7 +- application/views/qso/index.php | 6 +- application/views/view_log/partial/log.php | 2 +- 13 files changed, 233 insertions(+), 162 deletions(-) diff --git a/application/migrations/041_create_modes_table.php b/application/migrations/041_create_modes_table.php index 1d28ff0d9..1d8f4e2af 100644 --- a/application/migrations/041_create_modes_table.php +++ b/application/migrations/041_create_modes_table.php @@ -12,6 +12,11 @@ class Migration_create_modes_table extends CI_Migration { 'type' => 'VARCHAR', 'constraint' => 12, ), + 'submode' => array( + 'type' => 'VARCHAR', + 'constraint' => 12, + 'null' => TRUE, + ), 'qrgmode' => array( 'type' => 'VARCHAR', 'constraint' => 4, @@ -23,155 +28,155 @@ class Migration_create_modes_table extends CI_Migration { $this->dbforge->create_table('adif_modes'); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('AM', 'SSB', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('AMTORFEC', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ARDOP', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ASCI', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ATV', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('C4FM', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP128', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CHIP64', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CLO', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CONTESTI', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('CW', 'CW', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DIGITALVOICE', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINO', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINOEX', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DOMINOF', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('DSTAR', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FAX', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FM', 'SSB', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FMHELL', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSK31', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSK441', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSKHELL', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FSQCALL', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FT4', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('FT8', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('GTOR', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HELL', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HELL80', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('HFSK', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT-A', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ISCAT-B', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JS8', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT44', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4A', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4B', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4C', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4D', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4E', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4F', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT4G', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65A', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65B', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65B2', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65C', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT65C2', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT6C', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT6M', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-1', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-10', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-2', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-30', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9-5', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9A', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9B', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9C', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9D', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9E', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9E FAST', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9F', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9F FAST', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9G', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9G FAST', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9H', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JT9H FAST', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JTMS', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('JTMSK', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('LSB', 'SSB', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK11', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK128', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK16', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK22', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK31', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK32', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK4', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK64', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MFSK8', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MSK144', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('MT63', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 16/1000', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 16/500', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 32/1000', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 4/125', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 4/250', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 8/250', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OLIVIA 8/500', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA-BEACON', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('OPERA-QSO', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC2', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC3', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAC4', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAX', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PAX2', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PCW', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PKT', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK10', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK1000', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK125', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK250', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK2K', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK31', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK500', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK63', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSK63F', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM10', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM31', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKAM50', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKFEC31', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('PSKHELL', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('Q15', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK125', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK250', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK31', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK500', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QPSK63', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64A', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64B', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64C', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64D', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('QRA64E', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-EME', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-HF', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('ROS-MF', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('RTTY', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('RTTYM', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SIM31', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SSB', 'SSB', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('SSTV', 'DATA', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('T10', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THOR', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THRB', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('THRBX', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('TOR', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('USB', 'SSB', 1);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('V4', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('VOI', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('WINMOR', 'DATA', 0);"); - $this->db->query("INSERT INTO `adif_modes` (`mode`, `qrgmode`, `active`) VALUES ('WSPR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('AM', NULL, 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ARDOP', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ATV', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('C4FM', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CHIP', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CHIP', 'CHIP128', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CHIP', 'CHIP64', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CLO', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CONTESTI', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CW', NULL, 'CW', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('CW', 'PCW', 'CW', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('DIGITALVOICE', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('DOMINO', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('DOMINO', 'DOMINOEX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('DOMINO', 'DOMINOF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('DSTAR', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('FAX', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('FM', NULL, 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('FSK441', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('FT8', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', 'FMHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', 'FSKHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', 'HELL80', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', 'HFSK', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('HELL', 'PSKHELL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ISCAT', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ISCAT', 'ISCAT-A', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ISCAT', 'ISCAT-B', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT4', 'JT4G', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT44', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', 'JT65A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', 'JT65B', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', 'JT65B2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', 'JT65C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT65', 'JT65C2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT6C', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT6M', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9-1', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9-10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9-2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9-30', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9-5', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9E FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9F FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9G', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9G FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9H', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JT9', 'JT9H FAST', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JTMS', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('JTMSK', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'FSQCALL', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'FT4', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'JS8', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK11', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK128', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK16', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK22', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK32', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK64', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MFSK', 'MFSK8', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MSK144', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('MT63', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 16/10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 16/50', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 32/10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 4/125', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 4/250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 8/250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OLIVIA', 'OLIVIA 8/500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OPERA', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OPERA', 'OPERA-BEACON', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('OPERA', 'OPERA-QSO', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAC', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAC', 'PAC2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAC', 'PAC3', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAC', 'PAC4', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAX', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PAX', 'PAX2', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PKT', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'FSK31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK1000', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK125', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK31', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK63', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSK63F', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSKAM10', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSKAM31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSKAM50', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'PSKFEC31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'QPSK125', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'QPSK250', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'QPSK31', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'QPSK500', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'QPSK63', 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK', 'SIM31', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('PSK2K', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('Q15', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', 'QRA64A', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', 'QRA64B', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', 'QRA64C', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', 'QRA64D', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('QRA64', 'QRA64E', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ROS', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ROS', 'ROS-EME', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ROS', 'ROS-HF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('ROS', 'ROS-MF', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('RTTY', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('RTTY', 'ASCI', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('RTTYM', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('SSB', NULL, 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('SSB', 'LSB', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('SSB', 'USB', 'SSB', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('SSTV', NULL, 'DATA', 1);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('T10', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('THOR', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('THRB', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('THRB', 'THRBX', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('TOR', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('TOR', 'AMTORFEC', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('TOR', 'GTOR', 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('V4', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('VOI', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('WINMOR', NULL, 'DATA', 0);"); + $this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('WSPR', NULL, 'DATA', 0);"); } public function down(){ diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 23431d910..b28f5d525 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -65,6 +65,13 @@ class Logbook_model extends CI_Model { $dxcc_id = $this->input->post('dxcc_id'); } + $mode = $this->get_main_mode_if_submode($this->input->post('mode')); + if ($mode == null) { + $mode = $this->input->post('mode'); + $submode = null; + } else { + $submode = $this->input->post('mode'); + } // Create array with QSO Data $data = array( 'COL_TIME_ON' => $datetime, @@ -72,7 +79,8 @@ class Logbook_model extends CI_Model { 'COL_CALL' => strtoupper(trim($this->input->post('callsign'))), 'COL_BAND' => $this->input->post('band'), 'COL_FREQ' => $this->parse_frequency($this->input->post('freq_display')), - 'COL_MODE' => $this->input->post('mode'), + 'COL_MODE' => $mode, + 'COL_SUBMODE' => $submode, 'COL_RST_RCVD' => $this->input->post('rst_recv'), 'COL_RST_SENT' => $this->input->post('rst_sent'), 'COL_NAME' => $this->input->post('name'), @@ -414,6 +422,10 @@ class Logbook_model extends CI_Model { $adif .= '' . $data['COL_BAND']; $adif .= '' . $data['COL_MODE']; + if ($data['COL_SUBMODE']) { + $adif .= '' . $data['COL_SUBMODE']; + } + if($data['COL_FREQ'] != "0") { $freq_in_mhz = $data['COL_FREQ'] / 1000000; $adif .= '' . $freq_in_mhz; @@ -523,16 +535,24 @@ class Logbook_model extends CI_Model { /* Edit QSO */ function edit() { - $entity = $this->get_entity($this->input->post('dxcc_id')); - $country = $entity['name']; + $entity = $this->get_entity($this->input->post('dxcc_id')); + $country = $entity['name']; + $mode = $this->get_main_mode_if_submode($this->input->post('mode')); + if ($mode == null) { + $mode = $this->input->post('mode'); + $submode = null; + } else { + $submode = $this->input->post('mode'); + } $data = array( 'COL_TIME_ON' => $this->input->post('time_on'), 'COL_TIME_OFF' => $this->input->post('time_off'), 'COL_CALL' => strtoupper(trim($this->input->post('callsign'))), 'COL_BAND' => $this->input->post('band'), 'COL_FREQ' => $this->parse_frequency($this->input->post('freq')), - 'COL_MODE' => $this->input->post('mode'), + 'COL_MODE' => $mode, + 'COL_SUBMODE' => $submode, 'COL_RST_RCVD' => $this->input->post('rst_recv'), 'COL_RST_SENT' => $this->input->post('rst_sent'), 'COL_GRIDSQUARE' => strtoupper(trim($this->input->post('locator'))), @@ -768,6 +788,7 @@ class Logbook_model extends CI_Model { COL_QSL_VIA, COL_TIME_ON, COL_MODE, + COL_SUBMODE, COL_FREQ, UPPER(COL_BAND) as COL_BAND, COL_RST_SENT, @@ -790,7 +811,7 @@ class Logbook_model extends CI_Model { } function get_qsos($num, $offset) { - $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*'); + $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*'); $this->db->from($this->config->item('table_name')); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); @@ -1902,6 +1923,18 @@ class Logbook_model extends CI_Model { return $my_error; } + function get_main_mode_if_submode($mode) { + $this->db->select('mode'); + $this->db->where('submode', $mode); + + $query = $this->db->get('adif_modes'); + if ($query->num_rows() > 0){ + $row = $query->row_array(); + return $row['mode']; + } else { + return null; + } + } /* * Check the dxxc_prefixes table and return (dxcc, country) diff --git a/application/models/Modes.php b/application/models/Modes.php index 1cdba3a34..82354c46b 100644 --- a/application/models/Modes.php +++ b/application/models/Modes.php @@ -9,11 +9,15 @@ class Modes extends CI_Model { } function all() { + $this->db->order_by('mode', 'ASC'); + $this->db->order_by('submode', 'ASC'); return $this->db->get('adif_modes'); } function active() { $this->db->where('active', 1); + $this->db->order_by('mode', 'ASC'); + $this->db->order_by('submode', 'ASC'); return $this->db->get('adif_modes'); } @@ -28,8 +32,14 @@ class Modes extends CI_Model { function add() { + if ($this->input->post('submode', true) == "") + $submode = null; + else + $submode = xss_clean($this->input->post('submode', true)); + $data = array( 'mode' => xss_clean($this->input->post('mode', true)), + 'submode' => $submode, 'qrgmode' => xss_clean(strtoupper($this->input->post('qrgmode', true))), 'active' => xss_clean($this->input->post('active', true)), ); diff --git a/application/views/adif/data/clublog.php b/application/views/adif/data/clublog.php index e8659b8e0..9cdab7e2a 100644 --- a/application/views/adif/data/clublog.php +++ b/application/views/adif/data/clublog.php @@ -4,6 +4,6 @@ result() as $qso) { //print_r($qso);?> - COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> + COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> \ No newline at end of file diff --git a/application/views/adif/data/clublog_realtime.php b/application/views/adif/data/clublog_realtime.php index 7bc903092..fce352154 100644 --- a/application/views/adif/data/clublog_realtime.php +++ b/application/views/adif/data/clublog_realtime.php @@ -1 +1 @@ -COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> +COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> diff --git a/application/views/adif/data/exportall.php b/application/views/adif/data/exportall.php index ace3b21a1..f6f5a41f1 100644 --- a/application/views/adif/data/exportall.php +++ b/application/views/adif/data/exportall.php @@ -8,6 +8,6 @@ result() as $qso) { //print_r($qso);?> -COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> +COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> \ No newline at end of file diff --git a/application/views/adif/data/exportsat.php b/application/views/adif/data/exportsat.php index ace3b21a1..f6f5a41f1 100644 --- a/application/views/adif/data/exportsat.php +++ b/application/views/adif/data/exportsat.php @@ -8,6 +8,6 @@ result() as $qso) { //print_r($qso);?> -COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> +COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> \ No newline at end of file diff --git a/application/views/mode/create.php b/application/views/mode/create.php index 9fbca43ba..808fa07d6 100644 --- a/application/views/mode/create.php +++ b/application/views/mode/create.php @@ -33,6 +33,12 @@ Name of mode in ADIF-specification + +
+ + + Name of sub-mode in ADIF-specification +
diff --git a/application/views/mode/edit.php b/application/views/mode/edit.php index 0af936856..25c5936ce 100644 --- a/application/views/mode/edit.php +++ b/application/views/mode/edit.php @@ -35,6 +35,12 @@ Name of mode in ADIF-specification
+
+ + submode; } ?>"> + Name of sub-mode in ADIF-specification +
+
+ @@ -27,7 +28,8 @@ result() as $row) { ?> - + + - + COL_SAT_NAME != null) { ?> From 49e605090e135d2b4cd9f144bbfbb04a499890cd Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sun, 24 May 2020 11:13:40 +0200 Subject: [PATCH 4/6] Made submodes visual clearer in selectbox using => as marker. --- application/views/qso/edit.php | 2 +- application/views/qso/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/qso/edit.php b/application/views/qso/edit.php index 93554675b..67c8bd75a 100755 --- a/application/views/qso/edit.php +++ b/application/views/qso/edit.php @@ -76,7 +76,7 @@ if ($mode->submode == null) { printf("", $mode->mode, $qso->COL_MODE==$mode->mode?"selected=\"selected\"":"",$mode->mode); } else { - printf("", $mode->submode, $qso->COL_SUBMODE==$mode->submode?"selected=\"selected\"":"",$mode->submode); + printf("", $mode->submode, $qso->COL_SUBMODE==$mode->submode?"selected=\"selected\"":"",$mode->submode); } } ?> diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 138bd79bd..e83643d28 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -70,7 +70,7 @@ if ($mode->submode == null) { printf("", $mode->mode, $this->session->userdata('mode')==$mode->mode?"selected=\"selected\"":"",$mode->mode); } else { - printf("", $mode->submode, $this->session->userdata('mode')==$mode->submode?"selected=\"selected\"":"",$mode->submode); + printf("", $mode->submode, $this->session->userdata('mode')==$mode->submode?"selected=\"selected\"":"",$mode->submode); } } ?> From a091de639a6f9ff35a6b540229793b3f60a6aac7 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 1 Jun 2020 07:56:16 +0200 Subject: [PATCH 5/6] Added correct submode-import to ADIF-Import --- application/models/Logbook_model.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index c132b7ff9..bee3c5093 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1693,10 +1693,24 @@ class Logbook_model extends CI_Model { } if (isset($record['mode'])) { - $input_mode = $record['mode']; - } else { - $input_mode = ''; - } + $input_mode = $record['mode']; + } else { + $input_mode = ''; + } + + $mode = $this->get_main_mode_if_submode($input_mode); + if ($mode == null) { + $submode = null; + } else { + $submode = $input_mode; + $input_mode = $mode; + } + + if (empty($submode)) { + $input_submode = (!empty($record['submode'])) ? $record['submode'] : ''; + } else { + $input_submode = $submode; + } // Get active station_id from station profile if one hasn't been provided if($station_id == "" || $station_id == "0") { @@ -1873,7 +1887,7 @@ class Logbook_model extends CI_Model { 'COL_STATION_CALLSIGN' => (!empty($record['station_callsign'])) ? $record['station_callsign'] : '', 'COL_STX' => (!empty($record['stx'])) ? $record['stx'] : null, 'COL_STX_STRING' => (!empty($record['stx_string'])) ? $record['stx_string'] : '', - 'COL_SUBMODE' => (!empty($record['submode'])) ? $record['submode'] : '', + 'COL_SUBMODE' => $input_submode, 'COL_SWL' => (!empty($record['swl'])) ? $record['swl'] : null, 'COL_TEN_TEN' => (!empty($record['ten_ten'])) ? $record['ten_ten'] : null, 'COL_TIME_ON' => $time_on, From 84e794ab5f5b4dd9091389b9ca1a70d5ca18b135 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 18 Aug 2020 16:18:55 +0100 Subject: [PATCH 6/6] Fixed issue where sub mode in adifs files was out of alignment --- application/views/adif/data/exportall.php | 6 +++--- application/views/adif/data/exportsat.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/views/adif/data/exportall.php b/application/views/adif/data/exportall.php index f6f5a41f1..1e371930b 100644 --- a/application/views/adif/data/exportall.php +++ b/application/views/adif/data/exportall.php @@ -7,7 +7,7 @@ config->item('app_version')); ?>>Version config->item('app_version')."\n"; ?> -result() as $qso) { //print_r($qso);?> -COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> - +result() as $qso) { ?> + + COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_FREQ_RX != "0") { ?>COL_FREQ_RX / 1000000; ?>>COL_BAND_RX) { ?>COL_BAND_RX); ?>>COL_BAND_RX; ?>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_STATE) { ?>COL_STATE); ?>>COL_STATE; ?>COL_SOTA_REF) { ?>COL_SOTA_REF); ?>>COL_SOTA_REF; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> \ No newline at end of file diff --git a/application/views/adif/data/exportsat.php b/application/views/adif/data/exportsat.php index f6f5a41f1..1e371930b 100644 --- a/application/views/adif/data/exportsat.php +++ b/application/views/adif/data/exportsat.php @@ -7,7 +7,7 @@ config->item('app_version')); ?>>Version config->item('app_version')."\n"; ?> -result() as $qso) { //print_r($qso);?> -COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> - +result() as $qso) { ?> + + COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_FREQ_RX != "0") { ?>COL_FREQ_RX / 1000000; ?>>COL_BAND_RX) { ?>COL_BAND_RX); ?>>COL_BAND_RX; ?>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_STATE) { ?>COL_STATE); ?>>COL_STATE; ?>COL_SOTA_REF) { ?>COL_SOTA_REF); ?>>COL_SOTA_REF; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?>state) { ?>state); ?>>state; ?> \ No newline at end of file
ModeSub-Mode SSB/DATA/CW Active
mode;?> (#id;?>)mode;?>submode;?> qrgmode;?> active == 1) { echo "active";} else { echo "not active";};?> diff --git a/application/views/qso/edit.php b/application/views/qso/edit.php index a7ca1c8d9..93554675b 100755 --- a/application/views/qso/edit.php +++ b/application/views/qso/edit.php @@ -72,7 +72,12 @@ diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 4ebfc69be..16425fe95 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -67,7 +67,11 @@ diff --git a/application/views/view_log/partial/log.php b/application/views/view_log/partial/log.php index dbc1ff480..5b1ef2c88 100644 --- a/application/views/view_log/partial/log.php +++ b/application/views/view_log/partial/log.php @@ -33,7 +33,7 @@ COL_PRIMARY_KEY; ?>" href="javascript:;">COL_CALL)); ?> COL_MODE; ?>COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; ?> COL_RST_SENT; ?> COL_STX) { ?>COL_STX;?>COL_STX_STRING) { ?>COL_STX_STRING;?> COL_RST_RCVD; ?> COL_SRX) { ?>COL_SRX;?>COL_SRX_STRING) { ?>COL_SRX_STRING;?>