From 8f1dcf3db62c5da2b73b083cf0c83b291c3b6528 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Sun, 17 May 2020 14:57:28 +0200 Subject: [PATCH 01/21] 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 31de43d6..37cfddba 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 00000000..a5afe7c3 --- /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 483f5d48..e69c831a 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 00000000..e197f96a --- /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 0c21b343..f5c52843 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 00000000..1d28ff0d --- /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 00000000..1cdba3a3 --- /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 5652842e..004804e4 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 00000000..9fbca43b --- /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 00000000..0af93685 --- /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 00000000..f414f245 --- /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 f16347f4..4ebfc69b 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 02/21] 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 e69c831a..d7550233 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 63606e93..a7ca1c8d 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 03/21] 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 1d28ff0d..1d8f4e2a 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 23431d91..b28f5d52 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 1cdba3a3..82354c46 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 e8659b8e..9cdab7e2 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 7bc90309..fce35215 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 ace3b21a..f6f5a41f 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 ace3b21a..f6f5a41f 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 9fbca43b..808fa07d 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 0af93685..25c5936c 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 04/21] 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 93554675..67c8bd75 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 138bd79b..e83643d2 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 05/21] 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 c132b7ff..bee3c509 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 06/21] 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 f6f5a41f..1e371930 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 f6f5a41f..1e371930 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 From cccdb16d7462afac90a25f4476d7e00020a2ee13 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 19 Aug 2020 13:11:17 +0200 Subject: [PATCH 07/21] Added summary for DXCC award --- application/controllers/Awards.php | 1 + application/models/Dxcc.php | 313 ++++++++++++++---------- application/views/awards/dxcc/index.php | 32 ++- 3 files changed, 217 insertions(+), 129 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ac9bde3a..9e1f5ee4 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -128,6 +128,7 @@ class Awards extends CI_Controller { $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); + $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands); // Render Page $data['page_title'] = "Awards - DXCC"; diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 6cfd44cc..faff9f69 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -1,29 +1,30 @@ 0, - "80m"=>0, - "60m"=>0, - "40m"=>0, - "30m"=>0, - "20m"=>0, - "17m"=>0, - "15m"=>0, - "12m"=>0, - "10m"=>0, - "6m" =>0, - "4m" =>0, - "2m" =>0, - "70cm"=>0, - "23cm"=>0, - "13cm"=>0, - "9cm"=>0, - "6cm"=>0, - "3cm"=>0, - "1.25cm"=>0, - "SAT"=>0, - ); + public $bandslots = array("160m" => 0, + "80m" => 0, + "60m" => 0, + "40m" => 0, + "30m" => 0, + "20m" => 0, + "17m" => 0, + "15m" => 0, + "12m" => 0, + "10m" => 0, + "6m" => 0, + "4m" => 0, + "2m" => 0, + "70cm" => 0, + "23cm" => 0, + "13cm" => 0, + "9cm" => 0, + "6cm" => 0, + "3cm" => 0, + "1.25cm" => 0, + "SAT" => 0, + ); function __construct() { @@ -32,125 +33,126 @@ class DXCC extends CI_Model { } - function get_worked_bands() { + function get_worked_bands() + { $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); // get all worked slots from database $data = $this->db->query( - "SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id." AND COL_PROP_MODE != \"SAT\"" + "SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE != \"SAT\"" ); $worked_slots = array(); - foreach($data->result() as $row){ + foreach ($data->result() as $row) { array_push($worked_slots, $row->COL_BAND); } $SAT_data = $this->db->query( - "SELECT distinct LOWER(`COL_PROP_MODE`) as `COL_PROP_MODE` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id." AND COL_PROP_MODE = \"SAT\"" + "SELECT distinct LOWER(`COL_PROP_MODE`) as `COL_PROP_MODE` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE = \"SAT\"" ); - foreach($SAT_data->result() as $row){ + foreach ($SAT_data->result() as $row) { array_push($worked_slots, strtoupper($row->COL_PROP_MODE)); } // bring worked-slots in order of defined $bandslots $results = array(); - foreach(array_keys($this->bandslots) as $slot) { - if(in_array($slot, $worked_slots)) { + foreach (array_keys($this->bandslots) as $slot) { + if (in_array($slot, $worked_slots)) { array_push($results, $slot); - } + } } return $results; } - function show_stats(){ + function show_stats() + { $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); - $data = $this->db->query( - "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt - from ".$this->config->item('table_name')." - where station_id = ".$station_id." AND COL_PROP_MODE != \"SAT\" + $data = $this->db->query( + "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt + from " . $this->config->item('table_name') . " + where station_id = " . $station_id . " AND COL_PROP_MODE != \"SAT\" group by COL_COUNTRY, COL_MODE, COL_BAND" - ); + ); - $results = array(); - $last_country = ""; - foreach($data->result() as $row){ - if ($last_country != $row->COL_COUNTRY){ - // new row - $results[$row->COL_COUNTRY] = $this->bandslots; - $last_country = $row->COL_COUNTRY; - } + $results = array(); + $last_country = ""; + foreach ($data->result() as $row) { + if ($last_country != $row->COL_COUNTRY) { + // new row + $results[$row->COL_COUNTRY] = $this->bandslots; + $last_country = $row->COL_COUNTRY; + } - // update stats - if (!isset($results[$row->COL_COUNTRY])) - $results[$row->COL_COUNTRY] = []; + // update stats + if (!isset($results[$row->COL_COUNTRY])) + $results[$row->COL_COUNTRY] = []; - if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND])) - $results[$row->COL_COUNTRY][$row->COL_BAND] = 0; + if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND])) + $results[$row->COL_COUNTRY][$row->COL_BAND] = 0; - $results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt; - } + $results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt; + } - // Satellite DXCC + // Satellite DXCC - $satellite_data = $this->db->query( - "select COL_COUNTRY, COL_PROP_MODE as COL_PROP_MODE, count(COL_COUNTRY) as cnt - from ".$this->config->item('table_name')." - where station_id = ".$station_id." AND COL_PROP_MODE = \"SAT\" + $satellite_data = $this->db->query( + "select COL_COUNTRY, COL_PROP_MODE as COL_PROP_MODE, count(COL_COUNTRY) as cnt + from " . $this->config->item('table_name') . " + where station_id = " . $station_id . " AND COL_PROP_MODE = \"SAT\" group by COL_COUNTRY" - ); + ); - foreach($satellite_data->result() as $row){ - if ($last_country != $row->COL_COUNTRY){ - // new row - $results[$row->COL_COUNTRY] = $this->bandslots; - $last_country = $row->COL_COUNTRY; - } + foreach ($satellite_data->result() as $row) { + if ($last_country != $row->COL_COUNTRY) { + // new row + $results[$row->COL_COUNTRY] = $this->bandslots; + $last_country = $row->COL_COUNTRY; + } - // update stats - if (!isset($results[$row->COL_COUNTRY])) - $results[$row->COL_COUNTRY] = []; + // update stats + if (!isset($results[$row->COL_COUNTRY])) + $results[$row->COL_COUNTRY] = []; - if (!isset($results[$row->COL_COUNTRY][$row->COL_PROP_MODE])) - $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] = 0; + if (!isset($results[$row->COL_COUNTRY][$row->COL_PROP_MODE])) + $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] = 0; - $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] += $row->cnt; - } + $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] += $row->cnt; + } - // print_r($results); - // return; + // print_r($results); + // return; - return $results; + return $results; } /** - * Function: mostactive - * Information: Returns the most active band - **/ + * Function: mostactive + * Information: Returns the most active band + **/ function info($callsign) { $exceptions = $this->db->query(' SELECT * FROM `dxccexceptions` - WHERE `prefix` = \''.$callsign.'\' + WHERE `prefix` = \'' . $callsign . '\' LIMIT 1 '); - if ($exceptions->num_rows() > 0) - { + if ($exceptions->num_rows() > 0) { return $exceptions; } else { $query = $this->db->query(' SELECT * FROM dxcc_entities - WHERE prefix = SUBSTRING( \''.$callsign.'\', 1, LENGTH( prefix ) ) + WHERE prefix = SUBSTRING( \'' . $callsign . '\', 1, LENGTH( prefix ) ) ORDER BY LENGTH( prefix ) DESC LIMIT 1 '); @@ -159,26 +161,30 @@ class DXCC extends CI_Model { } } - function search(){ - print_r($this->input->get()); - return; - } + function search() + { + print_r($this->input->get()); + return; + } - function empty_table($table) { + function empty_table($table) + { $this->db->empty_table($table); } - function list() { + function list() + { $this->db->order_by('name', 'ASC'); return $this->db->get('dxcc_entities'); } - function get_dxcc_array($dxccArray, $bands, $postdata) { + function get_dxcc_array($dxccArray, $bands, $postdata) + { $CI =& get_instance(); $CI->load->model('Stations'); $station_id = $CI->Stations->find_active(); - foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display + foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display foreach ($dxccArray as $dxcc) { $dxccMatrix[$dxcc->adif]['name'] = $dxcc->name; $dxccMatrix[$dxcc->adif]['Dxccprefix'] = $dxcc->prefix; @@ -191,7 +197,7 @@ class DXCC extends CI_Model { if ($postdata['worked'] != NULL) { $workedDXCC = $this->getDxccBandWorked($station_id, $band, $postdata); foreach ($workedDXCC as $wdxcc) { - $dxccMatrix[$wdxcc->dxcc][$band] = '';; + $dxccMatrix[$wdxcc->dxcc][$band] = '';; } } @@ -199,7 +205,7 @@ class DXCC extends CI_Model { if ($postdata['confirmed'] != NULL) { $confirmedDXCC = $this->getDxccBandConfirmed($station_id, $band, $postdata); foreach ($confirmedDXCC as $cdxcc) { - $dxccMatrix[$cdxcc->dxcc][$band] = '';; + $dxccMatrix[$cdxcc->dxcc][$band] = '';; } } } @@ -226,23 +232,22 @@ class DXCC extends CI_Model { if (isset($dxccMatrix)) { return $dxccMatrix; - } - else { + } else { return 0; } } - function getDxccBandConfirmed($station_id, $band, $postdata) { + function getDxccBandConfirmed($station_id, $band, $postdata) + { $sql = "select adif as dxcc, name from dxcc_entities join ( - select col_dxcc from ".$this->config->item('table_name')." thcv + select col_dxcc from " . $this->config->item('table_name') . " thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($band == 'SAT') { $sql .= " and col_prop_mode ='" . $band . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $band . "'"; } @@ -263,17 +268,17 @@ class DXCC extends CI_Model { return $query->result(); } - function getDxccBandWorked($station_id, $band, $postdata) { + function getDxccBandWorked($station_id, $band, $postdata) + { $sql = "select adif as dxcc, name from dxcc_entities join ( - select col_dxcc from ".$this->config->item('table_name')." thcv + select col_dxcc from " . $this->config->item('table_name') . " thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($band == 'SAT') { $sql .= " and col_prop_mode ='" . $band . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $band . "'"; } @@ -292,7 +297,8 @@ class DXCC extends CI_Model { return $query->result(); } - function fetchDxcc($postdata) { + function fetchDxcc($postdata) + { $CI =& get_instance(); $CI->load->model('Stations'); $station_id = $CI->Stations->find_active(); @@ -301,13 +307,12 @@ class DXCC extends CI_Model { from dxcc_entities"; if ($postdata['notworked'] == NULL) { - $sql .= " join (select col_dxcc from ".$this->config->item('table_name')." where station_id = $station_id"; + $sql .= " join (select col_dxcc from " . $this->config->item('table_name') . " where station_id = $station_id"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -330,31 +335,30 @@ class DXCC extends CI_Model { return $query->result(); } - function getDxccWorked($station_id, $postdata) { + function getDxccWorked($station_id, $postdata) + { $sql = "SELECT adif as dxcc FROM dxcc_entities join ( select col_dxcc - from ".$this->config->item('table_name')." thcv + from " . $this->config->item('table_name') . " thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } } - $sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id = $station_id and col_dxcc = thcv.col_dxcc"; + $sql .= " and not exists (select 1 from " . $this->config->item('table_name') . " where station_id = $station_id and col_dxcc = thcv.col_dxcc"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -379,19 +383,19 @@ class DXCC extends CI_Model { return $query->result(); } - function getDxccConfirmed($station_id, $postdata) { + function getDxccConfirmed($station_id, $postdata) + { $sql = "SELECT adif as dxcc FROM dxcc_entities join ( select col_dxcc - from ".$this->config->item('table_name')." thcv - where station_id = ". $station_id . - " and col_dxcc > 0"; + from " . $this->config->item('table_name') . " thcv + where station_id = " . $station_id . + " and col_dxcc > 0"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { + } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -415,7 +419,8 @@ class DXCC extends CI_Model { } // Made function instead of repeating this several times - function addQslToQuery($postdata) { + function addQslToQuery($postdata) + { $sql = ''; if ($postdata['lotw'] != NULL and $postdata['qsl'] == NULL) { $sql .= " and col_lotw_qsl_rcvd = 'Y'"; @@ -432,7 +437,8 @@ class DXCC extends CI_Model { } // Made function instead of repeating this several times - function addContinentsToQuery($postdata) { + function addContinentsToQuery($postdata) + { $sql = ''; if ($postdata['Africa'] == NULL) { $sql .= " and cont <> 'AF'"; @@ -463,5 +469,56 @@ class DXCC extends CI_Model { } return $sql; } + + /* + * Function gets worked and confirmed summary on each band on the active stationprofile + */ + function get_dxcc_summary($bands) + { + $CI =& get_instance(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); + + foreach ($bands as $band) { + $result = $this->getSummaryByBand($band, $station_id); + $dxccSummary['worked'][$band] = $result[0]->count; + $dxccSummary['confirmed'][$band] = $result[0]->cfmdxcc; + } + + return $dxccSummary; + } + + function getSummaryByBand($band, $station_id) + { + $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count, coalesce (cfmdxcc.count, 0) as cfmdxcc FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " left outer join ( + select col_band, count(distinct col_dxcc) as count from " . $this->config->item('table_name') . " thcv"; + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + + $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; + + $sql .= ") cfmdxcc on thcv.col_band = cfmdxcc.col_band "; + + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + + } + $query = $this->db->query($sql); + + return $query->result(); + } } -?> +?> \ No newline at end of file diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index ca54f6f9..837da4cf 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -140,7 +140,37 @@ } echo ''; } - echo '
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 a7ca1c8d..93554675 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 4ebfc69b..16425fe9 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 dbc1ff48..5b1ef2c8 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;?>
'; + echo ' +

