From 3f877ac1fcf1db8276e1458124880136b55deffb Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 31 Jan 2024 11:59:45 +0100 Subject: [PATCH 1/3] Show all unconfirmed if no QSL method is selected --- application/controllers/Gridmap.php | 2 +- application/models/Gridmap_model.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/application/controllers/Gridmap.php b/application/controllers/Gridmap.php index 075906269..922e987c2 100644 --- a/application/controllers/Gridmap.php +++ b/application/controllers/Gridmap.php @@ -173,7 +173,7 @@ class Gridmap extends CI_Controller { } } - $data['grid_2char_confirmed'] = ($array_grid_2char_confirmed); + $data['grid_2char_confirmed'] = ($array_grid_2char_confirmed); $data['grid_4char_confirmed'] = ($array_grid_4char_confirmed); $data['grid_6char_confirmed'] = ($array_grid_6char_confirmed); diff --git a/application/models/Gridmap_model.php b/application/models/Gridmap_model.php index 067545c3a..0e38a3bec 100644 --- a/application/models/Gridmap_model.php +++ b/application/models/Gridmap_model.php @@ -13,6 +13,10 @@ class Gridmap_model extends CI_Model { return null; } + if ($lotw != "true" && $qsl != "true" && $eqsl != "true" && $qrz != "true") { + return null; + } + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = 'SELECT distinct substring(COL_GRIDSQUARE,1,6) as GRID_SQUARES, COL_BAND FROM ' @@ -129,6 +133,11 @@ class Gridmap_model extends CI_Model { return null; } + + if ($lotw != "true" && $qsl != "true" && $eqsl != "true" && $qrz != "true") { + return null; + } + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = 'SELECT distinct COL_VUCC_GRIDS, COL_BAND FROM ' From ee5384029948def358399ff5f4db133df6ea0182 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 31 Jan 2024 12:31:31 +0100 Subject: [PATCH 2/3] Much easier approach --- application/models/Gridmap_model.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/application/models/Gridmap_model.php b/application/models/Gridmap_model.php index 0e38a3bec..98bd829c1 100644 --- a/application/models/Gridmap_model.php +++ b/application/models/Gridmap_model.php @@ -13,10 +13,6 @@ class Gridmap_model extends CI_Model { return null; } - if ($lotw != "true" && $qsl != "true" && $eqsl != "true" && $qrz != "true") { - return null; - } - $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = 'SELECT distinct substring(COL_GRIDSQUARE,1,6) as GRID_SQUARES, COL_BAND FROM ' @@ -134,10 +130,6 @@ class Gridmap_model extends CI_Model { } - if ($lotw != "true" && $qsl != "true" && $eqsl != "true" && $qrz != "true") { - return null; - } - $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = 'SELECT distinct COL_VUCC_GRIDS, COL_BAND FROM ' @@ -186,7 +178,10 @@ class Gridmap_model extends CI_Model { $sql .= " or col_qrzcom_qso_download_status = 'Y'"; } if ($sql != '') { - $sql='and (1=0 '.$sql.')'; + $sql=' and (1=0 '.$sql.')'; + } + if ($sql == '') { + $sql=' and 1=0'; } return $sql; } From 0291056db61cb68914e7e10928ec8bf84e769840 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Wed, 31 Jan 2024 12:34:04 +0100 Subject: [PATCH 3/3] not wrkd/not cnfm now red and flag replaced --- assets/js/sections/bandmap_list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js index 4b16a8846..11d668548 100644 --- a/assets/js/sections/bandmap_list.js +++ b/assets/js/sections/bandmap_list.js @@ -56,7 +56,7 @@ $(function() { } else if (single.worked_dxcc) { dxcc_wked_info="text-warning"; } else { - dxcc_wked_info=""; + dxcc_wked_info="text-danger"; } if (single.cnfmd_call) { wked_info="text-success"; @@ -86,7 +86,7 @@ $(function() { spotted=wked_info+lotw_badge; data[0].push(spotted); if (single.dxcc_spotted.flag) { - dxcc_wked_info=((dxcc_wked_info != '' ?'' : '')+single.dxcc_spotted.entity+' '+single.dxcc_spotted.flag+(dxcc_wked_info != '' ? '' : '')); + dxcc_wked_info=((dxcc_wked_info != '' ?'' : '')+single.dxcc_spotted.flag+' '+single.dxcc_spotted.entity+(dxcc_wked_info != '' ? '' : '')); data[0].push(''+dxcc_wked_info+''); } else { data[0].push(''+single.dxcc_spotted.entity+'');