From 30f3df15ce25e832a47a55bf1266888fb19593c8 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Fri, 11 Nov 2022 19:23:41 +0100 Subject: [PATCH 1/5] [DXCC] Added map --- application/controllers/Awards.php | 61 +++++++++ application/models/Dxcc.php | 62 +++------ application/views/awards/dxcc/index.php | 62 ++++++++- application/views/interface_assets/footer.php | 4 + assets/js/sections/dxccmap.js | 119 ++++++++++++++++++ 5 files changed, 263 insertions(+), 45 deletions(-) create mode 100644 assets/js/sections/dxccmap.js diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 53c9dcc0..a418d9af 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -602,4 +602,65 @@ class Awards extends CI_Controller { header('Content-Type: application/json'); echo json_encode($zones); } + + /* + function dxcc_map + This displays the DXCC map + */ + public function dxcc_map() { + $this->load->model('dxcc'); + $this->load->model('bands'); + + $bands[] = $this->input->post('band'); + + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['band'] = $this->input->post('band'); + $postdata['mode'] = $this->input->post('mode'); + $postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1; + $postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1; + $postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1; + $postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL: 1; + $postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL: 1; + $postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL: 1; + $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1; + $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1; + + $dxcclist = $this->dxcc->fetchdxcc($postdata); + + $dxcc_array = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); + + $i = 0; + + foreach ($dxcclist as $dxcc) { + $newdxcc[$i]['adif'] = $dxcc->adif; + $newdxcc[$i]['prefix'] = $dxcc->prefix; + $newdxcc[$i]['name'] = $dxcc->name; + $newdxcc[$i]['lat'] = $dxcc->lat; + $newdxcc[$i]['long'] = $dxcc->long; + $newdxcc[$i++]['status'] = $this->returnStatus($dxcc_array[$dxcc->adif]); + } + + header('Content-Type: application/json'); + echo json_encode($newdxcc); + } + + function returnStatus($string) { + foreach ($string as $key) { + if($key != "") { + if (strpos($key, '>W<') !== false) { + return 'W'; + } + if (strpos($key, '>C<') !== false) { + return 'C'; + } + if ($key == '-') { + return '-'; + } + } + } + } } \ No newline at end of file diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 2d4c8f8f..4548cc94 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -82,7 +82,6 @@ class DXCC extends CI_Model { if ($postdata['worked'] != NULL) { $workedDXCC = $this->getDxccBandWorked($location_list, $band, $postdata); foreach ($workedDXCC as $wdxcc) { - //function displayContacts(searchphrase, band, mode, type) { $dxccMatrix[$wdxcc->dxcc][$band] = '
name).'","'. $band . '","'. $postdata['mode'] . '","DXCC")\'>W
'; } } @@ -131,13 +130,7 @@ class DXCC extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } - else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } + $sql .= $this->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; @@ -166,13 +159,7 @@ class DXCC extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } - else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } + $sql .= $this->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; @@ -192,6 +179,19 @@ class DXCC extends CI_Model { return $query->result(); } + function addBandToQuery($band) { + $sql = ''; + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + return $sql; + } + function fetchDxcc($postdata) { $CI =& get_instance(); $CI->load->model('logbooks_model'); @@ -203,7 +203,7 @@ class DXCC extends CI_Model { $location_list = "'".implode("','",$logbooks_locations_array)."'"; - $sql = "select adif, prefix, name, date(end) Enddate, date(start) Startdate + $sql = "select adif, prefix, name, date(end) Enddate, date(start) Startdate, lat, `long` from dxcc_entities"; if ($postdata['notworked'] == NULL) { @@ -248,15 +248,7 @@ class DXCC extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - if ($postdata['band'] != 'All') { - if ($postdata['band'] == 'SAT') { - $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $postdata['band'] . "'"; - } - } + $sql .= $this->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; @@ -264,15 +256,7 @@ class DXCC extends CI_Model { $sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id in (". $location_list .") and col_dxcc = thcv.col_dxcc and col_dxcc > 0"; - if ($postdata['band'] != 'All') { - if ($postdata['band'] == 'SAT') { - $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $postdata['band'] . "'"; - } - } + $sql .= $this->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; @@ -305,15 +289,7 @@ class DXCC extends CI_Model { where station_id in (". $location_list . ") and col_dxcc > 0"; - if ($postdata['band'] != 'All') { - if ($postdata['band'] == 'SAT') { - $sql .= " and col_prop_mode ='" . $postdata['band'] . "'"; - } - else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $postdata['band'] . "'"; - } - } + $sql .= $this->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index 7c25d56d..e1dd3c47 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -1,4 +1,36 @@ +

@@ -121,13 +153,37 @@
- - + + + +
+ + +
+ +
+
+
+ +
+ +
+ +
+ ×Nothing found!
'; } ?> +
+
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 5eb8d9a3..92edbd56 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -44,6 +44,10 @@ function load_was_map() { +uri->segment(1) == "awards" && ($this->uri->segment(2) == "dxcc") ) { ?> + + + uri->segment(1) == "statistics") { ?> diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js new file mode 100644 index 00000000..2c0d1aa2 --- /dev/null +++ b/assets/js/sections/dxccmap.js @@ -0,0 +1,119 @@ +var osmUrl = $('#dxccmapjs').attr("tileUrl"); + +function load_dxcc_map() { + $('.nav-tabs a[href="#dxccmaptab"]').tab('show'); + $.ajax({ + url: base_url + 'index.php/awards/dxcc_map', + type: 'post', + data: { + band: $('#band2').val(), + mode: $('#mode').val(), + worked: +$('#worked').prop('checked'), + confirmed: +$('#confirmed').prop('checked'), + notworked: +$('#notworked').prop('checked'), + qsl: +$('#qsl').prop('checked'), + lotw: +$('#lotw').prop('checked'), + includedeleted: +$('#includedeleted').prop('checked'), + Africa: +$('#Africa').prop('checked'), + Asia: +$('#Asia').prop('checked'), + Europe: +$('#Europe').prop('checked'), + NorthAmerica: +$('#NorthAmerica').prop('checked'), + SouthAmerica: +$('#SouthAmerica').prop('checked'), + Oceania: +$('#Oceania').prop('checked'), + Antarctica: +$('#Antarctica').prop('checked'), + }, + success: function(data) { + load_dxcc_map2(data); + }, + error: function() { + + }, + }); +} + +function load_dxcc_map2(data) { + + // If map is already initialized + var container = L.DomUtil.get('dxccmap'); + + if(container != null){ + container._leaflet_id = null; + container.remove(); + $("#dxccmaptab").append('
'); + } + + var map = L.map('dxccmap'); + L.tileLayer( + osmUrl, + { + attribution: '© OpenStreetMap contributors, CC-BY-SA', + maxZoom: 18 + } + ).addTo(map); + + var notworked = data.length; + var confirmed = 0; + var workednotconfirmed = 0; + + for (var i = 0; i < data.length; i++) { + var D = data[i]; + var mapColor = 'red'; + + if (D['status'] == 'C') { + mapColor = 'green'; + confirmed++; + notworked--; + } + if (D['status'] == 'W') { + mapColor = 'orange'; + workednotconfirmed++; + notworked--; + } + + const markerHtmlStyles = ` + background-color: ${mapColor}; + width: 1rem; + height: 1rem; + display: block; + position: relative; + border-radius: 3rem 3rem 0; + transform: rotate(45deg); + border: 1px solid #FFFFFF` + + const icon = L.divIcon({ + className: "my-custom-pin", + iconAnchor: [0, 24], + labelAnchor: [-6, 0], + popupAnchor: [0, -36], + html: `` + }) + + L.marker( + [D['lat'], D['long']], { + icon: icon, + title: D['adif'] + } + ).addTo(map).on('click', onClick); + } + + /*Legend specific*/ + var legend = L.control({ position: "topright" }); + + legend.onAdd = function(map) { + var div = L.DomUtil.create("div", "legend"); + div.innerHTML += "

Colors

"; + div.innerHTML += 'Confirmed ('+confirmed+')
'; + div.innerHTML += 'Worked not confirmed ('+workednotconfirmed+')
'; + div.innerHTML += 'Not worked ('+notworked+')
'; + return div; + }; + + legend.addTo(map); + + map.setView([20, 0], 2); +} + +function onClick(e) { + var marker = e.target; + displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'DXCC2'); +} From 1b563b7eb0de52d33b47e3f50f128a251a8e4cfe Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 12 Nov 2022 10:50:46 +0100 Subject: [PATCH 2/5] [DXCC Map] Fixed popup and added datatable to QSO table --- application/controllers/Awards.php | 5 ++++- application/views/interface_assets/footer.php | 13 +++++++++++++ application/views/view_log/partial/log_ajax.php | 7 +++++-- assets/js/sections/dxccmap.js | 5 +++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index a418d9af..eccea206 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -638,7 +638,10 @@ class Awards extends CI_Controller { foreach ($dxcclist as $dxcc) { $newdxcc[$i]['adif'] = $dxcc->adif; $newdxcc[$i]['prefix'] = $dxcc->prefix; - $newdxcc[$i]['name'] = $dxcc->name; + $newdxcc[$i]['name'] = ucwords(strtolower($dxcc->name), "- (/"); + if ($dxcc->Enddate!=null) { + $newdxcc[$i]['name'] .= ' (deleted)'; + } $newdxcc[$i]['lat'] = $dxcc->lat; $newdxcc[$i]['long'] = $dxcc->long; $newdxcc[$i++]['status'] = $this->returnStatus($dxcc_array[$dxcc->adif]); diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 92edbd56..10fece96 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2545,6 +2545,19 @@ function deleteQsl(id) { message: html, onshown: function(dialog) { $('[data-toggle="tooltip"]').tooltip(); + $('.contacttable').DataTable({ + "pageLength": 25, + responsive: false, + ordering: false, + "scrollY": "550px", + "scrollCollapse": true, + "paging": false, + "scrollX": true, + dom: 'Bfrtip', + buttons: [ + 'csv' + ] + }); }, buttons: [{ label: 'Close', diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index ae0959f8..9edcae54 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -44,7 +44,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
- +
+ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> @@ -72,6 +73,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { + + result() as $row) { @@ -246,7 +249,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { - +
lang->line('general_word_date'); ?>
diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index 2c0d1aa2..3620b134 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -91,7 +91,8 @@ function load_dxcc_map2(data) { L.marker( [D['lat'], D['long']], { icon: icon, - title: D['adif'] + adif: D['adif'], + title: D['prefix'] + ' - ' + D['name'], } ).addTo(map).on('click', onClick); } @@ -115,5 +116,5 @@ function load_dxcc_map2(data) { function onClick(e) { var marker = e.target; - displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'DXCC2'); + displayContacts(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); } From 06028992aa77237fb83b626be3cd5d7968e3f37e Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:51:31 +0100 Subject: [PATCH 3/5] [DXCC Mao] Fixed so that worked/confirmed/not worked works with map --- application/controllers/Awards.php | 2 +- assets/js/sections/dxccmap.js | 114 +++++++++++++++++------------ 2 files changed, 69 insertions(+), 47 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index eccea206..8f24a371 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -644,7 +644,7 @@ class Awards extends CI_Controller { } $newdxcc[$i]['lat'] = $dxcc->lat; $newdxcc[$i]['long'] = $dxcc->long; - $newdxcc[$i++]['status'] = $this->returnStatus($dxcc_array[$dxcc->adif]); + $newdxcc[$i++]['status'] = isset($dxcc_array[$dxcc->adif]) ? $this->returnStatus($dxcc_array[$dxcc->adif]) : 'x'; } header('Content-Type: application/json'); diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index 3620b134..2d5aa88a 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -23,7 +23,7 @@ function load_dxcc_map() { Antarctica: +$('#Antarctica').prop('checked'), }, success: function(data) { - load_dxcc_map2(data); + load_dxcc_map2(data, worked, confirmed, notworked); }, error: function() { @@ -31,7 +31,7 @@ function load_dxcc_map() { }); } -function load_dxcc_map2(data) { +function load_dxcc_map2(data, worked, confirmed, notworked) { // If map is already initialized var container = L.DomUtil.get('dxccmap'); @@ -51,61 +51,55 @@ function load_dxcc_map2(data) { } ).addTo(map); - var notworked = data.length; - var confirmed = 0; - var workednotconfirmed = 0; + var notworkedcount = data.length; + var confirmedcount = 0; + var workednotconfirmedcount = 0; for (var i = 0; i < data.length; i++) { - var D = data[i]; - var mapColor = 'red'; - - if (D['status'] == 'C') { - mapColor = 'green'; - confirmed++; - notworked--; - } - if (D['status'] == 'W') { - mapColor = 'orange'; - workednotconfirmed++; - notworked--; - } - - const markerHtmlStyles = ` - background-color: ${mapColor}; - width: 1rem; - height: 1rem; - display: block; - position: relative; - border-radius: 3rem 3rem 0; - transform: rotate(45deg); - border: 1px solid #FFFFFF` - - const icon = L.divIcon({ - className: "my-custom-pin", - iconAnchor: [0, 24], - labelAnchor: [-6, 0], - popupAnchor: [0, -36], - html: `` - }) - - L.marker( - [D['lat'], D['long']], { - icon: icon, - adif: D['adif'], - title: D['prefix'] + ' - ' + D['name'], + var D = data[i]; + if (D['status'] != 'x') { + var mapColor = 'red'; + + if (D['status'] == 'C') { + mapColor = 'green'; + if (confirmed != '0') { + addMarker(L, D, mapColor, map); + confirmedcount++; + notworkedcount--; + } } - ).addTo(map).on('click', onClick); + if (D['status'] == 'W') { + mapColor = 'orange'; + if (worked != '0') { + addMarker(L, D, mapColor, map); + workednotconfirmedcount++; + notworkedcount--; + } + } + + + // Make a check here and hide what I don't want to show + if (notworked != '0') { + if (mapColor == 'red') { + addMarker(L, D, mapColor, map); + } + } + } } /*Legend specific*/ var legend = L.control({ position: "topright" }); + if (notworked.checked == false) { + notworkedcount = 0; + } + legend.onAdd = function(map) { var div = L.DomUtil.create("div", "legend"); div.innerHTML += "

Colors

"; - div.innerHTML += 'Confirmed ('+confirmed+')
'; - div.innerHTML += 'Worked not confirmed ('+workednotconfirmed+')
'; - div.innerHTML += 'Not worked ('+notworked+')
'; + div.innerHTML += 'Confirmed ('+confirmedcount+')
'; + div.innerHTML += 'Worked not confirmed ('+workednotconfirmedcount+')
'; + div.innerHTML += 'Not worked ('+notworkedcount+')
'; return div; }; @@ -114,6 +108,34 @@ function load_dxcc_map2(data) { map.setView([20, 0], 2); } +function addMarker(L, D, mapColor, map) { + const markerHtmlStyles = ` + background-color: ${mapColor}; + width: 1rem; + height: 1rem; + display: block; + position: relative; + border-radius: 3rem 3rem 0; + transform: rotate(45deg); + border: 1px solid #FFFFFF` + + const icon = L.divIcon({ + className: "my-custom-pin", + iconAnchor: [0, 24], + labelAnchor: [-6, 0], + popupAnchor: [0, -36], + html: `` + }) + + L.marker( + [D['lat'], D['long']], { + icon: icon, + adif: D['adif'], + title: D['prefix'] + ' - ' + D['name'], + } + ).addTo(map).on('click', onClick); +} + function onClick(e) { var marker = e.target; displayContacts(marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); From debe3b3baa085234b9d0477a7c8ad98c5a018a30 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:22:31 +0100 Subject: [PATCH 4/5] [DXCC Map] Fixed header in table when datatable was not applied --- .../views/view_log/partial/log_ajax.php | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index 9edcae54..d7e19b85 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -1,17 +1,17 @@ '.$ctx->lang->line('gen_hamradio_mode').''; break; - case 'RSTS': echo ''.$ctx->lang->line('gen_hamradio_rsts').''; break; - case 'RSTR': echo ''.$ctx->lang->line('gen_hamradio_rstr').''; break; - case 'Country': echo ''.$ctx->lang->line('general_word_country').''; break; - case 'IOTA': echo ''.$ctx->lang->line('gen_hamradio_iota').''; break; - case 'SOTA': echo ''.$ctx->lang->line('gen_hamradio_sota').''; break; - case 'WWFF': echo ''.$ctx->lang->line('gen_hamradio_wwff').''; break; - case 'State': echo ''.$ctx->lang->line('gen_hamradio_state').''; break; - case 'Grid': echo ''.$ctx->lang->line('gen_hamradio_gridsquare').''; break; - case 'Band': echo ''.$ctx->lang->line('gen_hamradio_band').''; break; - case 'Operator': echo ''.$ctx->lang->line('gen_hamradio_operator').''; break; + case 'Mode': echo ''.$ctx->lang->line('gen_hamradio_mode').''; break; + case 'RSTS': echo ''.$ctx->lang->line('gen_hamradio_rsts').''; break; + case 'RSTR': echo ''.$ctx->lang->line('gen_hamradio_rstr').''; break; + case 'Country': echo ''.$ctx->lang->line('general_word_country').''; break; + case 'IOTA': echo ''.$ctx->lang->line('gen_hamradio_iota').''; break; + case 'SOTA': echo ''.$ctx->lang->line('gen_hamradio_sota').''; break; + case 'WWFF': echo ''.$ctx->lang->line('gen_hamradio_wwff').''; break; + case 'State': echo ''.$ctx->lang->line('gen_hamradio_state').''; break; + case 'Grid': echo ''.$ctx->lang->line('gen_hamradio_gridsquare').''; break; + case 'Band': echo ''.$ctx->lang->line('gen_hamradio_band').''; break; + case 'Operator': echo ''.$ctx->lang->line('gen_hamradio_operator').''; break; } } @@ -46,35 +46,35 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
- - - config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> - - - - session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); - echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); - echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); - echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); - echo_table_header_col($this, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); + + + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> + + + + session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); + echo_table_header_col($this, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); - if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> - - session->userdata('user_eqsl_name') != "") { ?> - + if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> + + session->userdata('user_eqsl_name') != "") { ?> + + + session->userdata('user_lotw_name') != "") { ?> + + - session->userdata('user_lotw_name') != "") { ?> - + + config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> + - - - config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> - - - - - + + + result() as $row) { From a66c9a070f55cd18c372c3a20c221bc68626aa0b Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:37:33 +0100 Subject: [PATCH 5/5] [DXCC Map] Added prefix as icon --- assets/js/sections/dxccmap.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index 2d5aa88a..e117ffec 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -109,6 +109,9 @@ function load_dxcc_map2(data, worked, confirmed, notworked) { } function addMarker(L, D, mapColor, map) { + var title = '' + D['prefix'] + ''; + var myIcon = L.divIcon({className: 'my-div-icon', html: title}); + const markerHtmlStyles = ` background-color: ${mapColor}; width: 1rem; @@ -129,11 +132,19 @@ function addMarker(L, D, mapColor, map) { L.marker( [D['lat'], D['long']], { - icon: icon, + icon: myIcon, adif: D['adif'], title: D['prefix'] + ' - ' + D['name'], } ).addTo(map).on('click', onClick); + + L.marker( + [D['lat'], D['long']], { + icon: icon, + adif: D['adif'], + title: D['prefix'] + ' - ' + D['name'], + } + ).addTo(map).on('click', onClick); } function onClick(e) {
lang->line('general_word_date'); ?>lang->line('general_word_time'); ?>lang->line('gen_hamradio_call'); ?>
lang->line('general_word_date'); ?>lang->line('general_word_time'); ?>lang->line('gen_hamradio_call'); ?>QSLeQSLQSLeQSLLoTW LoTWlang->line('gen_hamradio_station'); ?> lang->line('gen_hamradio_station'); ?>