diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index fdf8a3326..3baafcd2a 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'); diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 254ad6282..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; @@ -81,9 +84,6 @@ class DXCC extends CI_Model { $dxccMatrix[$dxcc->adif]['Deleted'] = isset($dxcc->Enddate) ? 1 : 0; $dxccMatrix[$dxcc->adif][$band] = '-'; } - if (($postdata['band'] != 'SAT') && ($band == 'SAT')) { - continue; - } // If worked is checked, we add worked entities to the array if ($postdata['worked'] != NULL) { diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index 70472b050..0c6126c0c 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -225,6 +225,9 @@ ' . __("DXCC Name") . ' ' . __("Prefix") . ''; foreach($bands as $band) { + if (($posted_band != 'SAT') && ($band == 'SAT')) { + continue; + } echo '' . $band . ''; } echo '