From 02a7d42a5bdc5e0cc71444f3d4c51d371ae82437 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 13 Feb 2026 08:26:27 +0100 Subject: [PATCH 1/9] Add SAT to timeline results for satellite awards --- application/models/Timeline_model.php | 27 +++++++++++++++++++-------- application/views/timeline/index.php | 16 +++++++++++----- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index ed0df9ef9..e5b4738d8 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -369,7 +369,8 @@ class Timeline_model extends CI_Model { foreach ($col_gridsquare as $grid) { $timeline[] = array( 'gridsquare' => $grid->gridsquare, - 'date' => $grid->date); + 'date' => $grid->date, + 'sat_name' => $grid->sat_name ?? ''); } $col_vucc_grids = $this->get_vucc_grids($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew); @@ -383,7 +384,8 @@ class Timeline_model extends CI_Model { // Doesn't exist, add new entry $timeline[] = array( 'gridsquare' => $grid_four, - 'date' => $gridSplit->date + 'date' => $gridSplit->date, + 'sat_name' => $gridSplit->sat_name ?? '' ); } else { // Exists, check the date @@ -403,8 +405,11 @@ class Timeline_model extends CI_Model { public function get_gridsquare($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(COL_TIME_ON) date, upper(substring(col_gridsquare, 1, 4)) gridsquare from " - .$this->config->item('table_name'). " thcv + $sql = "select min(COL_TIME_ON) date, upper(substring(col_gridsquare, 1, 4)) gridsquare "; + if ($propmode == 'SAT') { + $sql .= ", COL_SAT_NAME as sat_name "; + } + $sql .= "from ".$this->config->item('table_name'). " thcv where station_id in (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons @@ -440,8 +445,11 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) - order by date desc"; + $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) "; + if ($propmode == 'SAT') { + $sql .= ", sat_name "; + } + $sql .= "order by date desc"; $query = $this->db->query($sql, $binding); @@ -450,8 +458,11 @@ class Timeline_model extends CI_Model { public function get_vucc_grids($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select COL_TIME_ON as date, upper(col_vucc_grids) gridsquare from " - .$this->config->item('table_name'). " thcv + $sql = "select COL_TIME_ON as date, upper(col_vucc_grids) gridsquare "; + if ($propmode == 'SAT') { + $sql .= ", COL_SAT_NAME as sat_name "; + } + $sql .= "from ".$this->config->item('table_name'). " thcv where station_id in (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index 2484a10c3..a85d03bca 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -343,7 +343,7 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $ echo ''; } -function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode,$award, $selectedyear, $onlynew) { +function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $award, $selectedyear, $onlynew) { // Apply filtering to the timeline array $filtered_timeline = filter_timeline_array_vucc($timeline_array, $selectedyear, $onlynew); $i = count($filtered_timeline); // General counter for all entries @@ -353,8 +353,11 @@ function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, # '.__("Date").' '.__("Time").' - '.__("Gridsquare").' - '.__("Show QSOs").' + '.__("Gridsquare").''; + if ($propmode == 'SAT') { + echo ' '.__("Satellite").''; + } + echo ' '.__("Show QSOs").' '; @@ -366,8 +369,11 @@ function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, ' . $i-- . ' ' . date($custom_date_format, $date_as_timestamp) . ' ' . date('H:i', $date_as_timestamp) . ' - ' . $line['gridsquare'] . ' - '.__("Show").' + ' . $line['gridsquare'] . ''; + if ($propmode == 'SAT') { + echo ''.$line['sat_name'].''; + } + echo ' '.__("Show").' '; } echo ''; From 85d9a736c60b3d9d91155e1549054fda722020d4 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 12:38:44 +0100 Subject: [PATCH 2/9] Adjust SQL query for grids --- application/models/Timeline_model.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index e5b4738d8..990982d00 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -405,12 +405,12 @@ class Timeline_model extends CI_Model { public function get_gridsquare($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(COL_TIME_ON) date, upper(substring(col_gridsquare, 1, 4)) gridsquare "; - if ($propmode == 'SAT') { - $sql .= ", COL_SAT_NAME as sat_name "; - } - $sql .= "from ".$this->config->item('table_name'). " thcv - where station_id in (" . $location_list . ")"; + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, upper(substring(COL_GRIDSQUARE, 1, 4)) AS gridsquare, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY upper(substring(COL_GRIDSQUARE, 1, 4)) ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv + WHERE station_id IN (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons $sql .= " and col_prop_mode = ?"; @@ -445,11 +445,10 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) "; - if ($propmode == 'SAT') { - $sql .= ", sat_name "; - } - $sql .= "order by date desc"; + $sql .= " and col_gridsquare <> ''"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); From ade684b570256967fe7fc42b7341019cf813a2db Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 12:52:59 +0100 Subject: [PATCH 3/9] Adjust SQL query for VUCC grids --- application/models/Timeline_model.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 990982d00..37847cc32 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -445,7 +445,7 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_gridsquare <> ''"; + $sql .= " AND COL_GRIDSQUARE <> ''"; $sql .= ") ranked "; $sql .= "WHERE rn = 1 "; $sql .= "ORDER BY date DESC;"; @@ -457,12 +457,12 @@ class Timeline_model extends CI_Model { public function get_vucc_grids($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select COL_TIME_ON as date, upper(col_vucc_grids) gridsquare "; - if ($propmode == 'SAT') { - $sql .= ", COL_SAT_NAME as sat_name "; - } - $sql .= "from ".$this->config->item('table_name'). " thcv - where station_id in (" . $location_list . ")"; + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, upper(COL_VUCC_GRIDS) AS gridsquare, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY upper(COL_VUCC_GRIDS) ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv + WHERE station_id IN (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons $sql .= " and col_prop_mode = ?"; @@ -497,7 +497,10 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_vucc_grids <> ''"; + $sql .= " AND COL_VUCC_GRIDS <> ''"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); return $query->result(); From 8079b7200e9cc0d863b560641765710e003380d6 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 13:28:48 +0100 Subject: [PATCH 4/9] Add SAT to DXCC award timeline --- application/models/Timeline_model.php | 12 ++++++++---- application/views/timeline/index.php | 14 ++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 37847cc32..17ade45e4 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -26,8 +26,11 @@ class Timeline_model extends CI_Model { public function get_timeline_dxcc($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(date(COL_TIME_ON)) date, prefix, dxcc_entities.name as dxcc_name, end, adif from " - .$this->config->item('table_name'). " thcv + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, prefix, dxcc_entities.name as dxcc_name, end, adif, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY adif ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv join dxcc_entities on thcv.col_dxcc = dxcc_entities.adif where station_id in (" . $location_list . ") and col_dxcc > 0 "; @@ -64,8 +67,9 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " group by col_dxcc - order by date desc"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); return $query->result(); diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index a85d03bca..f73d61465 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -197,8 +197,11 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, # ' . __("Date") . ' ' . __("Prefix") . ' - ' . __("Country") . ' - ' . __("Status") . ' + ' . __("Country") . ''; + if ($propmode == 'SAT') { + echo ' '.__("Satellite").''; + } + echo ' ' . __("Status") . ' ' . __("End Date") . ' ' . __("Show QSOs") . ' @@ -211,8 +214,11 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, ' . $i-- . ' ' . date($custom_date_format, $date_as_timestamp) . ' ' . $line->prefix . ' - ' . ucwords(strtolower($line->dxcc_name)) . ' - '; + ' . ucwords(strtolower($line->dxcc_name)) . ''; + if ($propmode == 'SAT') { + echo ''.$line->sat_name.''; + } + echo ' '; if (!empty($line->end)) echo '' . __("Deleted DXCC") . ''; echo ' ' . $line->end . ' From df5e80d7064e4d6852a4f228f1e1ff0b1d3d726e Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 14:18:18 +0100 Subject: [PATCH 5/9] Also show SAT if All is selected as band (includes prop mode SAT) --- application/views/timeline/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index f73d61465..1e2f2b1ea 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -198,7 +198,7 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, ' . __("Date") . ' ' . __("Prefix") . ' ' . __("Country") . ''; - if ($propmode == 'SAT') { + if ($propmode == 'SAT' || $propmode == 'All') { echo ' '.__("Satellite").''; } echo ' ' . __("Status") . ' @@ -215,7 +215,7 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, ' . date($custom_date_format, $date_as_timestamp) . ' ' . $line->prefix . ' ' . ucwords(strtolower($line->dxcc_name)) . ''; - if ($propmode == 'SAT') { + if ($propmode == 'SAT' || $propmode == 'All') { echo ''.$line->sat_name.''; } echo ' '; @@ -360,7 +360,7 @@ function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, '.__("Date").' '.__("Time").' '.__("Gridsquare").''; - if ($propmode == 'SAT') { + if ($propmode == 'SAT' || $propmode == 'All') { echo ' '.__("Satellite").''; } echo ' '.__("Show QSOs").' @@ -376,7 +376,7 @@ function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, ' . date($custom_date_format, $date_as_timestamp) . ' ' . date('H:i', $date_as_timestamp) . ' ' . $line['gridsquare'] . ''; - if ($propmode == 'SAT') { + if ($propmode == 'SAT' || $propmode == 'All') { echo ''.$line['sat_name'].''; } echo ' '.__("Show").' From ec0396b7368a4b7ab0f62e07fcf47cf5478a4ce8 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 14:28:06 +0100 Subject: [PATCH 6/9] Add satellite to WAS timeline --- application/models/Timeline_model.php | 12 ++++++++---- application/views/timeline/index.php | 14 ++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 17ade45e4..e2f2bc58b 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -127,8 +127,11 @@ class Timeline_model extends CI_Model { public function get_timeline_was($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(date(COL_TIME_ON)) date, col_state from " - .$this->config->item('table_name'). " thcv + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, col_state, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY COL_STATE ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv where station_id in (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons @@ -167,8 +170,9 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " group by col_state - order by date desc"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index 1e2f2b1ea..c58a85e86 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -268,8 +268,11 @@ function write_was_timeline($timeline_array, $custom_date_format, $bandselect, $ # ' . __("Date") . ' - ' . __("State") . ' - ' . __("Show QSOs") . ' + ' . __("State") . ''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo ' '.__("Satellite").''; + } + echo ' ' . __("Show QSOs") . ' '; @@ -280,8 +283,11 @@ function write_was_timeline($timeline_array, $custom_date_format, $bandselect, $ echo ' ' . $i-- . ' ' . date($custom_date_format, $date_as_timestamp) . ' - ' . $line->col_state . ' - col_state . '","' . $bandselect . '","' . $modeselect . '","' . $propmode . '","' . $award .'")>' . __("Show") . ' + ' . $line->col_state . ''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo '' . $line->sat_name . ''; + } + echo ' col_state . '","' . $bandselect . '","' . $modeselect . '","' . $propmode . '","' . $award .'")>' . __("Show") . ' '; } echo ''; From 3d07d6bff6c4ca84630dd26cb102c743a7ca4e9f Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 14:39:16 +0100 Subject: [PATCH 7/9] Add SAT to WAZ timeline --- application/models/Timeline_model.php | 13 +++++++++---- application/views/timeline/index.php | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index e2f2bc58b..0a8f03992 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -230,8 +230,11 @@ class Timeline_model extends CI_Model { public function get_timeline_waz($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(date(COL_TIME_ON)) date, col_cqz from " - .$this->config->item('table_name'). " thcv + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, col_cqz, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY col_cqz ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv where station_id in (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons @@ -268,8 +271,10 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_cqz <> '' group by col_cqz - order by date desc"; + $sql .= " and col_cqz <> ''"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index c58a85e86..e03142961 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -336,8 +336,11 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $ # '.__("Date").' - '.__("CQ Zone").' - '.__("Show QSOs").' + '.__("CQ Zone").''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo ' '.__("Satellite").''; + } + echo ' '.__("Show QSOs").' '; @@ -348,8 +351,11 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $ echo ' ' . $i-- . ' ' . date($custom_date_format, $date_as_timestamp) . ' - ' . $line->col_cqz . ' - col_cqz . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' + ' . $line->col_cqz . ''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo '' . $line->sat_name . ''; + } + echo ' col_cqz . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' '; } echo ''; From f3f92bd540a7e07d276aa9c24140a8320ee6843a Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 15:04:59 +0100 Subject: [PATCH 8/9] Add satellite to WAJA timeline --- application/models/Timeline_model.php | 13 +++++++++---- application/views/timeline/index.php | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 0a8f03992..6b99d4287 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -77,8 +77,11 @@ class Timeline_model extends CI_Model { public function get_timeline_waja($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(date(COL_TIME_ON)) date, col_state from " - .$this->config->item('table_name'). " thcv + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, col_state, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY COL_STATE ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv where station_id in (" . $location_list . ")"; if ($band == 'SAT') { // Left for compatibility reasons @@ -117,8 +120,10 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " group by col_state - order by date desc"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index e03142961..142430486 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -240,8 +240,11 @@ function write_waja_timeline($timeline_array, $custom_date_format, $bandselect, # '.__("Date").' - '.__("Prefecture").' - '.__("Show QSOs").' + '.__("Prefecture").''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo ' '.__("Satellite").''; + } + echo ' '.__("Show QSOs").' '; @@ -252,8 +255,11 @@ function write_waja_timeline($timeline_array, $custom_date_format, $bandselect, echo ' ' . $i-- . ' ' . date($custom_date_format, $date_as_timestamp) . ' - ' . $CI->Waja->jaPrefectures[$line->col_state] . ' ('.$line->col_state.') - col_state . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' + ' . $CI->Waja->jaPrefectures[$line->col_state] . ' ('.$line->col_state.')'; + if ($propmode == 'SAT' || $propmode == 'All') { + echo ''.$line->sat_name.''; + } + echo ' col_state . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' '; } echo ''; From df1a7f9b00bd1cc1a004cb4f3f9a5139202331f4 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 19 Feb 2026 15:11:07 +0100 Subject: [PATCH 9/9] Add satellite to IOTA timeline (though not supported by IOTA) --- application/models/Timeline_model.php | 13 +++++++++---- application/views/timeline/index.php | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 6b99d4287..43316f53f 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -186,8 +186,11 @@ class Timeline_model extends CI_Model { public function get_timeline_iota($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) { $binding = []; - $sql = "select min(date(COL_TIME_ON)) date, col_iota, name, prefix from " - .$this->config->item('table_name'). " thcv + $sql = "SELECT * FROM ("; + $sql .= "SELECT COL_TIME_ON AS date, col_iota, name, prefix, "; + $sql .= "COL_SAT_NAME AS sat_name, "; + $sql .= "ROW_NUMBER() OVER (PARTITION BY col_iota ORDER BY COL_TIME_ON ASC) AS rn "; + $sql .= "FROM ".$this->config->item('table_name'). " thcv join iota on thcv.col_iota = iota.tag where station_id in (" . $location_list . ")"; @@ -225,8 +228,10 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " and col_iota <> '' group by col_iota, name, prefix - order by date desc"; + $sql .= " and col_iota <> ''"; + $sql .= ") ranked "; + $sql .= "WHERE rn = 1 "; + $sql .= "ORDER BY date DESC;"; $query = $this->db->query($sql, $binding); diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index 142430486..d36a1d6d7 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -312,8 +312,11 @@ function write_iota_timeline($timeline_array, $custom_date_format, $bandselect, '.__("Date").' '.__("IOTA").' '.__("Name").' - '.__("Prefix").' - '.__("Show QSOs").' + '.__("Prefix").''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo ' '.__("Satellite").''; + } + echo ' '.__("Show QSOs").' '; @@ -326,8 +329,11 @@ function write_iota_timeline($timeline_array, $custom_date_format, $bandselect, ' . date($custom_date_format, $date_as_timestamp) . ' ' . $line->col_iota . ' ' . $line->name . ' - ' . $line->prefix . ' - col_iota . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' + ' . $line->prefix . ''; + if ($propmode == 'SAT' || $propmode == 'All') { + echo '' . $line->sat_name . ''; + } + echo ' col_iota . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").' '; } echo '';