diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index fdf8a3326..ce7b0007b 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -174,6 +174,7 @@ class Awards extends CI_Controller { // Render Page $data['page_title'] = sprintf(__("Awards - %s"), __("DXCC")); + $data['posted_band']=$postdata['band']; $this->load->view('interface_assets/header', $data); $this->load->view('awards/dxcc/index'); $this->load->view('interface_assets/footer'); @@ -857,6 +858,7 @@ class Awards extends CI_Controller { $iotalist = $this->iota->fetchIota($postdata, $location_list); $data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata, $location_list); $data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata, $location_list); + $data['posted_band']=$postdata['band']; // Render Page $data['page_title'] = sprintf(__("Awards - %s"), __("IOTA (Island On The Air)")); diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 3c6585e41..c415d5ec6 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -70,6 +70,9 @@ class DXCC extends CI_Model { $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display + if (($postdata['band'] != 'SAT') && ($band == 'SAT')) { + continue; + } foreach ($dxccArray as $dxcc) { if ($dxcc->adif == '0') { $dxccMatrix[$dxcc->adif]['name'] = $dxcc->name; @@ -137,10 +140,13 @@ class DXCC extends CI_Model { $sql .= $this->genfunctions->addBandToQuery($band,$bindings); if ($band == 'SAT') { + $sql .= " and col_prop_mode='SAT'"; if ($postdata['sat'] != 'All') { $sql .= " and col_sat_name = ?"; $bindings[]=$postdata['sat']; } + } else { + $sql.=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; } if ($postdata['mode'] != 'All') { @@ -177,11 +183,15 @@ class DXCC extends CI_Model { ") and col_dxcc > 0"; $sql .= $this->genfunctions->addBandToQuery($band,$bindings); if ($band == 'SAT') { + $sql .= " and col_prop_mode ='SAT'"; if ($postdata['sat'] != 'All') { $sql .= " and col_sat_name = ?"; $bindings[]=$postdata['sat']; } + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } + if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = ? or col_submode = ?)"; $bindings[]=$postdata['mode']; @@ -232,6 +242,8 @@ class DXCC extends CI_Model { $sql .= " and col_band = ?"; $bindings[]=$postdata['band']; } + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } if ($postdata['mode'] != 'All') { @@ -270,13 +282,16 @@ class DXCC extends CI_Model { ") and col_dxcc > 0"; $sql .= $this->genfunctions->addBandToQuery($postdata['band'],$bindings); if ($postdata['band'] == 'SAT') { + $sql .= " and col_prop_mode = 'SAT'"; if ($postdata['sat'] != 'All') { $sql .= " and col_sat_name = ?"; $bindings[]=$postdata['sat']; } + $sql .= $this->addOrbitToQuery($postdata,$bindings); + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } - $sql .= $this->addOrbitToQuery($postdata,$bindings); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = ? or col_submode = ?)"; @@ -287,12 +302,16 @@ 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"; $sql .= $this->genfunctions->addBandToQuery($postdata['band'],$bindings); if ($postdata['band'] == 'SAT') { + $sql .= " and col_prop_mode = 'SAT'"; if ($postdata['sat'] != 'All') { $sql .= " and col_sat_name = ?"; $bindings[]=$postdata['sat']; } + $sql .= $this->addOrbitToQuery($postdata,$bindings); + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } - $sql .= $this->addOrbitToQuery($postdata,$bindings); + if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = ? or col_submode = ?)"; @@ -311,7 +330,6 @@ class DXCC extends CI_Model { } $sql .= $this->addContinentsToQuery($postdata); - $query = $this->db->query($sql,$bindings); return $query->result(); } @@ -328,10 +346,13 @@ class DXCC extends CI_Model { $sql .= $this->genfunctions->addBandToQuery($postdata['band'],$bindings); if ($postdata['band'] == 'SAT') { + $sql .= " and col_prop_mode = 'SAT'"; if ($postdata['sat'] != 'All') { $sql .= " and col_sat_name = ?"; $bindings[]=$postdata['sat']; } + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } if ($postdata['mode'] != 'All') { diff --git a/application/models/Iota.php b/application/models/Iota.php index c62b06adc..899b05eb2 100644 --- a/application/models/Iota.php +++ b/application/models/Iota.php @@ -7,6 +7,9 @@ class IOTA extends CI_Model { function get_iota_array($iotaArray, $bands, $postdata, $location_list) { foreach ($bands as $band) { // Looping through bands and iota to generate the array needed for display + if (($postdata['band'] != 'SAT') && ($band == 'SAT')) { + continue; + } foreach ($iotaArray as $iota) { $iotaMatrix[$iota->tag]['prefix'] = $iota->prefix; $iotaMatrix[$iota->tag]['name'] = $iota->name; @@ -71,6 +74,11 @@ class IOTA extends CI_Model { $binding[] = $postdata['mode']; $binding[] = $postdata['mode']; } + if ($band == 'SAT') { + $sql .= " and col_prop_mode='SAT'"; + } else { + $sql.=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; + } $sql .= $this->genfunctions->addBandToQuery($band,$binding); @@ -99,6 +107,11 @@ class IOTA extends CI_Model { $binding[] = $postdata['mode']; $binding[] = $postdata['mode']; } + if ($band == 'SAT') { + $sql .= " and col_prop_mode='SAT'"; + } else { + $sql.=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; + } $sql .= $this->genfunctions->addBandToQuery($band,$binding); @@ -142,6 +155,8 @@ class IOTA extends CI_Model { $sql .= " and col_band = ?"; $binding[] = $postdata['band']; } + } else { + $sql.=" and (col_prop_mode != 'SAT' or col_prop_mode is null)"; } $sql .= ")"; } @@ -165,6 +180,11 @@ class IOTA extends CI_Model { $binding[] = $postdata['mode']; $binding[] = $postdata['mode']; } + if ($postdata['band'] == 'SAT') { + $sql .= " and col_prop_mode='SAT'"; + } else { + $sql.=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; + } $sql .= $this->genfunctions->addBandToQuery($postdata['band'],$binding); @@ -198,6 +218,11 @@ class IOTA extends CI_Model { $binding[] = $postdata['mode']; $binding[] = $postdata['mode']; } + if ($postdata['band'] == 'SAT') { + $sql .= " and col_prop_mode='SAT'"; + } else { + $sql.=" and (col_prop_mode!='SAT' or col_prop_mode is null)"; + } if ($postdata['includedeleted'] == NULL) { $sql .= " and coalesce(iota.status, '') <> 'D'"; diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index a27fbd2a4..ebb752eae 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -117,7 +117,7 @@
- + input->post('band') == $band) echo ' selected'; @@ -199,6 +199,9 @@ echo ' ' . __("Deleted") . ''; foreach($bands as $band) { + if (($posted_band != 'SAT') && ($band == 'SAT')) { + continue; + } echo '' . $band . ''; } echo ' @@ -220,26 +223,68 @@ '; - - foreach($bands as $band) { - echo ''; - } - echo ''; - + $addsat=''; + foreach($bands as $band) { + if ($band != 'SAT') { + echo ''; + } else { + $addsat=''; + } + } + echo ''; + if (count($bands) > 1) { + echo ''; + } + echo $addsat; echo ''; - foreach ($iota_summary['worked'] as $dxcc) { // Fills the table with the data - echo ''; - } + $addsat=''; + foreach ($iota_summary['worked'] as $band => $iota) { // Fills the table with the data + if ($band != 'SAT') { + echo ''; + } else { + $addsat=''; + } + } + if ($addsat != '' && count($iota_summary['worked']) > 1) { + if (count($bands) > 1) { + echo ''; + } + echo $addsat; + } - echo ' - '; - foreach ($iota_summary['confirmed'] as $dxcc) { // Fills the table with the data - echo ''; - } + echo ' + '; + + $addsat=''; + foreach ($iota_summary['confirmed'] as $band => $iota) { // Fills the table with the data + if ($band != 'SAT') { + echo ''; + } else { + $addsat=''; + } + } + if ($addsat != '' && count($iota_summary['confirmed']) > 1) { + if (count($bands) > 1) { + echo ''; + } + echo $addsat; + } echo '
' . $band . '' . __("Total") . '
' . $band . '' . $band . '' . __("Total") . '
' . __("Total worked") . '' . $dxcc . ''; + if ($band == 'Total') { + echo ''.$iota.''; + } else { + echo $iota; + } + echo '' . $iota . '
' . __("Total confirmed") . '' . $dxcc . '
' . __("Total confirmed") . ''; + if ($band == 'Total') { + echo ''.$iota.''; + } else { + echo $iota; + } + echo '' . $iota . '
diff --git a/assets/css/general.css b/assets/css/general.css index 589c15720..7fb24a14d 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -1222,3 +1222,12 @@ svg text.month { fill: #AAA; } opacity: 0; } } + +.spacingcell { + background-color: transparent !important; + border-top-style: none !important; + border-bottom-style: none !important; + border-right-style: none !important; + --dt-row-hover: transparent !important; + --dt-row-stripe: transparent !important; +} diff --git a/assets/js/sections/dxccmap.js b/assets/js/sections/dxccmap.js index c865b130a..a4a3b49c7 100644 --- a/assets/js/sections/dxccmap.js +++ b/assets/js/sections/dxccmap.js @@ -1,5 +1,6 @@ var osmUrl = $('#dxccmapjs').attr("tileUrl"); + $('#band2').change(function(){ var band = $("#band2 option:selected").text(); if (band != "SAT") { @@ -13,6 +14,8 @@ $('#band2').change(function(){ } }); +$('#band2').change(); // trigger the change on fresh-load to hide/show SAT-Params + $('#sats').change(function(){ var sat = $("#sats option:selected").text(); $("#band2").val('SAT');