| ' . __("Total worked") . ' | ';
$addsat='';
foreach ($dxcc_summary['worked'] as $band => $dxcc) { // Fills the table with the data
+ if ($posted_band == 'SAT' && $band == 'Total') {
+ continue;
+ }
if ($band != 'SAT') {
echo '';
if ($band == 'Total') {
@@ -347,6 +352,9 @@
| ' . __("Total confirmed") . ' | ';
$addsat='';
foreach ($dxcc_summary['confirmed'] as $band => $dxcc) { // Fills the table with the data
+ if ($posted_band == 'SAT' && $band == 'Total') {
+ continue;
+ }
if ($band != 'SAT') {
echo '';
if ($band == 'Total') {
From b186c1595fbb57a01733dfc8325be1f6594e117d Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Fri, 27 Feb 2026 10:51:47 +0100
Subject: [PATCH 03/14] Fix continent filter
---
application/models/Dxcc.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php
index 4469f8b05..2c5668a5a 100644
--- a/application/models/Dxcc.php
+++ b/application/models/Dxcc.php
@@ -278,6 +278,7 @@ class DXCC extends CI_Model {
MAX(case when thcv.COL_QRZCOM_QSO_DOWNLOAD_STATUS= 'Y' then 1 else 0 end) as qrz,
MAX(case when thcv.COL_CLUBLOG_QSO_DOWNLOAD_STATUS = 'Y' then 1 else 0 end) as clublog
FROM " . $this->config->item('table_name') . " thcv
+ join dxcc_entities on thcv.col_dxcc = dxcc_entities.adif
WHERE station_id IN (" . $location_list . ") AND thcv.col_dxcc > 0";
// Mode filter
@@ -323,6 +324,7 @@ class DXCC extends CI_Model {
MAX(case when thcv.COL_QRZCOM_QSO_DOWNLOAD_STATUS= 'Y' then 1 else 0 end) as qrz,
MAX(case when thcv.COL_CLUBLOG_QSO_DOWNLOAD_STATUS = 'Y' then 1 else 0 end) as clublog
FROM " . $this->config->item('table_name') . " thcv
+ join dxcc_entities on thcv.col_dxcc = dxcc_entities.adif
LEFT JOIN satellite on thcv.COL_SAT_NAME = satellite.name
WHERE station_id IN (" . $location_list . ") AND thcv.col_dxcc > 0";
From 35fb4ea5b3ab28778d22925e235fc9696f673ece Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Sat, 28 Feb 2026 11:32:40 +0100
Subject: [PATCH 04/14] Fixed map
---
application/controllers/Awards.php | 9 ++++++
application/models/Dxcc.php | 51 ++++++++++++++++++------------
assets/js/sections/dxccmap.js | 3 +-
3 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php
index b03a30d31..55fb874c8 100644
--- a/application/controllers/Awards.php
+++ b/application/controllers/Awards.php
@@ -1719,6 +1719,15 @@ class Awards extends CI_Controller {
$this->load->model('dxcc');
$this->load->model('bands');
+ $data['worked_bands'] = $this->bands->get_worked_bands('dxcc');
+
+ if ($this->input->post('band') == 'All') {
+ $bands = $data['worked_bands'];
+ }
+ else {
+ $bands[] = $this->input->post('band');
+ }
+
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = ($this->input->post('qsl',true) ?? 0) == 0 ? NULL: 1;
diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php
index 2c5668a5a..b127a520a 100644
--- a/application/models/Dxcc.php
+++ b/application/models/Dxcc.php
@@ -86,14 +86,11 @@ class DXCC extends CI_Model {
continue;
}
- // Ensure string key for consistency
- $dxccKey = (string)$dxcc->dxcc;
-
// Track worked status for this DXCC
- if (!isset($dxccWorkedStatus[$dxccKey])) {
- $dxccWorkedStatus[$dxccKey] = 0;
+ if (!isset($dxccWorkedStatus[$dxcc->dxcc])) {
+ $dxccWorkedStatus[$dxcc->dxcc] = 0;
}
- $dxccWorkedStatus[$dxccKey]++;
+ $dxccWorkedStatus[$dxcc->dxcc]++;
// Check if confirmed based on the confirmation types selected in postdata
$isConfirmed = false;
@@ -120,19 +117,19 @@ class DXCC extends CI_Model {
}
if ($isConfirmed) {
- $dxccMatrix[$dxccKey][$dxcc->col_band] = '';
+ $dxccMatrix[$dxcc->dxcc][$dxcc->col_band] = '';
// Track confirmed DXCCs for summary
- if (!isset($confirmedDxccs[$dxcc->col_band][$dxccKey])) {
- $confirmedDxccs[$dxcc->col_band][$dxccKey] = true;
+ if (!isset($confirmedDxccs[$dxcc->col_band][$dxcc->dxcc])) {
+ $confirmedDxccs[$dxcc->col_band][$dxcc->dxcc] = true;
$summary['confirmed'][$dxcc->col_band]++;
}
} else {
- $dxccMatrix[$dxccKey][$dxcc->col_band] = '';
+ $dxccMatrix[$dxcc->dxcc][$dxcc->col_band] = '';
}
// Track worked DXCCs for summary
- if (!isset($workedDxccs[$dxcc->col_band][$dxccKey])) {
- $workedDxccs[$dxcc->col_band][$dxccKey] = true;
+ if (!isset($workedDxccs[$dxcc->col_band][$dxcc->dxcc])) {
+ $workedDxccs[$dxcc->col_band][$dxcc->dxcc] = true;
$summary['worked'][$dxcc->col_band]++;
}
}
@@ -182,8 +179,8 @@ class DXCC extends CI_Model {
if (!isset($confirmedDxccs[$dxcc->col_band][$dxccKey])) {
$confirmedDxccs[$dxcc->col_band][$dxccKey] = true;
$summary['confirmed'][$dxcc->col_band]++;
- }
- } else {
+ }
+ } else {
$dxccMatrix[$dxccKey][$dxcc->col_band] = '';
}
@@ -246,13 +243,25 @@ class DXCC extends CI_Model {
// If this is for the map, return simplified format
if ($map) {
$mapDxccs = [];
- foreach ($dxccMatrix as $dxcc => $data) {
- if (!isset($totalWorkedDxccs[$dxcc])) {
- $mapDxccs[$dxcc] = '-'; // Not worked
- } elseif (isset($totalConfirmedDxccs[$dxcc])) {
- $mapDxccs[$dxcc] = 'C'; // Confirmed
- } else {
- $mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
+ if ($bands[0] == 'SAT') {
+ foreach ($dxccMatrix as $dxcc => $data) {
+ if (isset($confirmedDxccs['SAT'][$dxcc])) {
+ $mapDxccs[$dxcc] = 'C'; // Confirmed
+ } elseif (isset($workedDxccs['SAT'][$dxcc])) {
+ $mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
+ } else {
+ $mapDxccs[$dxcc] = '-'; // Not worked
+ }
+ }
+ } else {
+ foreach ($dxccMatrix as $dxcc => $data) {
+ if (isset($totalConfirmedDxccs[$dxcc])) {
+ $mapDxccs[$dxcc] = 'C'; // Confirmed
+ } elseif (isset($totalWorkedDxccs[$dxcc])) {
+ $mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
+ } else {
+ $mapDxccs[$dxcc] = '-'; // Not worked
+ }
}
}
return $mapDxccs;
diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js
index 962ef239c..ca3ad4f7b 100644
--- a/assets/js/sections/dxccmap.js
+++ b/assets/js/sections/dxccmap.js
@@ -157,7 +157,8 @@ function load_dxcc_map2(data, worked, confirmed, notworked) {
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
- div.innerHTML += "Colors";
+ var band = $('#band2').val();
+ div.innerHTML += "Band: " + band + "";
div.innerHTML += '' + lang_general_word_confirmed + ' ('+confirmedcount+') ';
div.innerHTML += '' + lang_general_word_worked_not_confirmed + ' ('+workednotconfirmedcount+') ';
div.innerHTML += '' + lang_general_word_not_worked + ' ('+notworkedcount+') ';
From a65191e9787b269b046f0258b45668a042fe9067 Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Mon, 2 Mar 2026 10:59:18 +0100
Subject: [PATCH 05/14] Fix Array to string conversion for map
---
application/controllers/Awards.php | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php
index 55fb874c8..a0aab2277 100644
--- a/application/controllers/Awards.php
+++ b/application/controllers/Awards.php
@@ -186,7 +186,6 @@ class Awards extends CI_Controller {
$postdata['dateTo'] = null;
}
-
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$dxcclist = $this->dxcc->fetchdxcc($postdata, $location_list);
@@ -1758,14 +1757,12 @@ class Awards extends CI_Controller {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- $dxcclist = $this->dxcc->fetchdxcc($postdata, $logbooks_locations_array);
-
- if ($dxcclist[0]->adif == "0") {
- unset($dxcclist[0]);
- }
-
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
+ $dxcclist = $this->dxcc->fetchdxcc($postdata, $location_list);
+ if ($dxcclist[0]->adif == "0") {
+ unset($dxcclist[0]);
+ }
$dxcc_array = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata, $location_list, true);
} else {
$location_list = null;
From bae5a466db82b5e23ea981bb5b682ffcd91c6880 Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Mon, 2 Mar 2026 11:48:03 +0100
Subject: [PATCH 06/14] Fix sat filtering
---
application/models/Dxcc.php | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php
index b127a520a..2ec29e6da 100644
--- a/application/models/Dxcc.php
+++ b/application/models/Dxcc.php
@@ -195,25 +195,25 @@ class DXCC extends CI_Model {
$totalWorkedDxccs = [];
$totalConfirmedDxccs = [];
foreach ($workedDxccs as $band => $dxccs) {
- // Skip SAT for totals
- if ($band === 'SAT') {
- continue;
- }
foreach ($dxccs as $dxcc => $true) {
if (!isset($totalWorkedDxccs[$dxcc])) {
$totalWorkedDxccs[$dxcc] = true;
+ if ($band === 'SAT') {
+ continue;
+ }
+ $totalWorkedDxccsExSat[$dxcc] = true;
$summary['worked']['Total']++;
}
}
}
foreach ($confirmedDxccs as $band => $dxccs) {
- // Skip SAT for totals
- if ($band === 'SAT') {
- continue;
- }
foreach ($dxccs as $dxcc => $true) {
if (!isset($totalConfirmedDxccs[$dxcc])) {
$totalConfirmedDxccs[$dxcc] = true;
+ if ($band === 'SAT') {
+ continue;
+ }
+ $totalConfirmedDxccsExSat[$dxcc] = true; // For calculating total worked excluding SAT
$summary['confirmed']['Total']++;
}
}
@@ -255,9 +255,9 @@ class DXCC extends CI_Model {
}
} else {
foreach ($dxccMatrix as $dxcc => $data) {
- if (isset($totalConfirmedDxccs[$dxcc])) {
+ if (isset($totalConfirmedDxccsExSat[$dxcc])) {
$mapDxccs[$dxcc] = 'C'; // Confirmed
- } elseif (isset($totalWorkedDxccs[$dxcc])) {
+ } elseif (isset($totalWorkedDxccsExSat[$dxcc])) {
$mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
} else {
$mapDxccs[$dxcc] = '-'; // Not worked
From f5bc742a60931b25b5955c2680346268b550b4a8 Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Mon, 2 Mar 2026 17:55:22 +0100
Subject: [PATCH 07/14] Hide W when confirmed is chosen
---
application/models/Dxcc.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php
index 2ec29e6da..8520d63dd 100644
--- a/application/models/Dxcc.php
+++ b/application/models/Dxcc.php
@@ -124,7 +124,9 @@ class DXCC extends CI_Model {
$summary['confirmed'][$dxcc->col_band]++;
}
} else {
- $dxccMatrix[$dxcc->dxcc][$dxcc->col_band] = '';
+ if ($postdata['worked'] != NULL) {
+ $dxccMatrix[$dxcc->dxcc][$dxcc->col_band] = '';
+ }
}
// Track worked DXCCs for summary
@@ -181,7 +183,9 @@ class DXCC extends CI_Model {
$summary['confirmed'][$dxcc->col_band]++;
}
} else {
- $dxccMatrix[$dxccKey][$dxcc->col_band] = '';
+ if ($postdata['worked'] != NULL) {
+ $dxccMatrix[$dxccKey][$dxcc->col_band] = '';
+ }
}
// Track worked DXCCs for summary
From e7339f83f296199122d38d4da4064fa03a2ff9d3 Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Tue, 3 Mar 2026 07:46:01 +0100
Subject: [PATCH 08/14] Separate SAT and All without SATS
---
application/models/Dxcc.php | 9 ++
application/views/awards/dxcc/index.php | 159 +++++++++++-------------
2 files changed, 81 insertions(+), 87 deletions(-)
diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php
index 8520d63dd..eb6063301 100644
--- a/application/models/Dxcc.php
+++ b/application/models/Dxcc.php
@@ -53,12 +53,18 @@ class DXCC extends CI_Model {
// Initialize all bands to dash
foreach ($bands as $band) {
+ if (($postdata['band'] != 'SAT') && ($band == 'SAT')) {
+ continue;
+ }
$dxccMatrix[$adif][$band] = '-';
}
}
// Initialize summary counters only for the bands passed in
foreach ($bands as $band) {
+ if (($postdata['band'] != 'SAT') && ($band == 'SAT')) {
+ continue;
+ }
$summary['worked'][$band] = 0;
$summary['confirmed'][$band] = 0;
}
@@ -137,6 +143,9 @@ class DXCC extends CI_Model {
}
foreach ($dxccDataSat as $dxcc) {
+ if (($postdata['band'] != 'SAT') && ($band == 'SAT')) {
+ continue;
+ }
// Skip if this band is not in our requested bands list
if (!isset($validBands[$dxcc->col_band])) {
continue;
diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php
index f080aadba..176c3034d 100644
--- a/application/views/awards/dxcc/index.php
+++ b/application/views/awards/dxcc/index.php
@@ -172,7 +172,7 @@
|