Summary

+ + + + '; + + foreach($bands as $band) { + echo ''; + } + echo ''; + + echo ' + + + + '; + + foreach ($dxcc_summary['worked'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' + '; + foreach ($dxcc_summary['confirmed'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' +
' . $band . '
Total worked' . $dxcc . '
Total confirmed' . $dxcc . '
+
'; } else { From fa19166da95b7bb92e4933082109d336c33f7dff Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Aug 2020 13:42:20 +0100 Subject: [PATCH 08/21] Revert "Merge pull request #578 from AndreasK79/award_dxcc_summary" This reverts commit 3935971e3c5a9f7bf229fd55769df2cd73b658d7, reversing changes made to 640d0c151b513647c2fa095efcba17d373e1ef08. --- application/controllers/Awards.php | 1 - application/models/Dxcc.php | 313 ++++++++++-------------- application/views/awards/dxcc/index.php | 32 +-- 3 files changed, 129 insertions(+), 217 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 9e1f5ee4..ac9bde3a 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -128,7 +128,6 @@ class Awards extends CI_Controller { $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); - $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands); // Render Page $data['page_title'] = "Awards - DXCC"; diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index faff9f69..6cfd44cc 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -1,30 +1,29 @@ 0, - "80m" => 0, - "60m" => 0, - "40m" => 0, - "30m" => 0, - "20m" => 0, - "17m" => 0, - "15m" => 0, - "12m" => 0, - "10m" => 0, - "6m" => 0, - "4m" => 0, - "2m" => 0, - "70cm" => 0, - "23cm" => 0, - "13cm" => 0, - "9cm" => 0, - "6cm" => 0, - "3cm" => 0, - "1.25cm" => 0, - "SAT" => 0, - ); + public $bandslots = array("160m"=>0, + "80m"=>0, + "60m"=>0, + "40m"=>0, + "30m"=>0, + "20m"=>0, + "17m"=>0, + "15m"=>0, + "12m"=>0, + "10m"=>0, + "6m" =>0, + "4m" =>0, + "2m" =>0, + "70cm"=>0, + "23cm"=>0, + "13cm"=>0, + "9cm"=>0, + "6cm"=>0, + "3cm"=>0, + "1.25cm"=>0, + "SAT"=>0, + ); function __construct() { @@ -33,126 +32,125 @@ class DXCC extends CI_Model } - function get_worked_bands() - { + function get_worked_bands() { $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); // get all worked slots from database $data = $this->db->query( - "SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE != \"SAT\"" + "SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id." AND COL_PROP_MODE != \"SAT\"" ); $worked_slots = array(); - foreach ($data->result() as $row) { + foreach($data->result() as $row){ array_push($worked_slots, $row->COL_BAND); } $SAT_data = $this->db->query( - "SELECT distinct LOWER(`COL_PROP_MODE`) as `COL_PROP_MODE` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE = \"SAT\"" + "SELECT distinct LOWER(`COL_PROP_MODE`) as `COL_PROP_MODE` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id." AND COL_PROP_MODE = \"SAT\"" ); - foreach ($SAT_data->result() as $row) { + foreach($SAT_data->result() as $row){ array_push($worked_slots, strtoupper($row->COL_PROP_MODE)); } // bring worked-slots in order of defined $bandslots $results = array(); - foreach (array_keys($this->bandslots) as $slot) { - if (in_array($slot, $worked_slots)) { + foreach(array_keys($this->bandslots) as $slot) { + if(in_array($slot, $worked_slots)) { array_push($results, $slot); - } + } } return $results; } - function show_stats() - { + function show_stats(){ $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); - $data = $this->db->query( - "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt - from " . $this->config->item('table_name') . " - where station_id = " . $station_id . " AND COL_PROP_MODE != \"SAT\" + $data = $this->db->query( + "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt + from ".$this->config->item('table_name')." + where station_id = ".$station_id." AND COL_PROP_MODE != \"SAT\" group by COL_COUNTRY, COL_MODE, COL_BAND" - ); + ); - $results = array(); - $last_country = ""; - foreach ($data->result() as $row) { - if ($last_country != $row->COL_COUNTRY) { - // new row - $results[$row->COL_COUNTRY] = $this->bandslots; - $last_country = $row->COL_COUNTRY; - } + $results = array(); + $last_country = ""; + foreach($data->result() as $row){ + if ($last_country != $row->COL_COUNTRY){ + // new row + $results[$row->COL_COUNTRY] = $this->bandslots; + $last_country = $row->COL_COUNTRY; + } - // update stats - if (!isset($results[$row->COL_COUNTRY])) - $results[$row->COL_COUNTRY] = []; + // update stats + if (!isset($results[$row->COL_COUNTRY])) + $results[$row->COL_COUNTRY] = []; - if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND])) - $results[$row->COL_COUNTRY][$row->COL_BAND] = 0; + if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND])) + $results[$row->COL_COUNTRY][$row->COL_BAND] = 0; - $results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt; - } + $results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt; + } - // Satellite DXCC + // Satellite DXCC - $satellite_data = $this->db->query( - "select COL_COUNTRY, COL_PROP_MODE as COL_PROP_MODE, count(COL_COUNTRY) as cnt - from " . $this->config->item('table_name') . " - where station_id = " . $station_id . " AND COL_PROP_MODE = \"SAT\" + $satellite_data = $this->db->query( + "select COL_COUNTRY, COL_PROP_MODE as COL_PROP_MODE, count(COL_COUNTRY) as cnt + from ".$this->config->item('table_name')." + where station_id = ".$station_id." AND COL_PROP_MODE = \"SAT\" group by COL_COUNTRY" - ); + ); - foreach ($satellite_data->result() as $row) { - if ($last_country != $row->COL_COUNTRY) { - // new row - $results[$row->COL_COUNTRY] = $this->bandslots; - $last_country = $row->COL_COUNTRY; - } + foreach($satellite_data->result() as $row){ + if ($last_country != $row->COL_COUNTRY){ + // new row + $results[$row->COL_COUNTRY] = $this->bandslots; + $last_country = $row->COL_COUNTRY; + } - // update stats - if (!isset($results[$row->COL_COUNTRY])) - $results[$row->COL_COUNTRY] = []; + // update stats + if (!isset($results[$row->COL_COUNTRY])) + $results[$row->COL_COUNTRY] = []; - if (!isset($results[$row->COL_COUNTRY][$row->COL_PROP_MODE])) - $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] = 0; + if (!isset($results[$row->COL_COUNTRY][$row->COL_PROP_MODE])) + $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] = 0; - $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] += $row->cnt; - } + $results[$row->COL_COUNTRY][$row->COL_PROP_MODE] += $row->cnt; + } - // print_r($results); - // return; + // print_r($results); + // return; - return $results; + return $results; } /** - * Function: mostactive - * Information: Returns the most active band - **/ + * Function: mostactive + * Information: Returns the most active band + **/ function info($callsign) { $exceptions = $this->db->query(' SELECT * FROM `dxccexceptions` - WHERE `prefix` = \'' . $callsign . '\' + WHERE `prefix` = \''.$callsign.'\' LIMIT 1 '); - if ($exceptions->num_rows() > 0) { + if ($exceptions->num_rows() > 0) + { return $exceptions; } else { $query = $this->db->query(' SELECT * FROM dxcc_entities - WHERE prefix = SUBSTRING( \'' . $callsign . '\', 1, LENGTH( prefix ) ) + WHERE prefix = SUBSTRING( \''.$callsign.'\', 1, LENGTH( prefix ) ) ORDER BY LENGTH( prefix ) DESC LIMIT 1 '); @@ -161,30 +159,26 @@ class DXCC extends CI_Model } } - function search() - { - print_r($this->input->get()); - return; - } + function search(){ + print_r($this->input->get()); + return; + } - function empty_table($table) - { + function empty_table($table) { $this->db->empty_table($table); } - function list() - { + function list() { $this->db->order_by('name', 'ASC'); return $this->db->get('dxcc_entities'); } - function get_dxcc_array($dxccArray, $bands, $postdata) - { + function get_dxcc_array($dxccArray, $bands, $postdata) { $CI =& get_instance(); $CI->load->model('Stations'); $station_id = $CI->Stations->find_active(); - foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display + foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display foreach ($dxccArray as $dxcc) { $dxccMatrix[$dxcc->adif]['name'] = $dxcc->name; $dxccMatrix[$dxcc->adif]['Dxccprefix'] = $dxcc->prefix; @@ -197,7 +191,7 @@ class DXCC extends CI_Model if ($postdata['worked'] != NULL) { $workedDXCC = $this->getDxccBandWorked($station_id, $band, $postdata); foreach ($workedDXCC as $wdxcc) { - $dxccMatrix[$wdxcc->dxcc][$band] = '';; + $dxccMatrix[$wdxcc->dxcc][$band] = '';; } } @@ -205,7 +199,7 @@ class DXCC extends CI_Model if ($postdata['confirmed'] != NULL) { $confirmedDXCC = $this->getDxccBandConfirmed($station_id, $band, $postdata); foreach ($confirmedDXCC as $cdxcc) { - $dxccMatrix[$cdxcc->dxcc][$band] = '';; + $dxccMatrix[$cdxcc->dxcc][$band] = '';; } } } @@ -232,22 +226,23 @@ class DXCC extends CI_Model if (isset($dxccMatrix)) { return $dxccMatrix; - } else { + } + else { return 0; } } - function getDxccBandConfirmed($station_id, $band, $postdata) - { + function getDxccBandConfirmed($station_id, $band, $postdata) { $sql = "select adif as dxcc, name from dxcc_entities join ( - select col_dxcc from " . $this->config->item('table_name') . " thcv + select col_dxcc from ".$this->config->item('table_name')." thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($band == 'SAT') { $sql .= " and col_prop_mode ='" . $band . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $band . "'"; } @@ -268,17 +263,17 @@ class DXCC extends CI_Model return $query->result(); } - function getDxccBandWorked($station_id, $band, $postdata) - { + function getDxccBandWorked($station_id, $band, $postdata) { $sql = "select adif as dxcc, name from dxcc_entities join ( - select col_dxcc from " . $this->config->item('table_name') . " thcv + select col_dxcc from ".$this->config->item('table_name')." thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($band == 'SAT') { $sql .= " and col_prop_mode ='" . $band . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $band . "'"; } @@ -297,8 +292,7 @@ class DXCC extends CI_Model return $query->result(); } - function fetchDxcc($postdata) - { + function fetchDxcc($postdata) { $CI =& get_instance(); $CI->load->model('Stations'); $station_id = $CI->Stations->find_active(); @@ -307,12 +301,13 @@ class DXCC extends CI_Model from dxcc_entities"; if ($postdata['notworked'] == NULL) { - $sql .= " join (select col_dxcc from " . $this->config->item('table_name') . " where station_id = $station_id"; + $sql .= " join (select col_dxcc from ".$this->config->item('table_name')." where station_id = $station_id"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -335,30 +330,31 @@ class DXCC extends CI_Model return $query->result(); } - function getDxccWorked($station_id, $postdata) - { + function getDxccWorked($station_id, $postdata) { $sql = "SELECT adif as dxcc FROM dxcc_entities join ( select col_dxcc - from " . $this->config->item('table_name') . " thcv + from ".$this->config->item('table_name')." thcv where station_id = " . $station_id . - " and col_dxcc > 0"; + " and col_dxcc > 0"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } } - $sql .= " and not exists (select 1 from " . $this->config->item('table_name') . " where station_id = $station_id and col_dxcc = thcv.col_dxcc"; + $sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id = $station_id and col_dxcc = thcv.col_dxcc"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -383,19 +379,19 @@ class DXCC extends CI_Model return $query->result(); } - function getDxccConfirmed($station_id, $postdata) - { + function getDxccConfirmed($station_id, $postdata) { $sql = "SELECT adif as dxcc FROM dxcc_entities join ( select col_dxcc - from " . $this->config->item('table_name') . " thcv - where station_id = " . $station_id . - " and col_dxcc > 0"; + from ".$this->config->item('table_name')." thcv + where station_id = ". $station_id . + " and col_dxcc > 0"; if ($postdata['band'] != 'All') { if ($postdata['band'] == 'SAT') { $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } else { + } + else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $postdata['band'] . "'"; } @@ -419,8 +415,7 @@ class DXCC extends CI_Model } // Made function instead of repeating this several times - function addQslToQuery($postdata) - { + function addQslToQuery($postdata) { $sql = ''; if ($postdata['lotw'] != NULL and $postdata['qsl'] == NULL) { $sql .= " and col_lotw_qsl_rcvd = 'Y'"; @@ -437,8 +432,7 @@ class DXCC extends CI_Model } // Made function instead of repeating this several times - function addContinentsToQuery($postdata) - { + function addContinentsToQuery($postdata) { $sql = ''; if ($postdata['Africa'] == NULL) { $sql .= " and cont <> 'AF'"; @@ -469,56 +463,5 @@ class DXCC extends CI_Model } return $sql; } - - /* - * Function gets worked and confirmed summary on each band on the active stationprofile - */ - function get_dxcc_summary($bands) - { - $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); - - foreach ($bands as $band) { - $result = $this->getSummaryByBand($band, $station_id); - $dxccSummary['worked'][$band] = $result[0]->count; - $dxccSummary['confirmed'][$band] = $result[0]->cfmdxcc; - } - - return $dxccSummary; - } - - function getSummaryByBand($band, $station_id) - { - $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count, coalesce (cfmdxcc.count, 0) as cfmdxcc FROM " . $this->config->item('table_name') . " thcv"; - - $sql .= " left outer join ( - select col_band, count(distinct col_dxcc) as count from " . $this->config->item('table_name') . " thcv"; - $sql .= " where station_id = " . $station_id; - - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - - $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; - - $sql .= ") cfmdxcc on thcv.col_band = cfmdxcc.col_band "; - - $sql .= " where station_id = " . $station_id; - - if ($band == 'SAT') { - $sql .= " and thcv.col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and thcv.col_prop_mode !='SAT'"; - $sql .= " and thcv.col_band ='" . $band . "'"; - - } - $query = $this->db->query($sql); - - return $query->result(); - } } -?> \ No newline at end of file +?> diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index 837da4cf..ca54f6f9 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -140,37 +140,7 @@ } echo ''; } - echo ' -

Summary

- - - - '; - - foreach($bands as $band) { - echo ''; - } - echo ''; - - echo ' - - - - '; - - foreach ($dxcc_summary['worked'] as $dxcc) { // Fills the table with the data - echo ''; - } - - echo ' - '; - foreach ($dxcc_summary['confirmed'] as $dxcc) { // Fills the table with the data - echo ''; - } - - echo ' -
' . $band . '
Total worked' . $dxcc . '
Total confirmed' . $dxcc . '
-
'; + echo ''; } else { From 48980c0566e37785b29f81b76ba541f4e57daf09 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 19 Aug 2020 17:14:08 +0200 Subject: [PATCH 09/21] Split the query for the dxcc summary in two. Some configurations of mysql didn't like this type of query. --- application/controllers/Awards.php | 1 + application/models/Dxcc.php | 57 ++++++++++++++++++++ application/views/awards/dxcc/index.php | 70 ++++++++++++++++++------- 3 files changed, 108 insertions(+), 20 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ac9bde3a..9e1f5ee4 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -128,6 +128,7 @@ class Awards extends CI_Controller { $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); + $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands); // Render Page $data['page_title'] = "Awards - DXCC"; diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 6cfd44cc..adac88f0 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -463,5 +463,62 @@ class DXCC extends CI_Model { } return $sql; } + + /* + * Function gets worked and confirmed summary on each band on the active stationprofile + */ + function get_dxcc_summary($bands) + { + $CI =& get_instance(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); + + foreach ($bands as $band) { + $worked = $this->getSummaryByBand($band, $station_id); + $confirmed = $this->getSummaryByBandConfirmed($band, $station_id); + $dxccSummary['worked'][$band] = $worked[0]->count; + $dxccSummary['confirmed'][$band] = $confirmed[0]->count; + } + + return $dxccSummary; + } + + function getSummaryByBand($band, $station_id) + { + $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + + } + $query = $this->db->query($sql); + + return $query->result(); + } + + function getSummaryByBandConfirmed($band, $station_id) + { + $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + } + + $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; + + $query = $this->db->query($sql); + + return $query->result(); + } } ?> diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index ca54f6f9..5f9771b0 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -1,9 +1,9 @@
-

+

+ + - - load->view("awards/nav_bar")?>
@@ -93,9 +93,9 @@
@@ -112,7 +112,7 @@ -input->post('includedeleted') || $this->input->method() !== 'post') echo ' Deleted'; - foreach($bands as $band) { - echo '' . $band . ''; - } - echo ' + foreach($bands as $band) { + echo '' . $band . ''; + } + echo ' '; - foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data - echo ' + foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data + echo ' '. $i++ .''; - foreach ($value as $key) { - echo '' . $key . ''; - } - echo ''; - } - echo ''; + foreach ($value as $key) { + echo '' . $key . ''; + } + echo ''; + } + echo ' +

Summary

+ + + + '; + + foreach($bands as $band) { + echo ''; + } + echo ''; + + echo ' + + + + '; + + foreach ($dxcc_summary['worked'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' + '; + foreach ($dxcc_summary['confirmed'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' +
' . $band . '
Total worked' . $dxcc . '
Total confirmed' . $dxcc . '
+ '; } else { echo ''; } -?> + ?> From c715231ef1adf7129cfe472092fb031170b47b95 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Aug 2020 16:14:19 +0100 Subject: [PATCH 10/21] Revert "Merge pull request #577 from AndreasK79/award_was_summary" This reverts commit 488a4e1748bf0c706e8396273f819c0e40f19fa9, reversing changes made to a81ab1001ed637e91c6420461e767aa112346e83. --- application/controllers/Awards.php | 1 - application/models/Was.php | 33 -------------------------- application/views/awards/was/index.php | 31 +----------------------- 3 files changed, 1 insertion(+), 64 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ac9bde3a..d1e4d9cf 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -346,7 +346,6 @@ class Awards extends CI_Controller { } $data['was_array'] = $this->was->get_was_array($bands, $postdata); - $data['was_summary'] = $this->was->get_was_summary(); // Render Page $data['page_title'] = "Awards - WAS (Worked all states)"; diff --git a/application/models/Was.php b/application/models/Was.php index 0e63d42a..451e342d 100644 --- a/application/models/Was.php +++ b/application/models/Was.php @@ -132,39 +132,6 @@ class was extends CI_Model { } } - /* - * Function gets worked and confirmed summary on each band on the active stationprofile - */ - function get_was_summary() { - $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); - - $stateArray = explode(',', $this->stateString); - - $states = array(); // Used for keeping track of which states that are not worked - - $sql = "SELECT thcv.col_band, count(distinct thcv.col_state) as count, coalesce (cfmwas.count, 0) as cfmwas FROM " . $this->config->item('table_name') . " thcv"; - - $sql .= " left outer join ( - select col_band, count(distinct col_state) as count from " . $this->config->item('table_name') . " thcv"; - $sql .= " where station_id = " . $station_id; - $sql .= $this->addStateToQuery(); - - $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y') - group by col_band"; - $sql .= ") cfmwas on thcv.col_band = cfmwas.col_band "; - - $sql .= " where station_id = " . $station_id; - - $sql .= $this->addStateToQuery(); - $sql .= " group by thcv.col_band order by thcv.col_band+0 desc"; - - $query = $this->db->query($sql); - - return $query->result(); - } - /* * Function returns all worked, but not confirmed states * $postdata contains data from the form, in this case Lotw or QSL are used diff --git a/application/views/awards/was/index.php b/application/views/awards/was/index.php index b6ec561d..2afa5450 100644 --- a/application/views/awards/was/index.php +++ b/application/views/awards/was/index.php @@ -92,37 +92,8 @@ } echo ''; } - echo ' + echo ''; -

Summary

- - - - '; - - foreach ($was_summary as $was) { // Fills the table with the data - echo ''; - } - - echo ' - - - - '; - - foreach ($was_summary as $was) { // Fills the table with the data - echo ''; - } - - echo ' - '; - foreach ($was_summary as $was) { // Fills the table with the data - echo ''; - } - - echo ' -
' . $was->col_band . '
Total worked' . $was->count . '
Total confirmed' . $was->cfmwas . '
- '; } else { echo ''; From 87bb8be156c93fc85146fa384bf85c1edc6d4927 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Aug 2020 16:19:56 +0100 Subject: [PATCH 11/21] Made /modes table responsive for mobile devices --- application/views/mode/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/views/mode/index.php b/application/views/mode/index.php index 3b3e28d6..8652b0eb 100644 --- a/application/views/mode/index.php +++ b/application/views/mode/index.php @@ -14,6 +14,7 @@

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

+
@@ -42,7 +43,9 @@
-

Create a Mode

+
+ +

Create a Mode

From f418778947178d53dd847aa5a0f8847a27029e90 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Aug 2020 16:25:59 +0100 Subject: [PATCH 12/21] Revert "Merge pull request #579 from AndreasK79/dxcc_summary_fix" This reverts commit 0365a874760593cc3e9b5e5ddbe4fb8f876d6257, reversing changes made to 87bb8be156c93fc85146fa384bf85c1edc6d4927. --- application/controllers/Awards.php | 1 - application/models/Dxcc.php | 57 -------------------- application/views/awards/dxcc/index.php | 70 +++++++------------------ 3 files changed, 20 insertions(+), 108 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 638d922c..d1e4d9cf 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -128,7 +128,6 @@ class Awards extends CI_Controller { $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); - $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands); // Render Page $data['page_title'] = "Awards - DXCC"; diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index adac88f0..6cfd44cc 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -463,62 +463,5 @@ class DXCC extends CI_Model { } return $sql; } - - /* - * Function gets worked and confirmed summary on each band on the active stationprofile - */ - function get_dxcc_summary($bands) - { - $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); - - foreach ($bands as $band) { - $worked = $this->getSummaryByBand($band, $station_id); - $confirmed = $this->getSummaryByBandConfirmed($band, $station_id); - $dxccSummary['worked'][$band] = $worked[0]->count; - $dxccSummary['confirmed'][$band] = $confirmed[0]->count; - } - - return $dxccSummary; - } - - function getSummaryByBand($band, $station_id) - { - $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; - - $sql .= " where station_id = " . $station_id; - - if ($band == 'SAT') { - $sql .= " and thcv.col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and thcv.col_prop_mode !='SAT'"; - $sql .= " and thcv.col_band ='" . $band . "'"; - - } - $query = $this->db->query($sql); - - return $query->result(); - } - - function getSummaryByBandConfirmed($band, $station_id) - { - $sql = "SELECT thcv.col_band, count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; - - $sql .= " where station_id = " . $station_id; - - if ($band == 'SAT') { - $sql .= " and thcv.col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and thcv.col_prop_mode !='SAT'"; - $sql .= " and thcv.col_band ='" . $band . "'"; - } - - $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; - - $query = $this->db->query($sql); - - return $query->result(); - } } ?> diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index 5f9771b0..ca54f6f9 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -1,9 +1,9 @@
-

- - +

+ + load->view("awards/nav_bar")?>
@@ -93,9 +93,9 @@
@@ -112,7 +112,7 @@ - input->post('includedeleted') || $this->input->method() !== 'post') echo ' Deleted'; - foreach($bands as $band) { - echo '' . $band . ''; - } - echo ' + foreach($bands as $band) { + echo '' . $band . ''; + } + echo ' '; - foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data - echo ' + foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data + echo ' '. $i++ .''; - foreach ($value as $key) { - echo '' . $key . ''; - } - echo ''; - } - echo ' -

Summary

- - - - '; - - foreach($bands as $band) { - echo ''; - } - echo ''; - - echo ' - - - - '; - - foreach ($dxcc_summary['worked'] as $dxcc) { // Fills the table with the data - echo ''; - } - - echo ' - '; - foreach ($dxcc_summary['confirmed'] as $dxcc) { // Fills the table with the data - echo ''; - } - - echo ' -
' . $band . '
Total worked' . $dxcc . '
Total confirmed' . $dxcc . '
- '; + foreach ($value as $key) { + echo '' . $key . ''; + } + echo ''; + } + echo ''; } else { echo ''; } - ?> +?> From 9ced2f4791897dec30b89da63d53ab45629f4caa Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 19 Aug 2020 17:42:42 +0200 Subject: [PATCH 13/21] Hopefully fixed DXCC summary. --- application/controllers/Awards.php | 1 + application/models/Dxcc.php | 57 ++++++++++++++++++++ application/views/awards/dxcc/index.php | 70 ++++++++++++++++++------- 3 files changed, 108 insertions(+), 20 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ac9bde3a..9e1f5ee4 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -128,6 +128,7 @@ class Awards extends CI_Controller { $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); + $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands); // Render Page $data['page_title'] = "Awards - DXCC"; diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 6cfd44cc..4e06ffa9 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -463,5 +463,62 @@ class DXCC extends CI_Model { } return $sql; } + + /* + * Function gets worked and confirmed summary on each band on the active stationprofile + */ + function get_dxcc_summary($bands) + { + $CI =& get_instance(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); + + foreach ($bands as $band) { + $worked = $this->getSummaryByBand($band, $station_id); + $confirmed = $this->getSummaryByBandConfirmed($band, $station_id); + $dxccSummary['worked'][$band] = $worked[0]->count; + $dxccSummary['confirmed'][$band] = $confirmed[0]->count; + } + + return $dxccSummary; + } + + function getSummaryByBand($band, $station_id) + { + $sql = "SELECT count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + + } + $query = $this->db->query($sql); + + return $query->result(); + } + + function getSummaryByBandConfirmed($band, $station_id) + { + $sql = "SELECT count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id = " . $station_id; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + } + + $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; + + $query = $this->db->query($sql); + + return $query->result(); + } } ?> diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index ca54f6f9..5f9771b0 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -1,9 +1,9 @@
-

+

+ + - - load->view("awards/nav_bar")?>
@@ -93,9 +93,9 @@
@@ -112,7 +112,7 @@ -input->post('includedeleted') || $this->input->method() !== 'post') echo ' Deleted'; - foreach($bands as $band) { - echo '' . $band . ''; - } - echo ' + foreach($bands as $band) { + echo '' . $band . ''; + } + echo ' '; - foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data - echo ' + foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data + echo ' '. $i++ .''; - foreach ($value as $key) { - echo '' . $key . ''; - } - echo ''; - } - echo ''; + foreach ($value as $key) { + echo '' . $key . ''; + } + echo ''; + } + echo ' +

