diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ce6565e59..33e00bd15 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -1413,8 +1413,8 @@ class Awards extends CI_Controller { $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; - $postdata['sat'] = $this->security->xss_clean($this->input->post('sat')); - $postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit')); + $postdata['sat'] = $this->security->xss_clean($this->input->post('sat')); + $postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit')); $dxcclist = $this->dxcc->fetchdxcc($postdata); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index e1b16f848..ad0626076 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -396,7 +396,7 @@ class Logbook_model extends CI_Model { $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC', 'left outer'); $this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer'); - if ($band == 'SAT' && ($type == 'VUCC' || $type == 'DXCC')) { + if ($band == 'SAT' && ($type == 'VUCC' || $type == 'DXCC' || $type == 'DXCC2')) { $this->db->join('satellite', 'satellite.name = '.$this->config->item('table_name').'.col_sat_name', 'left outer'); } switch ($type) { @@ -413,6 +413,14 @@ class Logbook_model extends CI_Model { break; case 'DXCC2': $this->db->where('COL_DXCC', $searchphrase); + if ($band == 'SAT' && $type == 'DXCC2') { + if ($sat != 'All' && $sat != null) { + $this->db->where("COL_SAT_NAME = '$sat'"); + } + if ($orbit != 'All' && $orbit != null) { + $this->db->where("satellite.orbit = '$orbit'"); + } + } break; case 'IOTA': $this->db->where('COL_IOTA', $searchphrase); diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 0b5c1103c..67f3a469a 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2292,13 +2292,15 @@ function viewEqsl(picture, callsign) { }); } - function displayContactsOnMap(target, searchphrase, band, mode, type, qsl) { + function displayContactsOnMap(target, searchphrase, band, sat, orbit, mode, type, qsl) { $.ajax({ url: base_url + 'index.php/awards/qso_details_ajax', type: 'post', data: { 'Searchphrase': searchphrase, 'Band': band, + 'Sat': sat, + 'Orbit': orbit, 'Mode': mode, 'Type': type, 'QSL' : qsl diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index ed068d0cd..4bdcad346 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -2,7 +2,6 @@ var osmUrl = $('#dxccmapjs').attr("tileUrl"); $('#band2').change(function(){ var band = $("#band2 option:selected").text(); - console.log("TEST: "+band) if (band != "SAT") { $("#sats").val('All'); $("#orbits").val('All'); @@ -37,7 +36,7 @@ function load_dxcc_map() { SouthAmerica: +$('#SouthAmerica').prop('checked'), Oceania: +$('#Oceania').prop('checked'), Antarctica: +$('#Antarctica').prop('checked'), - sat: $("#sats").val(), + sat: $("#sats").val(), orbit: $("#orbits").val(), }, success: function(data) { @@ -173,5 +172,5 @@ function addMarker(L, D, mapColor, map) { function onClick(e) { var marker = e.target; - displayContactsOnMap($("#dxccmap"),marker.options.adif, $('#band2').val(), $('#mode').val(), 'DXCC2'); + displayContactsOnMap($("#dxccmap"),marker.options.adif, $('#band2').val(), $('#sats').val(), $('#orbits').val(), $('#mode').val(), 'DXCC2'); }