From 8135d07c4571c7049d330a9b5368eec4410b459b Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 26 Jan 2023 08:54:35 +0100 Subject: [PATCH 01/48] [QSO Entry] Added dxcc summary to spawn when dxcc is identified --- application/views/qso/index.php | 2 +- assets/js/sections/common.js | 17 +++++++++++++++++ assets/js/sections/qso.js | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 1e504714..f86aab8c 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -1,6 +1,6 @@
-
+
diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index 76508f5f..c0c84491 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -430,4 +430,21 @@ function getLookupResult() { $(".ld-ext-right").prop('disabled', false); } }); +} + +// This function executes the call to the backend for fetching dxcc summary and inserted table below qso entry +function getDxccResult(dxcc) { + $.ajax({ + url: base_url + 'index.php/lookup/search', + type: 'post', + data: { + type: 'dxcc', + dxcc: dxcc, + }, + success: function (html) { + $('.dxccsummary').remove(); + $('.qsopane').append('

DXCC Summary
'); + $('.dxccsummarybody').append(html); + } + }); } \ No newline at end of file diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 7091aaf7..74d08c8c 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -406,6 +406,7 @@ $("#callsign").focusout(function() { if(result.dxcc.entity != undefined) { $('#country').val(convert_case(result.dxcc.entity)); $('#callsign_info').text(convert_case(result.dxcc.entity)); + getDxccResult(convert_case(result.dxcc.adif)); if($("#sat_name" ).val() != "") { //logbook/jsonlookupgrid/io77/SAT/0/0 From 79800f73bc78f19f77f929f40469b3fa7b6a8baa Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:02:44 +0100 Subject: [PATCH 02/48] [QSO Entry] Bugfix for dxcc none. --- assets/js/sections/qso.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 74d08c8c..c5da4ada 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -406,7 +406,7 @@ $("#callsign").focusout(function() { if(result.dxcc.entity != undefined) { $('#country').val(convert_case(result.dxcc.entity)); $('#callsign_info').text(convert_case(result.dxcc.entity)); - getDxccResult(convert_case(result.dxcc.adif)); + getDxccResult(result.dxcc.adif); if($("#sat_name" ).val() != "") { //logbook/jsonlookupgrid/io77/SAT/0/0 From 7dd9ef13d74605eb3e14f68949e352907768f475 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:10:56 +0100 Subject: [PATCH 03/48] [QSO Entry] Added removing of summary when resetting --- assets/js/sections/qso.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index c5da4ada..f3f7b8c0 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -368,6 +368,7 @@ function reset_fields() { mymap.setView(pos, 12); mymap.removeLayer(markers); $('.callsign-suggest').hide(); + $('.dxccsummary').remove(); } $("#callsign").focusout(function() { @@ -788,4 +789,5 @@ function resetDefaultQSOFields() { $('#input_usa_state').val(""); $('#callsign-image').attr('style', 'display: none;'); $('#callsign-image-content').text(""); + $('.dxccsummary').remove(); } From 8ea9c04141539ba374af4662c48bd0ba3c6e82a2 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:20:45 +0100 Subject: [PATCH 04/48] [QSO Entry] Added dxcc name to card header --- assets/js/sections/common.js | 4 ++-- assets/js/sections/qso.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index c0c84491..2edb942f 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -433,7 +433,7 @@ function getLookupResult() { } // This function executes the call to the backend for fetching dxcc summary and inserted table below qso entry -function getDxccResult(dxcc) { +function getDxccResult(dxcc, name) { $.ajax({ url: base_url + 'index.php/lookup/search', type: 'post', @@ -443,7 +443,7 @@ function getDxccResult(dxcc) { }, success: function (html) { $('.dxccsummary').remove(); - $('.qsopane').append('

DXCC Summary
'); + $('.qsopane').append('

DXCC Summary for '+name+'
'); $('.dxccsummarybody').append(html); } }); diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index f3f7b8c0..d0f0b706 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -407,7 +407,7 @@ $("#callsign").focusout(function() { if(result.dxcc.entity != undefined) { $('#country').val(convert_case(result.dxcc.entity)); $('#callsign_info').text(convert_case(result.dxcc.entity)); - getDxccResult(result.dxcc.adif); + getDxccResult(result.dxcc.adif, convert_case(result.dxcc.entity)); if($("#sat_name" ).val() != "") { //logbook/jsonlookupgrid/io77/SAT/0/0 From 3dde2cb22152ee6e5feab3fa49249b2ec2b4d2b5 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Fri, 27 Jan 2023 09:23:42 +0100 Subject: [PATCH 05/48] [QSO Entry] Added collapse on dxcc summary card --- assets/js/sections/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index 2edb942f..b0cbdc26 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -443,7 +443,7 @@ function getDxccResult(dxcc, name) { }, success: function (html) { $('.dxccsummary').remove(); - $('.qsopane').append('

DXCC Summary for '+name+'
'); + $('.qsopane').append('

DXCC Summary for '+name+'
'); $('.dxccsummarybody').append(html); } }); From ff9e43fe156ad6c9cf12d70f268ccb5823e9ca57 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 27 Jan 2023 10:29:14 +0100 Subject: [PATCH 06/48] Use active profile for preselection during ADIF im/export --- application/views/adif/import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/adif/import.php b/application/views/adif/import.php index 6b42c7fb..779bd48d 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -34,7 +34,7 @@ @@ -100,7 +100,7 @@

From date:

From 995e89e444dc45c2e781741b5b7025485198ea36 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 27 Jan 2023 17:24:48 +0100 Subject: [PATCH 07/48] Option tu upload SAT status info to amsat.org/status --- application/config/migration.php | 2 +- application/controllers/User.php | 12 +++++++- application/models/Logbook_model.php | 46 ++++++++++++++++++++++++++++ application/models/User_model.php | 5 ++- application/views/user/add.php | 22 ++++++++++++- application/views/user/edit.php | 21 +++++++++++++ 6 files changed, 104 insertions(+), 4 deletions(-) diff --git a/application/config/migration.php b/application/config/migration.php index da1ea557..679b8daf 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'] = 112; +$config['migration_version'] = 113; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/User.php b/application/controllers/User.php index c323bdb9..fecca221 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -81,6 +81,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/add', $data); } else { $this->load->view('user/add', $data); @@ -111,7 +112,8 @@ class User extends CI_Controller { $this->input->post('user_column4'), $this->input->post('user_column5'), $this->input->post('user_show_profile_image'), - $this->input->post('user_previous_qsl_type'))) { + $this->input->post('user_previous_qsl_type'), + $this->input->post('user_amsat_status_upload'))) { // Check for errors case EUSERNAMEEXISTS: $data['username_error'] = 'Username '.$this->input->post('user_name').' already in use!'; @@ -152,6 +154,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/add', $data); $this->load->view('interface_assets/footer'); } @@ -347,6 +350,12 @@ class User extends CI_Controller { $data['user_previous_qsl_type'] = $q->user_previous_qsl_type; } + if($this->input->post('user_amsat_status_upload')) { + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload', false); + } else { + $data['user_amsat_status_upload'] = $q->user_amsat_status_upload; + } + if($this->input->post('user_column1')) { $data['user_column1'] = $this->input->post('user_column1', true); } else { @@ -430,6 +439,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/edit'); $this->load->view('interface_assets/footer'); } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6c7aa411..acbbc091 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -478,6 +478,10 @@ class Logbook_model extends CI_Model { $last_id = $this->db->insert_id(); + if ($this->session->userdata('user_amsat_status_upload') && $data['COL_PROP_MODE'] == "SAT") { + $this->upload_amsat_status($data); + } + // No point in fetching qrz api key and qrzrealtime setting if we're skipping the export if (!$skipexport) { @@ -576,6 +580,48 @@ class Logbook_model extends CI_Model { return true; } + function upload_amsat_status($data) { + $sat_name = ''; + if ($data['COL_SAT_NAME'] == 'AO-7') { + if ($data['COL_BAND'] == '2m' && $data['COL_BAND_RX'] == '10m') { + $sat_name = '[A]_AO-7'; + } + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = '[B]_AO-7'; + } + } else if ($data['COL_SAT_NAME'] == 'QO-100') { + $sat_name = 'QO-100_NB'; + } else if ($data['COL_SAT_NAME'] == 'AO-92') { + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-92_U/v'; + } + if ($data['COL_BAND'] == '23cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-92_L/v'; + } + } else if ($data['COL_SAT_NAME'] == 'AO-95') { + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-95_U/v'; + } + if ($data['COL_BAND'] == '23cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-95_L/v'; + } + } else if ($data['COL_SAT_NAME'] == 'PO-101') { + if ($data['COL_MODE'] == 'PACKET') { + $sat_name = 'PO-101[APRS]'; + } else { + $sat_name = 'PO-101[FM]'; + } + } + if ($sat_name != '') { + $datearray = date_parse_from_format("Y-m-d H:i:s", $data['COL_TIME_ON']); + $url='https://amsat.org/status/submit.php?SatSubmit=yes&Confirm=yes&SatName='.$sat_name.'&SatYear='.$datearray['year'].'&SatMonth='.str_pad($datearray['month'], 2, '0', STR_PAD_LEFT).'&SatDay='.str_pad($datearray['day'], 2, '0', STR_PAD_LEFT).'&SatHour='.str_pad($datearray['hour'], 2, '0', STR_PAD_LEFT).'&SatPeriod='.(intdiv(($datearray['minute']-1), 15)).'&SatCall='.$data['COL_STATION_CALLSIGN'].'&SatReport=Heard&SatGridSquare='.$data['COL_MY_GRIDSQUARE']; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + } + } + /* Edit QSO */ function edit() { $qso = $this->get_qso($this->input->post('id'))->row(); diff --git a/application/models/User_model.php b/application/models/User_model.php index 801ab136..c4a24fb5 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -122,7 +122,7 @@ class User_Model extends CI_Model { function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone, $measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5, - $user_show_profile_image, $user_previous_qsl_type) { + $user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -149,6 +149,7 @@ class User_Model extends CI_Model { 'user_column5' => xss_clean($user_column5), 'user_show_profile_image' => xss_clean($user_show_profile_image), 'user_previous_qsl_type' => xss_clean($user_previous_qsl_type), + 'user_amsat_status_upload' => xss_clean($user_amsat_status_upload), ); // Check the password is valid @@ -203,6 +204,7 @@ class User_Model extends CI_Model { 'user_column5' => xss_clean($fields['user_column5']), 'user_show_profile_image' => xss_clean($fields['user_show_profile_image']), 'user_previous_qsl_type' => xss_clean($fields['user_previous_qsl_type']), + 'user_amsat_status_upload' => xss_clean($fields['user_amsat_status_upload']), ); // Check to see if the user is allowed to change user levels @@ -321,6 +323,7 @@ class User_Model extends CI_Model { 'user_column4' => isset($u->row()->user_column4) ? $u->row()->user_column4: 'Band', 'user_column5' => isset($u->row()->user_column5) ? $u->row()->user_column5: 'Country', 'user_previous_qsl_type' => isset($u->row()->user_previous_qsl_type) ? $u->row()->user_previous_qsl_type: 0, + 'user_amsat_status_upload' => isset($u->row()->user_amsat_status_upload) ? $u->row()->user_amsat_status_upload: 0, 'active_station_logbook' => $u->row()->active_station_logbook, ); diff --git a/application/views/user/add.php b/application/views/user/add.php index 4451effd..0ae5ce78 100644 --- a/application/views/user/add.php +++ b/application/views/user/add.php @@ -479,6 +479,26 @@
+
+
+
+
+
+ AMSAT Status Upload +
+
+ +
+ + +
+
+
+
+

@@ -486,4 +506,4 @@

-
\ No newline at end of file +
diff --git a/application/views/user/edit.php b/application/views/user/edit.php index d2d48de6..df6a25e2 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -478,6 +478,27 @@ +
+
+
+
+
+ AMSAT Status Upload +
+
+
+ + +
+ +
+
+
+ +

From 5649e17bcfcfef9a765886b1f5bcca218090831b Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 28 Jan 2023 12:49:34 +0100 Subject: [PATCH 08/48] Add DB migration --- .../113_amsat_status_upload_option.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 application/migrations/113_amsat_status_upload_option.php diff --git a/application/migrations/113_amsat_status_upload_option.php b/application/migrations/113_amsat_status_upload_option.php new file mode 100644 index 00000000..47fd767e --- /dev/null +++ b/application/migrations/113_amsat_status_upload_option.php @@ -0,0 +1,28 @@ +db->field_exists('user_amsat_status_upload', 'users')) { + $fields = array( + 'user_amsat_status_upload BOOLEAN DEFAULT FALSE', + ); + $this->dbforge->add_column('users', $fields, 'user_column5'); + } + } + + public function down() + { + $this->dbforge->drop_column('users', 'user_amsat_status_upload'); + } +} From eec42902fe435d3b3ce775460c3f96728b567ac4 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 28 Jan 2023 13:22:22 +0100 Subject: [PATCH 09/48] Added ISS and FO-118 --- application/models/Logbook_model.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index acbbc091..743a3fdd 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -606,11 +606,27 @@ class Logbook_model extends CI_Model { $sat_name = 'AO-95_L/v'; } } else if ($data['COL_SAT_NAME'] == 'PO-101') { - if ($data['COL_MODE'] == 'PACKET') { + if ($data['COL_MODE'] == 'PKT') { $sat_name = 'PO-101[APRS]'; } else { $sat_name = 'PO-101[FM]'; } + } else if ($data['COL_SAT_NAME'] == 'FO-118') { + if ($data['COL_BAND'] == '2m') { + if ($data['COL_MODE'] == 'FM') { + $sat_name = 'FO-118[V/u FM]'; + } else if ($data['COL_MODE'] == 'SSB') { + $sat_name = 'FO-118[V/u]'; + } + } else if ($data['COL_BAND'] == '15m') { + $sat_name = 'FO-118[H/u]'; + } + } else if ($data['COL_SAT_NAME'] == 'ARISS') { + if ($data['COL_MODE'] == 'FM') { + $sat_name = 'ISS-FM'; + else if ($data['COL_MODE'] == 'PKT') { + $sat_name = 'ISS-DATA'; + } } if ($sat_name != '') { $datearray = date_parse_from_format("Y-m-d H:i:s", $data['COL_TIME_ON']); From 734034d145654d71ab9d3f5c64cfae562105813c Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 28 Jan 2023 13:47:54 +0100 Subject: [PATCH 10/48] Fix typo --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 743a3fdd..220701ad 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -624,7 +624,7 @@ class Logbook_model extends CI_Model { } else if ($data['COL_SAT_NAME'] == 'ARISS') { if ($data['COL_MODE'] == 'FM') { $sat_name = 'ISS-FM'; - else if ($data['COL_MODE'] == 'PKT') { + } else if ($data['COL_MODE'] == 'PKT') { $sat_name = 'ISS-DATA'; } } From ea8ef59bd44c80d3f467db11e04259fb9dd0ab68 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 28 Jan 2023 14:10:23 +0100 Subject: [PATCH 11/48] Handle all other SATs without special handling --- application/models/Logbook_model.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 220701ad..f6ae8ae8 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -627,15 +627,15 @@ class Logbook_model extends CI_Model { } else if ($data['COL_MODE'] == 'PKT') { $sat_name = 'ISS-DATA'; } + } else { + $sat_name = $data['COL_SAT_NAME']; } - if ($sat_name != '') { - $datearray = date_parse_from_format("Y-m-d H:i:s", $data['COL_TIME_ON']); - $url='https://amsat.org/status/submit.php?SatSubmit=yes&Confirm=yes&SatName='.$sat_name.'&SatYear='.$datearray['year'].'&SatMonth='.str_pad($datearray['month'], 2, '0', STR_PAD_LEFT).'&SatDay='.str_pad($datearray['day'], 2, '0', STR_PAD_LEFT).'&SatHour='.str_pad($datearray['hour'], 2, '0', STR_PAD_LEFT).'&SatPeriod='.(intdiv(($datearray['minute']-1), 15)).'&SatCall='.$data['COL_STATION_CALLSIGN'].'&SatReport=Heard&SatGridSquare='.$data['COL_MY_GRIDSQUARE']; - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_exec($ch); - } + $datearray = date_parse_from_format("Y-m-d H:i:s", $data['COL_TIME_ON']); + $url='https://amsat.org/status/submit.php?SatSubmit=yes&Confirm=yes&SatName='.$sat_name.'&SatYear='.$datearray['year'].'&SatMonth='.str_pad($datearray['month'], 2, '0', STR_PAD_LEFT).'&SatDay='.str_pad($datearray['day'], 2, '0', STR_PAD_LEFT).'&SatHour='.str_pad($datearray['hour'], 2, '0', STR_PAD_LEFT).'&SatPeriod='.(intdiv(($datearray['minute']-1), 15)).'&SatCall='.$data['COL_STATION_CALLSIGN'].'&SatReport=Heard&SatGridSquare='.$data['COL_MY_GRIDSQUARE']; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); } /* Edit QSO */ From 9b787bbb1f194bcdbfed2e811749c1ea32c01010 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 28 Jan 2023 15:21:09 +0100 Subject: [PATCH 12/48] Fixed hardcoding of tables --- application/migrations/096_add_wwff_columns.php | 10 +++++----- application/migrations/108_add_pota_columns.php | 14 +++++++------- application/models/Activators_model.php | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/application/migrations/096_add_wwff_columns.php b/application/migrations/096_add_wwff_columns.php index 85c85eb9..b21d01db 100644 --- a/application/migrations/096_add_wwff_columns.php +++ b/application/migrations/096_add_wwff_columns.php @@ -14,12 +14,12 @@ class Migration_add_wwff_columns extends CI_Migration { public function up() { - if (!$this->db->field_exists('COL_WWFF_REF', 'TABLE_HRD_CONTACTS_V01')) { + if (!$this->db->field_exists('COL_WWFF_REF', $this->config->item('table_name'))) { $fields = array( 'COL_WWFF_REF VARCHAR(30) DEFAULT NULL', 'COL_MY_WWFF_REF VARCHAR(50) DEFAULT NULL', ); - $this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS'); + $this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS'); // Now copy over data from SIG_INFO fields and remove COL_SIG and COL_SIG_INFO only if COL_SIG is WWFF // This cannot be reverted on downgrade to prevent overwriting of other COL_SIG information @@ -27,7 +27,7 @@ class Migration_add_wwff_columns extends CI_Migration { $this->db->set('COL_SIG_INFO', ''); $this->db->set('COL_SIG', ''); $this->db->where('COL_SIG', 'WWFF'); - $this->db->update('TABLE_HRD_CONTACTS_V01'); + $this->db->update($this->config->item('table_name')); // Add MY_WWFF_REF to station profile $fields = array( @@ -39,8 +39,8 @@ class Migration_add_wwff_columns extends CI_Migration { public function down() { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_WWFF_REF'); - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_MY_WWFF_REF'); + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_WWFF_REF'); + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_MY_WWFF_REF'); $this->dbforge->drop_column('station_profile', 'station_wwff'); } } diff --git a/application/migrations/108_add_pota_columns.php b/application/migrations/108_add_pota_columns.php index 2242fc7a..18a1ffe4 100644 --- a/application/migrations/108_add_pota_columns.php +++ b/application/migrations/108_add_pota_columns.php @@ -14,12 +14,12 @@ class Migration_add_pota_columns extends CI_Migration { public function up() { - if (!$this->db->field_exists('COL_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { + if (!$this->db->field_exists('COL_POTA_REF', $this->config->item('table_name'))) { $fields = array( 'COL_POTA_REF VARCHAR(30) DEFAULT NULL', 'COL_MY_POTA_REF VARCHAR(50) DEFAULT NULL', ); - $this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS'); + $this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS'); // Now copy over data from SIG_INFO fields and remove COL_SIG and COL_SIG_INFO only if COL_SIG is POTA // This cannot be reverted on downgrade to prevent overwriting of other COL_SIG information @@ -27,7 +27,7 @@ class Migration_add_pota_columns extends CI_Migration { $this->db->set('COL_SIG_INFO', ''); $this->db->set('COL_SIG', ''); $this->db->where('COL_SIG', 'POTA'); - $this->db->update('TABLE_HRD_CONTACTS_V01'); + $this->db->update($this->config->item('table_name')); } if (!$this->db->field_exists('station_pota', 'station_profile')) { @@ -52,11 +52,11 @@ class Migration_add_pota_columns extends CI_Migration { public function down() { - if ($this->db->field_exists('COL_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_POTA_REF'); + if ($this->db->field_exists('COL_POTA_REF', $this->config->item('table_name'))) { + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_POTA_REF'); } - if ($this->db->field_exists('COL_MY_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_MY_POTA_REF'); + if ($this->db->field_exists('COL_MY_POTA_REF', $this->config->item('table_name'))) { + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_MY_POTA_REF'); } if ($this->db->field_exists('station_pota', 'station_profile')) { $this->dbforge->drop_column('station_profile', 'station_pota'); diff --git a/application/models/Activators_model.php b/application/models/Activators_model.php index 981691e5..687fb6aa 100644 --- a/application/models/Activators_model.php +++ b/application/models/Activators_model.php @@ -105,7 +105,7 @@ class Activators_model extends CI_Model // Get max no of activated grids of single operator $data = $this->db->query( - "select COUNT(DISTINCT(SUBSTR(COL_GRIDSQUARE,1,4))) AS `count` from TABLE_HRD_CONTACTS_V01 WHERE station_id in (" . $location_list . ") AND `COL_GRIDSQUARE` != '' GROUP BY `COL_CALL` ORDER BY `count` DESC LIMIT 1" + "select COUNT(DISTINCT(SUBSTR(COL_GRIDSQUARE,1,4))) AS `count` from " . $this->config->item('table_name') . " WHERE station_id in (" . $location_list . ") AND `COL_GRIDSQUARE` != '' GROUP BY `COL_CALL` ORDER BY `count` DESC LIMIT 1" ); foreach($data->result() as $row){ $max = $row->count; From cd52dd657d72fc1f42a2ff761acb0eed270ec84f Mon Sep 17 00:00:00 2001 From: phl0 Date: Sun, 29 Jan 2023 13:15:10 +0100 Subject: [PATCH 13/48] Update versions --- application/config/config.sample.php | 2 +- install/config/config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/config.sample.php b/application/config/config.sample.php index c783c0de..1d5feb3e 100644 --- a/application/config/config.sample.php +++ b/application/config/config.sample.php @@ -14,7 +14,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ $config['app_name'] = "Cloudlog"; -$config['app_version'] = "2.1"; +$config['app_version'] = "2.3.3"; $config['directory'] = "logbook"; $config['callbook'] = "hamqth"; // Options are hamqth or qrz diff --git a/install/config/config.php b/install/config/config.php index 9016abf6..47d665f4 100644 --- a/install/config/config.php +++ b/install/config/config.php @@ -14,7 +14,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ $config['app_name'] = "Cloudlog"; -$config['app_version'] = "1.7"; +$config['app_version'] = "2.3.3"; $config['directory'] = "%directory%"; $config['callbook'] = "hamqth"; // Options are hamqth or qrz From c56c21b6110dd07e7470dccd38432090d5673522 Mon Sep 17 00:00:00 2001 From: phl0 Date: Mon, 30 Jan 2023 15:54:57 +0100 Subject: [PATCH 14/48] Add some Cloudlog info to debug page (hopefully useful for future debugging) --- application/views/debug/main.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/application/views/debug/main.php b/application/views/debug/main.php index 3aecd461..087fe004 100644 --- a/application/views/debug/main.php +++ b/application/views/debug/main.php @@ -5,6 +5,26 @@
+
+
Cloudlog Information
+
+ + + + + + + + + + + + + +
Versionconfig->item('app_version')."\n"; ?>
Languageconfig->item('language')."\n"; ?>
Base URLconfig->item('base_url')."\n"; ?>
+
+
+
Server Information
@@ -188,4 +208,4 @@
-
\ No newline at end of file +
From dcdfd66a0173d198b7ccb7da507c9ef03caef5ac Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:54:27 +0100 Subject: [PATCH 15/48] [Timeline] Added VUCC as selection for award --- application/controllers/Timeline.php | 7 +- application/models/Logbook_model.php | 32 ------ application/models/Timeline_model.php | 155 ++++++++++++++++++++++++++ application/views/timeline/index.php | 36 +++++- 4 files changed, 193 insertions(+), 37 deletions(-) diff --git a/application/controllers/Timeline.php b/application/controllers/Timeline.php index 29ee5416..ab1dcf88 100644 --- a/application/controllers/Timeline.php +++ b/application/controllers/Timeline.php @@ -76,14 +76,14 @@ class Timeline extends CI_Controller { } public function details() { - $this->load->model('logbook_model'); + $this->load->model('timeline_model'); $querystring = str_replace('"', "", $this->input->post("Querystring")); $band = str_replace('"', "", $this->input->post("Band")); $mode = str_replace('"', "", $this->input->post("Mode")); $type = str_replace('"', "", $this->input->post("Type")); - $data['results'] = $this->logbook_model->timeline_qso_details($querystring, $band, $mode, $type); + $data['results'] = $this->timeline_model->timeline_qso_details($querystring, $band, $mode, $type); switch($type) { @@ -100,6 +100,9 @@ class Timeline extends CI_Controller { case 'waz' : $data['page_title'] = "Log View - WAZ"; $data['filter'] = "CQ zone ". $querystring; break; + case 'vucc' : $data['page_title'] = "Log View - VUCC"; + $data['filter'] = "Gridsquare ". $querystring; + break; } if ($band != "All") { diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index f6ae8ae8..31083107 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -385,38 +385,6 @@ class Logbook_model extends CI_Model { return $this->db->query($sql); } - public function timeline_qso_details($querystring, $band, $mode, $type){ - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - - $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); - - if ($band != 'All') { - if ($band == 'SAT') { - $this->db->where('col_prop_mode', $band); - } else { - $this->db->where('COL_PROP_MODE !=', 'SAT'); - $this->db->where('col_band', $band); - } - } - - if ($mode != 'All') { - $this->db->where('col_mode', $mode); - } - - $this->db->where_in('station_profile.station_id', $logbooks_locations_array); - - switch($type) { - case 'dxcc': $this->db->where('COL_DXCC', $querystring); break; - case 'was': $this->db->where('COL_STATE', $querystring); break; - case 'iota': $this->db->where('COL_IOTA', $querystring); break; - case 'waz': $this->db->where('COL_CQZ', $querystring); break; - } - - return $this->db->get($this->config->item('table_name')); - } - public function activator_details($call, $band, $leogeo){ $CI =& get_instance(); $CI->load->model('logbooks_model'); diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 684bd732..c3520e4d 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -19,6 +19,7 @@ class Timeline_model extends CI_Model case 'was': $result = $this->get_timeline_was($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; case 'iota': $result = $this->get_timeline_iota($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; case 'waz': $result = $this->get_timeline_waz($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; + case 'vucc': $result = $this->get_timeline_vucc($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; } return $result; @@ -178,5 +179,159 @@ class Timeline_model extends CI_Model } return $sql; } + + public function get_timeline_vucc3($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select min(date(COL_TIME_ON)) date, upper(substring(col_gridsquare, 1, 4)) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) + order by date desc"; + + $query = $this->db->query($sql); + $this->vucc_shit($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + return $query->result(); + } + + public function timeline_qso_details($querystring, $band, $mode, $type){ + $CI =& get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + + if ($band != 'All') { + if ($band == 'SAT') { + $this->db->where('col_prop_mode', $band); + } else { + $this->db->where('COL_PROP_MODE !=', 'SAT'); + $this->db->where('col_band', $band); + } + } + + if ($mode != 'All') { + $this->db->where('col_mode', $mode); + } + + $this->db->where_in('station_profile.station_id', $logbooks_locations_array); + + switch($type) { + case 'dxcc': $this->db->where('COL_DXCC', $querystring); break; + case 'was': $this->db->where('COL_STATE', $querystring); break; + case 'iota': $this->db->where('COL_IOTA', $querystring); break; + case 'waz': $this->db->where('COL_CQZ', $querystring); break; + case 'vucc': $this->db->group_start(); $this->db->like('COL_GRIDSQUARE', $querystring); $this->db->or_like('COL_VUCC_GRIDS',$querystring); $this->db->group_end();break; + } + + return $this->db->get($this->config->item('table_name')); + } + + public function get_timeline_vucc($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + $timeline = array(); + + $col_gridsquare = $this->get_gridsquare($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + foreach ($col_gridsquare as $grid) { + $timeline[] = array( + 'gridsquare' => $grid->gridsquare, + 'date' => $grid->date); + } + + $col_vucc_grids = $this->get_vucc_grids($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + foreach ($col_vucc_grids as $gridSplit) { + $grids = explode(",", $gridSplit->gridsquare); + foreach($grids as $key) { + $grid_four = strtoupper(substr(trim($key),0,4)); + if (!array_search($grid_four, array_column($timeline, 'gridsquare'))) { + $timeline[] = array( + 'gridsquare' => $grid_four, + 'date' => $gridSplit->date); + } + } + } + usort($timeline, function($a, $b) { + return $b['date'] <=> $a['date']; + }); + + return $timeline; + } + + public function get_gridsquare($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select min(date(COL_TIME_ON)) date, upper(substring(col_gridsquare, 1, 4)) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) + order by date desc"; + + $query = $this->db->query($sql); + + return $query->result(); + } + + public function get_vucc_grids($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select date(COL_TIME_ON) date, upper(col_vucc_grids) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_vucc_grids <> ''"; + + $query = $this->db->query($sql); + + return $query->result(); + } } diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index 3d6049e4..7ec62a34 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -65,12 +65,16 @@ Worked All Zones (WAZ) +
+ input->post('awardradio') == 'vucc') echo ' checked'?>> + +
- -
Confirmation
-
+
input->post('qsl')) echo ' checked="checked"'; ?> > @@ -114,6 +118,7 @@ case 'was': $result = write_was_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; case 'iota': $result = write_iota_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; case 'waz': $result = write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; + case 'vucc': $result = write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; } } else { @@ -236,3 +241,28 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $ } echo '
'; } + +function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $award) { + $i = count($timeline_array); + echo ' + + + + + + + + + '; + + foreach ($timeline_array as $line) { + $date_as_timestamp = strtotime($line['date']); + echo ' + + + + + '; + } + echo '
#DateGridsquareShow QSOs
' . $i-- . '' . date($custom_date_format, $date_as_timestamp) . '' . $line['gridsquare'] . 'Show
'; +} From b9b0d0e4832e6cf5d9e2695b34ebdeec6aa745bc Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 31 Jan 2023 13:00:23 +0100 Subject: [PATCH 16/48] Make base URL copyable --- application/views/debug/main.php | 4 ++-- application/views/interface_assets/footer.php | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/application/views/debug/main.php b/application/views/debug/main.php index 087fe004..bfffc7dc 100644 --- a/application/views/debug/main.php +++ b/application/views/debug/main.php @@ -15,11 +15,11 @@ Language - config->item('language')."\n"; ?> + config->item('language'))."\n"; ?> Base URL - config->item('base_url')."\n"; ?> + config->item('base_url'); ?> ")'>
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 8b5b716a..68b731e5 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -122,6 +122,24 @@ function load_was_map() { +uri->segment(1) == "debug") { ?> + + + uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?> +uri->segment(1) == "continents") { ?> + + + + + uri->segment(1) == "adif" || $this->uri->segment(1) == "qrz") { ?> diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 03ee041a..4cb69d2d 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -110,6 +110,8 @@ Timeplotter Custom Maps + + Continents
diff --git a/assets/js/sections/continents.js b/assets/js/sections/continents.js new file mode 100644 index 00000000..e58a2422 --- /dev/null +++ b/assets/js/sections/continents.js @@ -0,0 +1,137 @@ +totalContinentQsos(); + +// Needed for continentstable header fix, will be squished without +$("a[href='#continents']").on('shown.bs.tab', function(e) { + $(".continentstable").DataTable().columns.adjust(); +}); + +function totalContinentQsos() { + // using this to change color of legend and label according to background color + var color = ifDarkModeThemeReturn('white', 'grey'); + + $.ajax({ + url: base_url+'index.php/continents/get_continents', + type: 'post', + success: function (data) { + if (data.length > 0) { + $('.tabs').removeAttr('hidden'); + + var labels = []; + var dataQso = []; + var totalQso = Number(0); + + var $myTable = $('.continentstable'); + var i = 1; + + // building the rows in the table + var rowElements = data.map(function (row) { + + var $row = $(''); + + var $iterator = $('').html(i++); + var $type = $('').html(row.cont); + var $content = $('').html(row.count); + + $row.append($iterator, $type, $content); + + return $row; + }); + + // finally inserting the rows + $myTable.append(rowElements); + + $.each(data, function () { + labels.push(this.cont); + dataQso.push(this.count); + totalQso = Number(totalQso) + Number(this.count); + }); + + const COLORS = ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499"] + var ctx = document.getElementById("continentChart").getContext('2d'); + var myChart = new Chart(ctx, { + plugins: [ChartPieChartOutlabels], + type: 'doughnut', + data: { + labels: labels, + datasets: [{ + borderColor: 'rgba(54, 162, 235, 1)', + label: 'Number of QSO\'s worked', + data: dataQso, + backgroundColor: ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499"], + borderWidth: 1, + labels: labels, + }] + }, + + options: { + layout: { + padding: 100 + }, + title: { + fontColor: color, + fullSize: true, + }, + responsive: false, + maintainAspectRatio: true, + plugins: { + legend: { + display: false, + labels: { + boxWidth: 15, + color: color, + font: { + size: 14, + } + }, + position: 'right', + align: "middle" + }, + outlabels: { + display: function(context) { // Hide labels with low percentage + return ((context.dataset.data[context.dataIndex] / totalQso * 100) > 1) + }, + backgroundColor: COLORS, + borderColor: COLORS, + borderRadius: 2, // Border radius of Label + borderWidth: 2, // Thickness of border + color: 'white', + stretch: 10, + padding: 0, + font: { + resizable: true, + minSize: 12, + maxSize: 25, + family: Chart.defaults.font.family, + size: Chart.defaults.font.size, + style: Chart.defaults.font.style, + lineHeight: Chart.defaults.font.lineHeight, + }, + zoomOutPercentage: 100, + textAlign: 'start', + backgroundColor: COLORS, + } + } + } + }); + + // using this to change color of csv-button if dark mode is chosen + var background = $('body').css("background-color"); + + if (background != ('rgb(255, 255, 255)')) { + $(".buttons-csv").css("color", "white"); + } + + $('.continentstable').DataTable({ + responsive: false, + ordering: false, + "scrollY": "330px", + "scrollX": true, + "ScrollCollapse": true, + "paging": false, + bFilter: false, + bInfo: false, + }); + } + } + }); +} From 57126b32696f70ffd49a1fdedbb9c07d1c7c2167 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 9 Feb 2023 11:02:58 +0100 Subject: [PATCH 36/48] [Forgotten password] Tweaked layout to be the same as login --- application/views/user/forgot_password.php | 78 ++++++++++++++-------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/application/views/user/forgot_password.php b/application/views/user/forgot_password.php index 0ecb8e64..9694d8f8 100644 --- a/application/views/user/forgot_password.php +++ b/application/views/user/forgot_password.php @@ -1,14 +1,41 @@ -
-
-
-
-
-
-

-

Forgot Password?

-

You can reset your password here.

-
- + + +
+ +
+
+
+

+

Forgot Password?

+

You can reset your password here.

+
+ -
-
-
-
\ No newline at end of file +
+
+ \ No newline at end of file From 0f84f71b7e07b443f7c156aa914514ba70640419 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 9 Feb 2023 12:12:54 +0100 Subject: [PATCH 37/48] Sort SAT amd mode stats by count DESC --- application/controllers/Statistics.php | 1 + application/models/Logbook_model.php | 1 + 2 files changed, 2 insertions(+) diff --git a/application/controllers/Statistics.php b/application/controllers/Statistics.php index 9d187b13..e34801ef 100644 --- a/application/controllers/Statistics.php +++ b/application/controllers/Statistics.php @@ -104,6 +104,7 @@ class Statistics extends CI_Controller { $modestats[$i++]['total'] = $this->logbook_model->total_fm(); $modestats[$i]['mode'] = 'digi'; $modestats[$i]['total'] = $this->logbook_model->total_digi(); + usort($modestats, fn($a, $b) => $b['total'] <=> $a['total']); header('Content-Type: application/json'); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 1ca2f4da..919cb224 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1624,6 +1624,7 @@ class Logbook_model extends CI_Model { $this->db->where_in('station_id', $logbooks_locations_array); $this->db->where('COL_SAT_NAME is not null'); $this->db->where('COL_SAT_NAME !=', ''); + $this->db->order_by('count DESC'); $this->db->group_by('COL_SAT_NAME'); $query = $this->db->get($this->config->item('table_name')); From 36de0301518c862bc0aa7d67f8f98077681d2a78 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 9 Feb 2023 12:35:30 +0100 Subject: [PATCH 38/48] [Continents] Added band and mode filter --- application/controllers/Continents.php | 13 +++- application/models/Logbook_model.php | 19 +++++- application/views/continents/index.php | 94 +++++++++++++++++--------- assets/js/sections/continents.js | 67 ++++++++++++------ 4 files changed, 138 insertions(+), 55 deletions(-) diff --git a/application/controllers/Continents.php b/application/controllers/Continents.php index a3f48ff8..5858652d 100644 --- a/application/controllers/Continents.php +++ b/application/controllers/Continents.php @@ -6,6 +6,11 @@ class Continents extends CI_Controller { { $this->load->model('user_model'); $this->load->model('bands'); + $this->load->model('logbookadvanced_model'); + + $data['bands'] = $this->bands->get_worked_bands(); + $data['modes'] = $this->logbookadvanced_model->get_modes(); + if(!$this->user_model->authorize($this->config->item('auth_mode'))) { if($this->user_model->validate_session()) { $this->user_model->clear_session(); @@ -27,11 +32,17 @@ class Continents extends CI_Controller { public function get_continents() { + + $searchCriteria = array( + 'mode' => xss_clean($this->input->post('mode')), + 'band' => xss_clean($this->input->post('band')), + ); + $this->load->model('logbook_model'); $continentsstats = array(); - $total_continents = $this->logbook_model->total_continents(); + $total_continents = $this->logbook_model->total_continents($searchCriteria); $i = 0; if ($total_continents) { diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6a94d771..5dbe5e8e 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1631,7 +1631,7 @@ class Logbook_model extends CI_Model { } /* Return total number of QSOs per continent */ - function total_continents() { + function total_continents($searchCriteria) { $CI =& get_instance(); $CI->load->model('logbooks_model'); @@ -1645,6 +1645,23 @@ class Logbook_model extends CI_Model { $this->db->where_in('station_id', $logbooks_locations_array); $this->db->where('COL_CONT is not null'); $this->db->where('COL_CONT !=', ''); + + if ($searchCriteria['mode'] !== '') { + $this->db->group_start(); + $this->db->where('COL_MODE', $searchCriteria['mode']); + $this->db->or_where('COL_SUBMODE', $searchCriteria['mode']); + $this->db->group_end(); + } + + if ($searchCriteria['band'] !== '') { + if($searchCriteria['band'] != "SAT") { + $this->db->where('COL_BAND', $searchCriteria['band']); + $this->db->where('COL_PROP_MODE != "SAT"'); + } else { + $this->db->where('COL_PROP_MODE', 'SAT'); + } + } + $this->db->order_by('count DESC'); $this->db->group_by('COL_CONT'); $query = $this->db->get($this->config->item('table_name')); diff --git a/application/views/continents/index.php b/application/views/continents/index.php index da349ee2..a03b8d3f 100644 --- a/application/views/continents/index.php +++ b/application/views/continents/index.php @@ -1,38 +1,70 @@
-

- -

+

+ +

-
- +
+ -
+
-
-
-
- - - - - - - - - -
#Continent# of QSO's worked
-
-
-
+
+
+
" method="post"> +
+ +
+ + +
+
+ + +
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + + +
#Continent# of QSO's worked
+
+
+
\ No newline at end of file diff --git a/assets/js/sections/continents.js b/assets/js/sections/continents.js index e58a2422..0b53400e 100644 --- a/assets/js/sections/continents.js +++ b/assets/js/sections/continents.js @@ -1,19 +1,49 @@ -totalContinentQsos(); +$(document).ready(function () { + // Needed for continentstable header fix, will be squished without + $("a[href='#continents']").on('shown.bs.tab', function(e) { + $(".continentstable").DataTable().columns.adjust(); + }); -// Needed for continentstable header fix, will be squished without -$("a[href='#continents']").on('shown.bs.tab', function(e) { - $(".continentstable").DataTable().columns.adjust(); + $('#searchForm').submit(function (e) { + $('#searchButton').prop("disabled", true); + + $.ajax({ + url: this.action, + type: 'post', + data: { + mode: this.mode.value, + band: this.band.value, + }, + dataType: 'json', + success: function (data) { + $('#searchButton').prop("disabled", false); + totalContinentQsos(data); + }, + error: function (data) { + $('#searchButton').prop("disabled", false); + BootstrapDialog.alert({ + title: 'ERROR', + message: 'An error ocurred while making the request', + type: BootstrapDialog.TYPE_DANGER, + closable: false, + draggable: false, + callback: function (result) { + } + }); + }, + }); + return false; + }); + + $('#searchForm').submit(); }); -function totalContinentQsos() { +function totalContinentQsos(data) { // using this to change color of legend and label according to background color var color = ifDarkModeThemeReturn('white', 'grey'); - $.ajax({ - url: base_url+'index.php/continents/get_continents', - type: 'post', - success: function (data) { if (data.length > 0) { + $('.continentstable > tbody').empty(); $('.tabs').removeAttr('hidden'); var labels = []; @@ -47,6 +77,12 @@ function totalContinentQsos() { }); const COLORS = ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499"] + + let chartStatus = Chart.getChart("continentChart"); // id + if (chartStatus != undefined) { + chartStatus.destroy(); + } + var ctx = document.getElementById("continentChart").getContext('2d'); var myChart = new Chart(ctx, { plugins: [ChartPieChartOutlabels], @@ -120,18 +156,5 @@ function totalContinentQsos() { if (background != ('rgb(255, 255, 255)')) { $(".buttons-csv").css("color", "white"); } - - $('.continentstable').DataTable({ - responsive: false, - ordering: false, - "scrollY": "330px", - "scrollX": true, - "ScrollCollapse": true, - "paging": false, - bFilter: false, - bInfo: false, - }); } - } - }); } From 066ed107ede7c88d01e35aab555b64274345ad52 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 9 Feb 2023 12:44:51 +0100 Subject: [PATCH 39/48] [Continents] Removed filter for labels with low percentage --- assets/js/sections/continents.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/assets/js/sections/continents.js b/assets/js/sections/continents.js index 0b53400e..b0acfd95 100644 --- a/assets/js/sections/continents.js +++ b/assets/js/sections/continents.js @@ -123,9 +123,6 @@ function totalContinentQsos(data) { align: "middle" }, outlabels: { - display: function(context) { // Hide labels with low percentage - return ((context.dataset.data[context.dataIndex] / totalQso * 100) > 1) - }, backgroundColor: COLORS, borderColor: COLORS, borderRadius: 2, // Border radius of Label From 5f87268e01d1328fe0c3cb4dc8f1603cc13608f0 Mon Sep 17 00:00:00 2001 From: cats-shadow Date: Thu, 9 Feb 2023 16:36:53 +0300 Subject: [PATCH 40/48] Russian translation update --- .../language/russian/general_words_lang.php | 13 +++++++++++- application/language/russian/lotw_lang.php | 21 ++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index 966425ba..624340e9 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -16,7 +16,7 @@ $lang['general_word_datetime'] = 'Дата/Время'; $lang['general_word_none'] = '-'; $lang['general_word_name'] = 'Имя'; $lang['general_word_location'] = 'QTH'; -$lang['general_word_comment'] = 'Коммент.'; +$lang['general_word_comment'] = 'Комментарий'; $lang['general_word_general'] = 'Общее'; $lang['general_word_satellite'] = 'Спутник'; $lang['general_word_satellite_short'] = 'Спутн.'; @@ -97,15 +97,18 @@ $lang['gen_hamradio_logbook'] = 'Журнал'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_continent'] = 'Континент'; $lang['gen_hamradio_usa_state'] = 'Штат США'; $lang['gen_hamradio_county_reference'] = 'Графство США'; $lang['gen_hamradio_iota_reference'] = 'IOTA справочник'; $lang['gen_hamradio_sota_reference'] = 'SOTA Справочник'; $lang['gen_hamradio_wwff_reference'] = 'WWFF справочник'; +$lang['gen_hamradio_pota_reference'] = 'POTA справочник'; $lang['gen_hamradio_dok'] = 'DOK'; $lang['gen_hamradio_state'] = 'Штат'; $lang['gen_hamradio_iota'] = 'IOTA'; $lang['gen_hamradio_sota'] = 'SOTA'; +$lang['gen_hamradio_pota'] = 'POTA'; $lang['gen_hamradio_gridsquare'] = 'Квадрат'; $lang['gen_hamradio_operator'] = 'Оператор'; @@ -125,3 +128,11 @@ $lang['gen_this_qso_was_confirmed_on'] = 'Это QSO было подтвержд $lang['error_no_logbook_found'] = 'Журнал не найден. Вам необходимо опрелелить журнал в разделе Журналы станций! Тут:'; $lang['copy_to_clipboard'] = 'Скопировать в буфер обмена'; + +$lang['africa'] = 'Африка'; +$lang['antarctica'] = 'Антарктика'; +$lang['asia'] = 'Азия'; +$lang['europe'] = 'Европа'; +$lang['northamerica'] = 'Северная Америка'; +$lang['oceania'] = 'Океания'; +$lang['southamerica'] = 'Южная Америка'; diff --git a/application/language/russian/lotw_lang.php b/application/language/russian/lotw_lang.php index 0ff5a6d1..6003e2fd 100644 --- a/application/language/russian/lotw_lang.php +++ b/application/language/russian/lotw_lang.php @@ -4,15 +4,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['lotw_short'] = 'LoTW'; $lang['lotw_title'] = 'Logbook of the World'; -$lang['lotw_title_available_cert'] = 'Available Certificates'; -$lang['lotw_title_information'] = 'Information'; -$lang['lotw_title_upload_p12_cert'] = 'Upload Logbook of the World .p12 Certificate'; -$lang['lotw_title_export_p12_file_instruction'] = 'Export .p12 File Instructions'; -$lang['lotw_title_adif_import'] = 'ADIF Import'; -$lang['lotw_title_adif_import_options'] = 'Import Options'; +$lang['lotw_title_available_cert'] = 'Имеющиеся сертификаты'; +$lang['lotw_title_information'] = 'Информация'; +$lang['lotw_title_upload_p12_cert'] = 'Загрузка Logbook of the World .p12 сертификата'; +$lang['lotw_title_export_p12_file_instruction'] = 'Инструкции по экспорту .p12 файла'; +$lang['lotw_title_adif_import'] = 'Импорт ADIF'; +$lang['lotw_title_adif_import_options'] = 'Опции импорта'; -$lang['lotw_beta_warning'] = 'Please be aware that LoTW Sync is BETA, see wiki for help.'; -$lang['lotw_no_certs_uploaded'] = 'Вам необходимо загрузить сертификат LoTW в формате p12 для использования этих функций.'; +$lang['lotw_beta_warning'] = 'Обратите внимание, что синхронизация с LoTW пока в статусе бета, подробнее в wiki.'; +$lang['lotw_no_certs_uploaded'] = 'Вам необходимо загрузить сертификат LoTW в формате p12 для использования этих функций.'; $lang['lotw_date_created'] = 'Дата создания'; $lang['lotw_date_expires'] = 'Дата окончания срока действия'; @@ -22,6 +22,7 @@ $lang['lotw_status'] = 'Статус'; $lang['lotw_options'] = 'Опции'; $lang['lotw_valid'] = 'Действует'; $lang['lotw_expired'] = 'Истёк'; +$lang['lotw_expiring'] = 'Истекает'; $lang['lotw_not_synced'] = 'Не синхронизирован'; $lang['lotw_certificate_dxcc'] = 'Сертификат DXCC'; @@ -51,3 +52,7 @@ $lang['lotw_p12_export_step_three'] = 'Кликните "Сохранить Се $lang['lotw_p12_export_step_four'] = 'Загрузите полученный файл ниже.'; $lang['lotw_confirmed'] = 'Это QSO подтверждено на LoTW'; + +// LotW Expiry +$lang['lotw_cert_expiring'] = 'Как минимум, один из ваших сертификатов LoTW скоро истечёт!'; +$lang['lotw_cert_expired'] = 'Один из ваших сертификатов LoTW истёк!'; From 578ad13f960b10bc18c5a837ebc782d42672ad3e Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Fri, 10 Feb 2023 08:06:39 +0100 Subject: [PATCH 41/48] [Forgotten password] Small lock to the right instead --- application/views/user/forgot_password.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/application/views/user/forgot_password.php b/application/views/user/forgot_password.php index 9694d8f8..6f8003d3 100644 --- a/application/views/user/forgot_password.php +++ b/application/views/user/forgot_password.php @@ -26,14 +26,12 @@ input[type="email"] {
- +
-

-

Forgot Password?

-

You can reset your password here.

+

Forgot Password?

+

You can reset your password here.

From 8ad06daf2bd77ff30e48017d7e6c12861925eace Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Fri, 10 Feb 2023 09:45:19 +0100 Subject: [PATCH 42/48] [PHP 8.1] Fix for passing null to parameter --- application/models/Logbook_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 5757b59a..ac73805d 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -175,8 +175,8 @@ class Logbook_model extends CI_Model { 'COL_TX_PWR' => $tx_power, 'COL_STX' => $stx, 'COL_SRX' => $srx, - 'COL_STX_STRING' => strtoupper(trim($stx_string)), - 'COL_SRX_STRING' => strtoupper(trim($srx_string)), + 'COL_STX_STRING' => $stx_string == null ? '' : strtoupper(trim($stx_string)), + 'COL_SRX_STRING' => $srx_string == null ? '' : strtoupper(trim($srx_string)), 'COL_CONTEST_ID' => $contestid, 'COL_NR_BURSTS' => null, 'COL_NR_PINGS' => null, From 1f99efcca33e5cb3a8bfef93da134708ef05b161 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 10 Feb 2023 16:02:40 +0000 Subject: [PATCH 43/48] function get_modes() returns only SSB in array list rather than USB & LSB as sub modes Fixes issue #1998 --- application/models/Logbookadvanced_model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index 30be8f8d..a5e4a240 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -211,7 +211,10 @@ class Logbookadvanced_model extends CI_Model { if ($mode->col_submode == null || $mode->col_submode == "") { array_push($modes, $mode->col_mode); } else { - array_push($modes, $mode->col_submode); + // Make sure we don't add LSB or USB as submodes in the array list + if ($mode->col_mode != "SSB") { + array_push($modes, $mode->col_submode); + } } } From 0ecc5de833b388e50a5b0cefe975d49d56cd6d1c Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 18 Feb 2023 09:58:54 +0100 Subject: [PATCH 44/48] [DXCC summary] Fix for bands that are not active --- application/controllers/Lookup.php | 2 +- application/models/Lookup_model.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index f2e0dfa8..fe6597cd 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -36,7 +36,7 @@ class Lookup extends CI_Controller { $this->load->model('lookup_model'); $this->load->model('bands'); - $data['bands'] = $this->bands->get_worked_bands(); + $data['bands'] = $this->bands->get_worked_bands('dxcc'); $data['type'] = xss_clean($this->input->post('type')); $data['dxcc'] = xss_clean($this->input->post('dxcc')); diff --git a/application/models/Lookup_model.php b/application/models/Lookup_model.php index d87747a8..0f3f5cea 100644 --- a/application/models/Lookup_model.php +++ b/application/models/Lookup_model.php @@ -19,13 +19,17 @@ class Lookup_model extends CI_Model{ // Populating array with worked band/mode combinations $worked = $this->getQueryData($queryinfo, 'worked'); foreach ($worked as $w) { - $resultArray[$w->col_mode][$w->col_band] = 'W'; + if(in_array($w->col_band, $queryinfo['bands'])) { + $resultArray[$w->col_mode][$w->col_band] = 'W'; + } } // Populating array with confirmed band/mode combinations $confirmed = $this->getQueryData($queryinfo, 'confirmed'); foreach ($confirmed as $c) { - $resultArray[$c->col_mode][$c->col_band] = 'C'; + if(in_array($c->col_band, $queryinfo['bands'])) { + $resultArray[$c->col_mode][$c->col_band] = 'C'; + } } return $resultArray; From 39536c98e9055ace075b824e93640b63964b749a Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 18 Feb 2023 14:19:02 +0100 Subject: [PATCH 45/48] [Quick lookup] Adapted for selectable bands --- application/controllers/Lookup.php | 2 +- application/models/Lookup_model.php | 4 ++-- application/views/lookup/index.php | 4 ++-- application/views/lookup/result.php | 4 ++-- assets/js/sections/common.js | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index fe6597cd..04c2ebcd 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -36,7 +36,7 @@ class Lookup extends CI_Controller { $this->load->model('lookup_model'); $this->load->model('bands'); - $data['bands'] = $this->bands->get_worked_bands('dxcc'); + $data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type'))); $data['type'] = xss_clean($this->input->post('type')); $data['dxcc'] = xss_clean($this->input->post('dxcc')); diff --git a/application/models/Lookup_model.php b/application/models/Lookup_model.php index 0f3f5cea..fce00f5a 100644 --- a/application/models/Lookup_model.php +++ b/application/models/Lookup_model.php @@ -52,8 +52,8 @@ class Lookup_model extends CI_Model{ switch ($queryinfo['type']) { case 'dxcc': $sqlquerytypestring .= " and col_dxcc = " . $queryinfo['dxcc']; break; case 'iota': $sqlquerytypestring .= " and col_iota = '" . $queryinfo['iota'] . "'"; break; - case 'grid': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; - case 'cqz': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; + case 'vucc': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; + case 'cq': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; case 'was': $sqlquerytypestring .= " and col_state = '" . $queryinfo['was'] . "' and COL_DXCC in ('291', '6', '110')";; break; case 'sota': $sqlquerytypestring .= " and col_sota_ref = '" . $queryinfo['sota'] . "'"; break; case 'wwff': $sqlquerytypestring .= " and col_sig = 'WWFF' and col_sig_info = '" . $queryinfo['wwff'] . "'"; break; diff --git a/application/views/lookup/index.php b/application/views/lookup/index.php index b0d755bb..fc839476 100644 --- a/application/views/lookup/index.php +++ b/application/views/lookup/index.php @@ -1,8 +1,8 @@
input->post('awardradio') == 'dxcc' || $this->input->method() !== 'post') echo ' checked'?>> - + +
+
-
- input->post('awardradio') == 'was') echo ' checked'?>> - -
-
- input->post('awardradio') == 'iota') echo ' checked'?>> - -
-
- input->post('awardradio') == 'waz') echo ' checked'?>> - -
-
- input->post('awardradio') == 'vucc') echo ' checked'?>> - -
-
-
Confirmation
@@ -113,12 +88,12 @@ input->post('awardradio')) { - case 'dxcc': $result = write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; - case 'was': $result = write_was_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; - case 'iota': $result = write_iota_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; - case 'waz': $result = write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; - case 'vucc': $result = write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('awardradio')); break; + switch ($this->input->post('award')) { + case 'dxcc': $result = write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('award')); break; + case 'was': $result = write_was_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('award')); break; + case 'iota': $result = write_iota_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('award')); break; + case 'waz': $result = write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('award')); break; + case 'vucc': $result = write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $this->input->post('award')); break; } } else { From 28084231706759c201167ebb31aa63860a84c075 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Mon, 20 Feb 2023 08:16:29 +0100 Subject: [PATCH 47/48] [Timeline] Small dropdown fix --- application/views/timeline/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index ecf4a869..42f94743 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -41,11 +41,11 @@
Confirmation
From d675f05e4cfe8d4222a9bd17dbeedf0871c6effe Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 20 Feb 2023 15:20:16 +0000 Subject: [PATCH 48/48] [QSO] adjustments to the DXCC Stats box --- application/config/migration.php | 2 +- .../114_create_index_for_colsubmode.php | 15 +++++++++++++++ assets/js/sections/qso.js | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 application/migrations/114_create_index_for_colsubmode.php diff --git a/application/config/migration.php b/application/config/migration.php index 679b8daf..1c0ef7a1 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'] = 113; +$config['migration_version'] = 114; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/114_create_index_for_colsubmode.php b/application/migrations/114_create_index_for_colsubmode.php new file mode 100644 index 00000000..e69a25a4 --- /dev/null +++ b/application/migrations/114_create_index_for_colsubmode.php @@ -0,0 +1,15 @@ +db->query("ALTER TABLE `".$this->config->item('table_name')."` ADD INDEX (`COL_SUBMODE`)"); + } + + public function down() { + $this->db->query("ALTER TABLE `".$this->config->item('table_name')."` DROP INDEX (`COL_SUBMODE`)"); + } +} + +?> \ No newline at end of file diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 126df829..df22c366 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -408,7 +408,6 @@ $("#callsign").focusout(function() { if(result.dxcc.entity != undefined) { $('#country').val(convert_case(result.dxcc.entity)); $('#callsign_info').text(convert_case(result.dxcc.entity)); - getDxccResult(result.dxcc.adif, convert_case(result.dxcc.entity)); if($("#sat_name" ).val() != "") { //logbook/jsonlookupgrid/io77/SAT/0/0 @@ -452,6 +451,8 @@ $("#callsign").focusout(function() { } changebadge(result.dxcc.entity); + + getDxccResult(result.dxcc.adif, convert_case(result.dxcc.entity)); } if(result.lotw_member == "active") {