Summary

+ + + + '; + + foreach($bands as $band) { + echo ''; + } + echo ''; + + echo ' + + + + '; + + foreach ($dxcc_summary['worked'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' + '; + foreach ($dxcc_summary['confirmed'] as $dxcc) { // Fills the table with the data + echo ''; + } + + echo ' +
' . $band . '
Total worked' . $dxcc . '
Total confirmed' . $dxcc . '
+ '; } else { echo ''; } -?> + ?> From 4f79330df551563431032704659f37cfc2fe759a Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 21 Aug 2020 17:09:48 +0100 Subject: [PATCH 14/21] Fixed error where advance search controls wasn't loading --- application/views/interface_assets/footer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index da270af0..daa3e7db 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -115,10 +115,12 @@ $(".search-results-box").hide(); } var callsign = '' + item.COL_CALL + ''; - if item.COL_SUBMODE==null + if (item.COL_SUBMODE == null) { $('#results').append('' + item.COL_TIME_ON + '' + callsign + '' + item.COL_MODE + '' + item.COL_RST_SENT + '' + item.COL_RST_RCVD + '' + band + '' + item.COL_COUNTRY + ''); - else + } + else { $('#results').append('' + item.COL_TIME_ON + '' + callsign + '' + item.COL_SUBMODE + '' + item.COL_RST_SENT + '' + item.COL_RST_RCVD + '' + band + '' + item.COL_COUNTRY + ''); + } }); }); From 7a7372647f9eea8728ec15b3c5fb62ae33971a46 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 21 Aug 2020 17:15:35 +0100 Subject: [PATCH 15/21] Removed some database calls that wasn't used --- application/controllers/Dashboard.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index 0c645016..25ea60d0 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -31,7 +31,7 @@ class Dashboard extends CI_Controller { } else { $data['qra'] = "none"; } - + $this->load->model('stations'); $data['current_active'] = $this->stations->find_active(); @@ -41,11 +41,6 @@ class Dashboard extends CI_Controller { $data['month_qsos'] = $this->logbook_model->month_qsos(); $data['year_qsos'] = $this->logbook_model->year_qsos(); - $data['total_ssb'] = $this->logbook_model->total_ssb(); - $data['total_cw'] = $this->logbook_model->total_cw(); - $data['total_fm'] = $this->logbook_model->total_fm(); - $data['total_digi'] = $this->logbook_model->total_digi(); - $data['total_countrys'] = $this->logbook_model->total_countrys(); $data['total_countrys_confirmed_paper'] = $this->logbook_model->total_countrys_confirmed_paper(); $data['total_countrys_confirmed_eqsl'] = $this->logbook_model->total_countrys_confirmed_eqsl(); @@ -54,9 +49,7 @@ class Dashboard extends CI_Controller { $data['total_qsl_sent'] = $this->logbook_model->total_qsl_sent(); $data['total_qsl_recv'] = $this->logbook_model->total_qsl_recv(); $data['total_qsl_requested'] = $this->logbook_model->total_qsl_requested(); - - $data['total_bands'] = $this->logbook_model->total_bands(); - + $data['last_five_qsos'] = $this->logbook_model->get_last_qsos('11'); $data['page_title'] = "Dashboard"; From ee3ac62f03e63979fa9f229104e2022f577f3cc2 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 21 Aug 2020 17:20:51 +0100 Subject: [PATCH 16/21] removed test code from controller --- application/controllers/Dashboard.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index 25ea60d0..6c45dcab 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -34,7 +34,7 @@ class Dashboard extends CI_Controller { $this->load->model('stations'); $data['current_active'] = $this->stations->find_active(); - + // Store info $data['todays_qsos'] = $this->logbook_model->todays_qsos(); $data['total_qsos'] = $this->logbook_model->total_qsos(); @@ -148,13 +148,5 @@ class Dashboard extends CI_Controller { echo "}"; } - - function test() { - - $this->load->library('clublog'); - - echo $this->clublog->send(); - - } } From a204d192d18b633fb8d81c6ed197959bb98e0a95 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 22 Aug 2020 23:25:08 +0100 Subject: [PATCH 17/21] QSO tabs all one line again --- application/views/qso/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 9f301b32..6f082eee 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -8,7 +8,7 @@
-
From 6ea224ccd208f5f3016220984f15c9160635bffa Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 22 Aug 2020 23:26:37 +0100 Subject: [PATCH 18/21] Added alert for QSO Panel notes saying its not exported data --- application/views/qso/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 6f082eee..e78a66e1 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -354,8 +354,11 @@
+
- +
From c646aba73db7908bdc779d766607d0102598c704 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 22 Aug 2020 23:34:15 +0100 Subject: [PATCH 19/21] Made the dashboard map fullwidth rather than contained. --- application/views/dashboard/index.php | 5 ++++- application/views/interface_assets/footer.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 4d79401f..bc4e7f05 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -18,9 +18,12 @@ + -
+
+ +
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index daa3e7db..8f64e993 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -182,7 +182,7 @@ $('[data-fancybox]').fancybox({ var qso_loc = ''; - var q_zoom = 2; + var q_zoom = 3; $(document).ready(function(){ config->item('map_gridsquares') != FALSE) { ?> From a2f572809a29ef61343fe60eeb395786b6c1a743 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 23 Aug 2020 16:42:23 +0100 Subject: [PATCH 20/21] Made the world map full width on the /logbook page to match dashboard --- application/views/interface_assets/footer.php | 2 +- application/views/view_log/index.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 8f64e993..e72b5f6d 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -263,7 +263,7 @@ $(document).on('keypress',function(e) { var qso_loc = 'uri->segment(3)); ?>'; - var q_zoom = 2; + var q_zoom = 3; config->item('map_gridsquares') != FALSE) { ?> var grid = "Yes"; diff --git a/application/views/view_log/index.php b/application/views/view_log/index.php index 423f8ac6..abaa6a9d 100644 --- a/application/views/view_log/index.php +++ b/application/views/view_log/index.php @@ -1,5 +1,3 @@ - -

Logbook

@@ -9,9 +7,10 @@ session->flashdata('notice'); ?>
- +
-
+
+
load->view('view_log/partial/log') ?> From 655d44587ef25ce37251283de01e0e138c3354c7 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 23 Aug 2020 16:50:25 +0100 Subject: [PATCH 21/21] Gridsquare maps now full width with zoom level of 3 --- application/views/gridsquares/index.php | 2 ++ application/views/interface_assets/footer.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/views/gridsquares/index.php b/application/views/gridsquares/index.php index 38890527..f1b2b027 100644 --- a/application/views/gridsquares/index.php +++ b/application/views/gridsquares/index.php @@ -18,9 +18,11 @@

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

+
+
uri->segment(2) == "satellites") { ?>