Appliy sat and orbit filter to DXCC map

This commit is contained in:
phl0
2024-04-13 17:42:51 +02:00
parent 60952337af
commit daa2e6ad9f
4 changed files with 16 additions and 7 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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');
}