diff --git a/application/models/Iota.php b/application/models/Iota.php
index 484a5667..06eab514 100644
--- a/application/models/Iota.php
+++ b/application/models/Iota.php
@@ -29,7 +29,6 @@ class IOTA extends CI_Model {
{
// Call the Model constructor
parent::__construct();
-
}
function get_worked_bands() {
@@ -54,7 +53,6 @@ class IOTA extends CI_Model {
array_push($worked_slots, strtoupper($row->COL_PROP_MODE));
}
-
// bring worked-slots in order of defined $bandslots
$results = array();
foreach(array_keys($this->bandslots) as $slot) {
@@ -70,11 +68,10 @@ class IOTA extends CI_Model {
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
- foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display
+ foreach ($bands as $band) { // Looping through bands and iota to generate the array needed for display
foreach ($iotaArray as $iota) {
$iotaMatrix[$iota->tag]['prefix'] = $iota->prefix;
$iotaMatrix[$iota->tag]['name'] = $iota->name;
- //$iotaMatrix[$iota->tag]['status'] = $iota->status;
if ($postdata['includedeleted'])
$iotaMatrix[$iota->tag]['Deleted'] = isset($iota->status) && $iota->status == 'D' ? "
Y
" : '';
$iotaMatrix[$iota->tag][$band] = '-';
@@ -136,6 +133,7 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $band . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
@@ -143,10 +141,6 @@ class IOTA extends CI_Model {
$sql .= " and coalesce(iota.status, '') <> 'D'";
}
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
-
$sql .= $this->addContinentsToQuery($postdata);
$query = $this->db->query($sql);
@@ -164,6 +158,7 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $band . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
@@ -198,6 +193,7 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $postdata['band'] . "'";
}
}
@@ -223,6 +219,7 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $postdata['band'] . "'";
}
}
@@ -234,6 +231,7 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $postdata['band'] . "'";
}
}
@@ -267,16 +265,11 @@ class IOTA extends CI_Model {
$sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
}
else {
+ $sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $postdata['band'] . "'";
}
}
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
-
- $sql .= $this->addContinentsToQuery($postdata);
-
$query = $this->db->query($sql);
return $query->result();
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index 98323176..54abb7dc 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -198,6 +198,7 @@ class Logbook_model extends CI_Model {
$this->db->where('station_id', $station_id);
$this->db->where('COL_IOTA', $iota);
if($band != "SAT") {
+ $this->db->where('COL_BAND !=', 'SAT');
$this->db->where('COL_BAND', $band);
} else {
$this->db->where('COL_PROP_MODE', "SAT");