From d26068bd3bc55dcb30757f2a85a2f5e45f314346 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 17 Nov 2025 22:40:07 +0000 Subject: [PATCH] Add DXCC worked status and radio QSY to DX Cluster Enhances DX Cluster by showing DXCC entity and worked status per spot, including new band/country indicators. Adds radio selection and QSY functionality, updates UI with improved filters and spot marker styling, and provides user feedback for frequency actions. --- application/controllers/Dxcluster.php | 37 +++- application/views/dxcluster/bandmap.php | 148 +++++++++++++++- application/views/dxcluster/index.php | 213 ++++++++++++++++-------- 3 files changed, 322 insertions(+), 76 deletions(-) diff --git a/application/controllers/Dxcluster.php b/application/controllers/Dxcluster.php index 8e0f6913c..ef090ec04 100644 --- a/application/controllers/Dxcluster.php +++ b/application/controllers/Dxcluster.php @@ -14,6 +14,10 @@ class Dxcluster extends CI_Controller { function index() { $data['page_title'] = "DX Cluster Spots"; + + // Load radio data for CAT control + $this->load->model('cat'); + $data['radios'] = $this->cat->radios(); /// Load layout @@ -166,6 +170,10 @@ class Dxcluster extends CI_Controller { $callsign = $item['callsign']; $band = isset($item['band']) ? $item['band'] : null; + // Get DXCC entity for this callsign + $dxcc_info = $this->logbook_model->dxcc_lookup($callsign, date('Ymd')); + $dxcc = isset($dxcc_info['adif']) ? $dxcc_info['adif'] : null; + // Check if worked on this band $worked_on_band = false; if ($band) { @@ -175,10 +183,37 @@ class Dxcluster extends CI_Controller { // Check if worked on any band $worked_overall = $this->logbook_model->check_if_callsign_worked_in_logbook($callsign, $logbooks_locations_array, null) > 0; + // Check if DXCC entity is worked on this band + $dxcc_worked_on_band = false; + if ($dxcc && $band) { + $this->db->select('COL_DXCC'); + $this->db->where_in('station_id', $logbooks_locations_array); + $this->db->where('COL_DXCC', $dxcc); + $this->db->where('COL_BAND', $band); + $this->db->limit(1); + $query = $this->db->get($this->config->item('table_name')); + $dxcc_worked_on_band = $query->num_rows() > 0; + } + + // Check if DXCC entity is worked on any band + $dxcc_worked_overall = false; + if ($dxcc) { + $this->db->select('COL_DXCC'); + $this->db->where_in('station_id', $logbooks_locations_array); + $this->db->where('COL_DXCC', $dxcc); + $this->db->limit(1); + $query = $this->db->get($this->config->item('table_name')); + $dxcc_worked_overall = $query->num_rows() > 0; + } + $results[$callsign] = [ 'worked_on_band' => $worked_on_band, 'worked_overall' => $worked_overall, - 'band' => $band + 'band' => $band, + 'dxcc' => $dxcc, + 'dxcc_worked_on_band' => $dxcc_worked_on_band, + 'dxcc_worked_overall' => $dxcc_worked_overall, + 'country' => isset($dxcc_info['entity']) ? $dxcc_info['entity'] : null ]; } diff --git a/application/views/dxcluster/bandmap.php b/application/views/dxcluster/bandmap.php index dc394c89b..a6f5fd201 100644 --- a/application/views/dxcluster/bandmap.php +++ b/application/views/dxcluster/bandmap.php @@ -191,6 +191,42 @@ .spot-marker.new { animation: spotAppear 0.5s ease-out; } + + /* Worked status styling */ + .spot-marker.worked-on-band { + background: #27ae60; + border-color: #229954; + } + + .spot-marker.worked-on-band:hover { + background: #2ecc71; + border-color: #27ae60; + } + + .spot-marker.worked-other-band { + background: #3498db; + border-color: #2980b9; + } + + .spot-marker.worked-other-band:hover { + background: #5dade2; + border-color: #3498db; + } + + .spot-marker.not-worked { + background: #e74c3c; + border-color: #c0392b; + } + + .spot-marker.new-dxcc { + box-shadow: 0 0 10px #f39c12, 0 0 20px #f39c12; + border: 2px solid #f39c12; + } + + .spot-marker.new-band-dxcc { + box-shadow: 0 0 10px #e74c3c, 0 0 20px #e74c3c; + border: 2px solid #e74c3c; + } .tune-indicator { position: absolute; @@ -404,7 +440,7 @@
Band: 20m
-
Range: 14.000-14.350
+
Viewing: 14.000-14.350 MHz
Spots: 0
Total: 0
@@ -422,6 +458,8 @@