[Bands] Only use selected bands in total in awards

pull/1595/head
Andreas 2022-09-07 20:40:31 +02:00
rodzic de2a0ddaa9
commit 09144a5589
4 zmienionych plików z 73 dodań i 8 usunięć

Wyświetl plik

@ -187,7 +187,14 @@ class CQ extends CI_Model{
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('cq');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@ -210,7 +217,14 @@ class CQ extends CI_Model{
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('cq');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";

Wyświetl plik

@ -427,7 +427,14 @@ class DXCC extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('dxcc');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@ -458,7 +465,14 @@ class DXCC extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('dxcc');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";

Wyświetl plik

@ -325,7 +325,14 @@ class IOTA extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('iota');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@ -356,7 +363,14 @@ class IOTA extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('iota');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";

Wyświetl plik

@ -117,7 +117,14 @@ class was extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('was');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@ -143,7 +150,14 @@ class was extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$sql .= " and thcv.col_prop_mode !='SAT'";
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('was');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
" and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@ -247,6 +261,15 @@ class was extends CI_Model {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('was');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and col_band in (" . $bandslots_list . ")" .
" and col_prop_mode !='SAT'";
}
return $sql;
}