From 69457ca83927d6ea22e39b6c759a6e11bd61d6d4 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 13:36:37 +0100 Subject: [PATCH 01/13] [Station Locations] Added Aland Is States --- application/views/station_profile/edit.php | 28 +++++++++++++++++++++- assets/js/sections/station_locations.js | 12 ++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index fb4311ad..f10a1388 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -156,7 +156,7 @@
- @@ -175,6 +175,32 @@
+
+ + + +
+ +
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f7163725..468b9a4d 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -10,6 +10,7 @@ $(document).ready( function () { }); $("#canada_state").hide(); + $("#aland_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -18,11 +19,22 @@ $(document).ready( function () { $("#us_state").hide(); } + // Show Aland States if Aland is selected + if(selectedDXCCID == '5'){ + $("#aland_state").show(); + $("#canada_state").hide(); + $("#us_state").hide(); + } + $('#dxcc_select').change(function(){ if($(this).val() == '1'){ // or this.value == 'volvo' console.log("CANADA!"); $("#canada_state").show(); $("#us_state").hide(); + } else if($(this).val() == '5') { + $("#aland_state").show(); + $("#canada_state").hide(); + $("#us_state").hide(); } else { $("#canada_state").hide(); $("#us_state").show(); From ca12d2406e69df76bb04c7752dde84e54d738ec2 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 13:43:31 +0100 Subject: [PATCH 02/13] [Station Locations] Added Asiatic Russia States --- application/views/station_profile/edit.php | 46 ++++++++++++++++++++++ assets/js/sections/station_locations.js | 16 ++++++++ 2 files changed, 62 insertions(+) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index f10a1388..6d9b39ad 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -200,6 +200,52 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index 468b9a4d..ef283b01 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -11,12 +11,14 @@ $(document).ready( function () { $("#canada_state").hide(); $("#aland_state").hide(); + $("#asiatic_russia_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); if(selectedDXCCID == '1'){ $("#canada_state").show(); $("#us_state").hide(); + $("#asiatic_russia_state").hide(); } // Show Aland States if Aland is selected @@ -24,6 +26,15 @@ $(document).ready( function () { $("#aland_state").show(); $("#canada_state").hide(); $("#us_state").hide(); + $("#asiatic_russia_state").hide(); + } + + // Show Asiatic Russia States if Asiatic Russia is selected + if(selectedDXCCID == '15'){ + $("#asiatic_russia_state").show(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); } $('#dxcc_select').change(function(){ @@ -35,6 +46,11 @@ $(document).ready( function () { $("#aland_state").show(); $("#canada_state").hide(); $("#us_state").hide(); + } else if($(this).val() == '15') { + $("#asiatic_russia_state").show(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); } else { $("#canada_state").hide(); $("#us_state").show(); From fcea4a86a4aa52d60c8a36f873bb82f6a1f03da5 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 13:47:45 +0100 Subject: [PATCH 03/13] [Station Locations] Added Belarus States --- application/views/station_profile/edit.php | 16 ++++++++++++++++ assets/js/sections/station_locations.js | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 6d9b39ad..f2481b5b 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -247,6 +247,22 @@
+
+ + + +
+ +
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index ef283b01..f82e962b 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -12,6 +12,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#aland_state").hide(); $("#asiatic_russia_state").hide(); + $("#belarus_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -37,6 +38,15 @@ $(document).ready( function () { $("#us_state").hide(); } + // Show Belarus States if Belarus is selected + if(selectedDXCCID == '27'){ + $("#belarus_state").show(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + } + $('#dxcc_select').change(function(){ if($(this).val() == '1'){ // or this.value == 'volvo' console.log("CANADA!"); @@ -51,6 +61,12 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + } else if($(this).val() == '27') { + $("#belarus_state").show(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); } else { $("#canada_state").hide(); $("#us_state").show(); From e7dec782f362926b5b44b45f4b86b0e640278eec Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 13:51:38 +0100 Subject: [PATCH 04/13] [Station Locations] Added Mexico States --- application/views/station_profile/edit.php | 41 +++++++++++++++++++++- assets/js/sections/station_locations.js | 18 ++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index f2481b5b..3d57da6a 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -246,7 +246,6 @@
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f82e962b..f3ef1335 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -13,6 +13,7 @@ $(document).ready( function () { $("#aland_state").hide(); $("#asiatic_russia_state").hide(); $("#belarus_state").hide(); + $("#mexico_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -47,6 +48,16 @@ $(document).ready( function () { $("#us_state").hide(); } + // Show Mexico States if Mexico is selected + if(selectedDXCCID == '50'){ + $("#mexico_state").show(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + } + $('#dxcc_select').change(function(){ if($(this).val() == '1'){ // or this.value == 'volvo' console.log("CANADA!"); @@ -67,6 +78,13 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + } else if($(this).val() == '50') { + $("#mexico_state").show(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); } else { $("#canada_state").hide(); $("#us_state").show(); From 3483df439046ec6eb53c28fe9cd55cb46419265b Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 14:09:19 +0100 Subject: [PATCH 05/13] [Station Locations] Added European Russia States --- application/views/station_profile/edit.php | 59 ++++++++++++++++++++++ assets/js/sections/station_locations.js | 53 +++++++++++++++++-- 2 files changed, 109 insertions(+), 3 deletions(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 3d57da6a..0da35fcc 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -301,6 +301,65 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f3ef1335..f899e7f9 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -14,6 +14,7 @@ $(document).ready( function () { $("#asiatic_russia_state").hide(); $("#belarus_state").hide(); $("#mexico_state").hide(); + $("#eu_russia_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -21,6 +22,10 @@ $(document).ready( function () { $("#canada_state").show(); $("#us_state").hide(); $("#asiatic_russia_state").hide(); + $("#eu_russia_state").hide(); + $("#belarus_state").hide(); + $("#aland_state").hide(); + $("#mexico_state").hide(); } // Show Aland States if Aland is selected @@ -29,6 +34,9 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#asiatic_russia_state").hide(); + $("#eu_russia_state").hide(); + $("#belarus_state").hide(); + $("#mexico_state").hide(); } // Show Asiatic Russia States if Asiatic Russia is selected @@ -37,6 +45,9 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#belarus_state").hide(); + $("#mexico_state").hide(); } // Show Belarus States if Belarus is selected @@ -46,6 +57,8 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#mexico_state").hide(); } // Show Mexico States if Mexico is selected @@ -56,28 +69,53 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); + } + + // Show EU Russia States if EU Russia is selected + if(selectedDXCCID == '54'){ + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").show(); } $('#dxcc_select').change(function(){ if($(this).val() == '1'){ // or this.value == 'volvo' - console.log("CANADA!"); - $("#canada_state").show(); - $("#us_state").hide(); + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").show(); + $("#us_state").hide(); + $("#eu_russia_state").hide(); } else if($(this).val() == '5') { + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); $("#aland_state").show(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); } else if($(this).val() == '15') { + $("#mexico_state").hide(); + $("#belarus_state").hide(); $("#asiatic_russia_state").show(); $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); } else if($(this).val() == '27') { + $("#mexico_state").hide(); $("#belarus_state").show(); $("#asiatic_russia_state").hide(); $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); } else if($(this).val() == '50') { $("#mexico_state").show(); $("#belarus_state").hide(); @@ -85,6 +123,15 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + $("#eu_russia_state").hide(); + } else if($(this).val() == '54') { + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").show(); } else { $("#canada_state").hide(); $("#us_state").show(); From 43ecde4986557cea6d3130b8982e34f5a1318dee Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 14:16:29 +0100 Subject: [PATCH 06/13] [Station Locations] Added Argentina States --- application/views/station_profile/edit.php | 32 ++++++++++++++++++++ assets/js/sections/station_locations.js | 34 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 0da35fcc..55bc4928 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -360,6 +360,38 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f899e7f9..3d7a8c96 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -15,6 +15,7 @@ $(document).ready( function () { $("#belarus_state").hide(); $("#mexico_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -26,6 +27,7 @@ $(document).ready( function () { $("#belarus_state").hide(); $("#aland_state").hide(); $("#mexico_state").hide(); + $("#argentina_state").hide(); } // Show Aland States if Aland is selected @@ -37,6 +39,7 @@ $(document).ready( function () { $("#eu_russia_state").hide(); $("#belarus_state").hide(); $("#mexico_state").hide(); + $("#argentina_state").hide(); } // Show Asiatic Russia States if Asiatic Russia is selected @@ -48,6 +51,7 @@ $(document).ready( function () { $("#eu_russia_state").hide(); $("#belarus_state").hide(); $("#mexico_state").hide(); + $("#argentina_state").hide(); } // Show Belarus States if Belarus is selected @@ -59,6 +63,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#mexico_state").hide(); + $("#argentina_state").hide(); } // Show Mexico States if Mexico is selected @@ -70,6 +75,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } // Show EU Russia States if EU Russia is selected @@ -81,6 +87,19 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").show(); + $("#argentina_state").hide(); + } + + // Show Argentina States if Argentina is selected + if(selectedDXCCID == '100'){ + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#argentina_state").show(); } $('#dxcc_select').change(function(){ @@ -92,6 +111,7 @@ $(document).ready( function () { $("#canada_state").show(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } else if($(this).val() == '5') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -100,6 +120,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } else if($(this).val() == '15') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -108,6 +129,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } else if($(this).val() == '27') { $("#mexico_state").hide(); $("#belarus_state").show(); @@ -116,6 +138,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } else if($(this).val() == '50') { $("#mexico_state").show(); $("#belarus_state").hide(); @@ -124,6 +147,7 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").hide(); + $("#argentina_state").hide(); } else if($(this).val() == '54') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -132,6 +156,16 @@ $(document).ready( function () { $("#canada_state").hide(); $("#us_state").hide(); $("#eu_russia_state").show(); + $("#argentina_state").hide(); + } else if($(this).val() == '100') { + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#argentina_state").show(); } else { $("#canada_state").hide(); $("#us_state").show(); From de7a82cc3f8ff7a034d3109e00cd4e56ad4708ab Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 14:45:38 +0100 Subject: [PATCH 07/13] [Station Locations] Added Brazil States --- application/views/station_profile/edit.php | 35 ++++++++++++++++ assets/js/sections/station_locations.js | 47 +++++++++++++++++++++- 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 55bc4928..9fed765b 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -392,6 +392,41 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index 3d7a8c96..f7bf6f7c 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -16,6 +16,7 @@ $(document).ready( function () { $("#mexico_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -28,6 +29,7 @@ $(document).ready( function () { $("#aland_state").hide(); $("#mexico_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show Aland States if Aland is selected @@ -40,6 +42,7 @@ $(document).ready( function () { $("#belarus_state").hide(); $("#mexico_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show Asiatic Russia States if Asiatic Russia is selected @@ -52,6 +55,7 @@ $(document).ready( function () { $("#belarus_state").hide(); $("#mexico_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show Belarus States if Belarus is selected @@ -64,6 +68,7 @@ $(document).ready( function () { $("#eu_russia_state").hide(); $("#mexico_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show Mexico States if Mexico is selected @@ -76,6 +81,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show EU Russia States if EU Russia is selected @@ -88,6 +94,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").show(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } // Show Argentina States if Argentina is selected @@ -100,10 +107,24 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").show(); + $("#brazil_state").hide(); + } + + // Show Brazil States if Brazil is selected + if(selectedDXCCID == '108'){ + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#argentina_state").hide(); + $("#brazil_state").show(); } $('#dxcc_select').change(function(){ - if($(this).val() == '1'){ // or this.value == 'volvo' + if($(this).val() == '1'){ $("#mexico_state").hide(); $("#belarus_state").hide(); $("#asiatic_russia_state").hide(); @@ -112,6 +133,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '5') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -121,6 +143,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '15') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -130,6 +153,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '27') { $("#mexico_state").hide(); $("#belarus_state").show(); @@ -139,6 +163,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '50') { $("#mexico_state").show(); $("#belarus_state").hide(); @@ -148,6 +173,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '54') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -157,6 +183,7 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").show(); $("#argentina_state").hide(); + $("#brazil_state").hide(); } else if($(this).val() == '100') { $("#mexico_state").hide(); $("#belarus_state").hide(); @@ -166,9 +193,27 @@ $(document).ready( function () { $("#us_state").hide(); $("#eu_russia_state").hide(); $("#argentina_state").show(); + $("#brazil_state").hide(); + } else if($(this).val() == '108') { + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + $("#eu_russia_state").hide(); + $("#argentina_state").hide(); + $("#brazil_state").show(); } else { + $("#mexico_state").hide(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").show(); + $("#eu_russia_state").hide(); + $("#argentina_state").hide(); + $("#brazil_state").hide(); } }); } ); From cefabec8770745d4bd900dbc5966a6c2fdebb586 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 14:52:41 +0100 Subject: [PATCH 08/13] [Station Locations] Added Chile States plus cleaned up the js functions --- application/views/station_profile/edit.php | 23 +++ assets/js/sections/station_locations.js | 229 +++------------------ 2 files changed, 52 insertions(+), 200 deletions(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 9fed765b..838bd896 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -427,6 +427,29 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f7bf6f7c..dee71795 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -9,211 +9,40 @@ $(document).ready( function () { } }); - $("#canada_state").hide(); - $("#aland_state").hide(); - $("#asiatic_russia_state").hide(); - $("#belarus_state").hide(); - $("#mexico_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); + var stateMap = { + '1': 'canada_state', + '5': 'aland_state', + '15': 'asiatic_russia_state', + '27': 'belarus_state', + '50': 'mexico_state', + '54': 'eu_russia_state', + '100': 'argentina_state', + '108': 'brazil_state', + '112': 'chile_state' + }; + + // Hide all states initially + $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); + var stateToShow = stateMap[selectedDXCCID]; - if(selectedDXCCID == '1'){ - $("#canada_state").show(); - $("#us_state").hide(); - $("#asiatic_russia_state").hide(); - $("#eu_russia_state").hide(); - $("#belarus_state").hide(); - $("#aland_state").hide(); - $("#mexico_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show Aland States if Aland is selected - if(selectedDXCCID == '5'){ - $("#aland_state").show(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#asiatic_russia_state").hide(); - $("#eu_russia_state").hide(); - $("#belarus_state").hide(); - $("#mexico_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show Asiatic Russia States if Asiatic Russia is selected - if(selectedDXCCID == '15'){ - $("#asiatic_russia_state").show(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#belarus_state").hide(); - $("#mexico_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show Belarus States if Belarus is selected - if(selectedDXCCID == '27'){ - $("#belarus_state").show(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#mexico_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show Mexico States if Mexico is selected - if(selectedDXCCID == '50'){ - $("#mexico_state").show(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show EU Russia States if EU Russia is selected - if(selectedDXCCID == '54'){ - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").show(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } - - // Show Argentina States if Argentina is selected - if(selectedDXCCID == '100'){ - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").show(); - $("#brazil_state").hide(); - } - - // Show Brazil States if Brazil is selected - if(selectedDXCCID == '108'){ - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").show(); + if (stateToShow) { + // Show the selected state + $("#" + stateToShow).show(); + } else { + // If no state matches the selected value, show 'us_state' by default + $("#us_state").show(); } $('#dxcc_select').change(function(){ - if($(this).val() == '1'){ - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").show(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '5') { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").show(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '15') { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").show(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '27') { - $("#mexico_state").hide(); - $("#belarus_state").show(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '50') { - $("#mexico_state").show(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '54') { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").show(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } else if($(this).val() == '100') { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").show(); - $("#brazil_state").hide(); - } else if($(this).val() == '108') { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").hide(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").show(); - } else { - $("#mexico_state").hide(); - $("#belarus_state").hide(); - $("#asiatic_russia_state").hide(); - $("#aland_state").hide(); - $("#canada_state").hide(); - $("#us_state").show(); - $("#eu_russia_state").hide(); - $("#argentina_state").hide(); - $("#brazil_state").hide(); - } + var selectedValue = $(this).val(); + var stateToShow = stateMap[selectedValue] || stateMap['default']; + + // Hide all states + $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state").hide(); + + // Show the selected state + $("#" + stateToShow).show(); }); } ); From ae1f031048c988971689bcd05793f2f204066879 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 14:56:03 +0100 Subject: [PATCH 09/13] [Station Locations] Added Paraguay States --- application/views/station_profile/edit.php | 26 ++++++++++++++++++++++ assets/js/sections/station_locations.js | 7 +++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 838bd896..29b00586 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -450,6 +450,32 @@
+
+ + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index dee71795..391d49da 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -18,11 +18,12 @@ $(document).ready( function () { '54': 'eu_russia_state', '100': 'argentina_state', '108': 'brazil_state', - '112': 'chile_state' + '112': 'chile_state', + '132': 'paraguay_state' }; // Hide all states initially - $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state").hide(); + $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); var stateToShow = stateMap[selectedDXCCID]; @@ -40,7 +41,7 @@ $(document).ready( function () { var stateToShow = stateMap[selectedValue] || stateMap['default']; // Hide all states - $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state").hide(); + $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state").hide(); // Show the selected state $("#" + stateToShow).show(); From 1c021189842a7ebe89444f5169258133ac85010c Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 14:57:45 +0100 Subject: [PATCH 10/13] [Station Locations] Added Republic of Korea States --- application/views/station_profile/edit.php | 27 ++++++++++++++++++++++ assets/js/sections/station_locations.js | 7 +++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 29b00586..7e31cfb8 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -476,6 +476,33 @@
+
+ + + +
+ +
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index 391d49da..4430e12a 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -19,11 +19,12 @@ $(document).ready( function () { '100': 'argentina_state', '108': 'brazil_state', '112': 'chile_state', - '132': 'paraguay_state' + '132': 'paraguay_state', + '137': 'korea_state', }; // Hide all states initially - $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state").hide(); + $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state, #korea_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); var stateToShow = stateMap[selectedDXCCID]; @@ -41,7 +42,7 @@ $(document).ready( function () { var stateToShow = stateMap[selectedValue] || stateMap['default']; // Hide all states - $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state").hide(); + $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state, #korea_state").hide(); // Show the selected state $("#" + stateToShow).show(); From 2f98fcfc9cae9b45618d278999882cbc5f70ffd7 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 15:01:02 +0100 Subject: [PATCH 11/13] [Station Location] Added Uruguay States --- application/views/station_profile/edit.php | 28 ++++++++++++++++++++++ assets/js/sections/station_locations.js | 5 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 7e31cfb8..3687406c 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -502,6 +502,34 @@
+
+ + + +
+ + diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index 4430e12a..997e3e73 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -21,10 +21,11 @@ $(document).ready( function () { '112': 'chile_state', '132': 'paraguay_state', '137': 'korea_state', + '144': 'uruguay_state' }; // Hide all states initially - $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state, #korea_state").hide(); + $("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state, #korea_state, #uruguay_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); var stateToShow = stateMap[selectedDXCCID]; @@ -42,7 +43,7 @@ $(document).ready( function () { var stateToShow = stateMap[selectedValue] || stateMap['default']; // Hide all states - $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state, #korea_state").hide(); + $("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state, #korea_state, #uruguay_state").hide(); // Show the selected state $("#" + stateToShow).show(); From 1a3f4c90cbe5d3a28408887f1bbfcc9b5fd6e806 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 15:33:48 +0100 Subject: [PATCH 12/13] Demo code for flags --- application/controllers/Debug.php | 11 + application/libraries/DxccFlag.php | 352 +++++++++++++++++++++++++++++ 2 files changed, 363 insertions(+) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index 1d60cbd5..936f2e78 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -64,4 +64,15 @@ class Debug extends CI_Controller { return false; } + + public function flags() { + + // load library called DxccFlag + $this->load->library('DxccFlag'); + + // Call getISO function from DxccFlag library + $data['flags'] = $this->dxccflag->getISO('33'); + + print_r($data['flags']); + } } diff --git a/application/libraries/DxccFlag.php b/application/libraries/DxccFlag.php index b491482e..e8e06ae4 100644 --- a/application/libraries/DxccFlag.php +++ b/application/libraries/DxccFlag.php @@ -3,6 +3,349 @@ class DxccFlag { + // create an array + private $dxccCodetoISOArray = array( + 1 => 'CA', + 3 => 'AF', + 4 => 'MP', + 5 => 'AX', + 6 => 'US', + 7 => 'AL', + 9 => 'AS', + 10 => 'FR', + 11 => 'IN', + 12 => 'AI', + 13 => 'AQ', + 14 => 'AM', + 15 => 'RU', + 16 => 'NZ', + 17 => 'VE', + 18 => 'AZ', + 20 => 'US', + 21 => 'ES', + 22 => 'PW', + 24 => 'BV', + 27 => 'BY', + 29 => 'ES', + 31 => 'KI', + 32 => 'ES', + 33 => 'GB', + 34 => 'NZ', + 35 => 'CX', + 36 => 'FR', + 37 => 'CR', + 38 => 'CC', + 40 => 'GR', + 41 => 'FR', + 43 => 'PR', + 45 => 'GR', + 46 => 'MY', + 47 => 'CL', + 48 => 'KI', + 49 => 'GQ', + 50 => 'MX', + 51 => 'ER', + 52 => 'EE', + 53 => 'ET', + 54 => 'RU', + 56 => 'BR', + 60 => 'BS', + 61 => 'RU', + 62 => 'BB', + 63 => 'GF', + 64 => 'BM', + 65 => 'VG', + 66 => 'BZ', + 69 => 'KY', + 70 => 'CU', + 71 => 'EC', + 72 => 'DO', + 74 => 'SV', + 75 => 'GE', + 76 => 'GT', + 77 => 'GD', + 78 => 'HT', + 79 => 'GP', + 80 => 'HN', + 82 => 'JM', + 84 => 'MQ', + 85 => 'AN', + 86 => 'NI', + 88 => 'PA', + 89 => 'TC', + 90 => 'TT', + 91 => 'AW', + 94 => 'AG', + 95 => 'DM', + 96 => 'MS', + 97 => 'LC', + 98 => 'VC', + 99 => 'FR', + 100 => 'AR', + 103 => 'GU', + 104 => 'BO', + 105 => 'US', + 106 => 'GG', + 107 => 'GN', + 108 => 'BR', + 109 => 'GW', + 110 => 'US', + 111 => 'HM', + 112 => 'CL', + 114 => 'IM', + 116 => 'CO', + 117 => 'CH', + 118 => 'SJ', + 120 => 'EC', + 122 => 'JE', + 123 => 'US', + 124 => 'FR', + 125 => 'CL', + 126 => 'RU', + 129 => 'GY', + 130 => 'KZ', + 131 => 'FR', + 132 => 'PY', + 133 => 'NZ', + 134 => 'US', + 135 => 'KG', + 136 => 'PE', + 137 => 'KR', + 138 => 'US', + 140 => 'SR', + 141 => 'FK', + 142 => 'IN', + 143 => 'LA', + 144 => 'UY', + 145 => 'LV', + 146 => 'LT', + 147 => 'AU', + 148 => 'VE', + 149 => 'PT', + 150 => 'AU', + 151 => 'RU', + 152 => 'MO', + 153 => 'AU', + 157 => 'NR', + 158 => 'VU', + 159 => 'MV', + 160 => 'TO', + 161 => 'CO', + 162 => 'NC', + 163 => 'PG', + 165 => 'MU', + 166 => 'US', + 167 => 'SE', + 168 => 'MH', + 169 => 'YT', + 170 => 'NZ', + 171 => 'AU', + 172 => 'PN', + 173 => 'FM', + 174 => 'US', + 175 => 'PF', + 176 => 'FJ', + 177 => 'JP', + 179 => 'MD', + 180 => 'GR', + 181 => 'MZ', + 182 => 'US', + 185 => 'SB', + 187 => 'NE', + 188 => 'NU', + 189 => 'NF', + 190 => 'WS', + 191 => 'NZ', + 192 => 'JP', + 195 => 'GQ', + 197 => 'US', + 199 => 'NO', + 201 => 'ZA', + 202 => 'PR', + 203 => 'AD', + 204 => 'MX', + 205 => 'UK', + 206 => 'AT', + 207 => 'MU', + 209 => 'BE', + 211 => 'CA', + 212 => 'BG', + 213 => 'FR', + 214 => 'FR', + 215 => 'CY', + 216 => 'NI', + 217 => 'CL', + 219 => 'ST', + 221 => 'DK', + 222 => 'FO', + 223 => 'GB', + 224 => 'FI', + 225 => 'IT', + 227 => 'FR', + 230 => 'DE', + 232 => 'SO', + 233 => 'GI', + 234 => 'GS', + 235 => 'GS', + 236 => 'GR', + 237 => 'GL', + 238 => 'GB', + 239 => 'HU', + 240 => 'GS', + 241 => 'GB', + 242 => 'IS', + 245 => 'IE', + 246 => 'MT', + 247 => 'PH', + 248 => 'IT', + 249 => 'KN', + 250 => 'SH', + 251 => 'LI', + 252 => 'CA', + 253 => 'BR', + 254 => 'LU', + 256 => 'PT', + 257 => 'MT', + 259 => 'SJ', + 260 => 'MC', + 262 => 'TJ', + 263 => 'NL', + 265 => 'GB', + 266 => 'NO', + 269 => 'PL', + 270 => 'TK', + 272 => 'PT', + 273 => 'BR', + 274 => 'GB', + 275 => 'RO', + 276 => 'FR', + 277 => 'CA', + 278 => 'SM', + 279 => 'GB', + 280 => 'TM', + 281 => 'ES', + 282 => 'TV', + 283 => 'CY', + 284 => 'SE', + 285 => 'VI', + 286 => 'UG', + 287 => 'CH', + 288 => 'UA', + 289 => 'UN', + 291 => 'US', + 292 => 'UZ', + 293 => 'VN', + 294 => 'GB', + 295 => 'VA', + 296 => 'RS', + 297 => 'US', + 298 => 'WF', + 299 => 'MY', + 301 => 'KI', + 302 => 'EH', + 303 => 'AU', + 304 => 'BH', + 305 => 'BD', + 306 => 'BT', + 308 => 'CR', + 309 => 'MM', + 312 => 'KH', + 315 => 'LK', + 318 => 'CN', + 321 => 'HK', + 324 => 'IN', + 327 => 'ID', + 330 => 'IR', + 333 => 'IQ', + 336 => 'IL', + 339 => 'JP', + 342 => 'JO', + 344 => 'KP', + 345 => 'BN', + 348 => 'KW', + 354 => 'LB', + 363 => 'MN', + 369 => 'NP', + 370 => 'OM', + 372 => 'PK', + 375 => 'PH', + 376 => 'QA', + 378 => 'SA', + 379 => 'SC', + 381 => 'SG', + 382 => 'DJ', + 384 => 'SY', + 386 => 'TW', + 387 => 'TH', + 390 => 'TR', + 391 => 'AE', + 400 => 'DZ', + 401 => 'AO', + 402 => 'BW', + 404 => 'BI', + 406 => 'CM', + 408 => 'CF', + 409 => 'CV', + 410 => 'TD', + 411 => 'KM', + 412 => 'CG', + 414 => 'CD', + 416 => 'BJ', + 420 => 'GA', + 422 => 'GM', + 424 => 'GH', + 428 => 'CI', + 430 => 'KE', + 432 => 'LS', + 434 => 'LR', + 436 => 'LY', + 438 => 'MG', + 440 => 'MW', + 442 => 'ML', + 444 => 'MR', + 446 => 'MA', + 450 => 'NG', + 452 => 'ZW', + 453 => 'RE', + 454 => 'RW', + 456 => 'SN', + 458 => 'SL', + 460 => 'FJ', + 462 => 'ZA', + 464 => 'NA', + 466 => 'SD', + 468 => 'SZ', + 470 => 'TZ', + 474 => 'TN', + 478 => 'EG', + 480 => 'BF', + 482 => 'ZM', + 483 => 'TG', + 489 => 'FJ', + 490 => 'KI', + 492 => 'YE', + 497 => 'HR', + 499 => 'SI', + 501 => 'BA', + 502 => 'MK', + 503 => 'CZ', + 504 => 'SK', + 505 => 'TW', + 507 => 'SB', + 508 => 'PF', + 509 => 'FR', + 510 => 'PS', + 511 => 'TL', + 512 => 'GB', + 513 => 'PN', + 514 => 'ME', + 515 => 'US', + 517 => 'AN', + 519 => 'AN', + 521 => 'SS', + 1378 => 'SA' + ); + private $dxccFlags = array( '0' => "", // DXCC NONE '1' => "\u{1F1E8}\u{1F1E6}", // CANADA @@ -417,4 +760,13 @@ class DxccFlag return $this->dxccFlags[$dxcc]; } } + + public function getISO($dxccCode) { + // Check if DXCC Code is in dxccCodetoISOArray + if (!isset($this->dxccCodetoISOArray[$dxccCode])) { + return null; + } else { + return $this->dxccCodetoISOArray[$dxccCode]; + } + } } From 3ad075d3d653c5e54c0e6f52cccd3ff840b96ee1 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 22:03:59 +0100 Subject: [PATCH 13/13] [Dashboard] QSO Today Notice now updates every 30 seconds This addresses #3116 --- application/controllers/Dashboard.php | 17 +++++++++++++++++ .../views/components/dashboard_todays_qsos.php | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 application/views/components/dashboard_todays_qsos.php diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index b9182213..f20a2874 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -188,6 +188,23 @@ class Dashboard extends CI_Controller } } + public function todays_qso_component() { + $this->load->model('user_model'); + + if ($this->user_model->validate_session() == 0) { + // User is not logged in + } else { + $this->load->model('logbook_model'); + $this->load->model('logbooks_model'); + } + + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $data['todays_qsos'] = $this->logbook_model->todays_qsos($logbooks_locations_array); + $this->load->view('components/dashboard_todays_qsos', $data); + + } + public function logbook_display_component() { $this->load->model('user_model'); diff --git a/application/views/components/dashboard_todays_qsos.php b/application/views/components/dashboard_todays_qsos.php new file mode 100644 index 00000000..2dfac0db --- /dev/null +++ b/application/views/components/dashboard_todays_qsos.php @@ -0,0 +1,11 @@ +
+ = 1) { ?> + + + + +
\ No newline at end of file