Added sat name filter

This commit is contained in:
Andreas Kristiansen
2025-10-14 14:14:55 +02:00
parent 27f6fbe4d4
commit 7f75156d95
2 changed files with 24 additions and 3 deletions

View File

@@ -127,6 +127,13 @@ class WPX extends CI_Model {
$sql .= $this->addOrbitToQuery($postdata, $bindings);
if ($band == 'SAT') {
if ($postdata['sat'] != 'All') {
$sql .= " and col_sat_name = ?";
$bindings[] = $postdata['sat'];
}
}
$sql .= " ) AS s
) AS t
) as x";
@@ -231,6 +238,13 @@ class WPX extends CI_Model {
$sql .= $this->addOrbitToQuery($postdata,$bindings);
if ($band == 'SAT') {
if ($postdata['sat'] != 'All') {
$sql .= " and col_sat_name = ?";
$bindings[] = $postdata['sat'];
}
}
$sql .= " ) AS s
) AS t
) as x";
@@ -434,6 +448,13 @@ class WPX extends CI_Model {
}
$sql .= $this->addContinentsToQuery($postdata);
if ($band == 'SAT') {
if ($postdata['sat'] != 'All') {
$sql .= " and col_sat_name = ?";
$bindings[] = $postdata['sat'];
}
}
$sql .= " ) AS s
) AS t
) as x
@@ -497,9 +518,9 @@ class WPX extends CI_Model {
$binding[]=$band;
} else {
if ($band == 'All' || $band == 'Total') {
$sql .= " and col_prop_mode !='SAT'";
$sql .=" and (col_prop_mode!='SAT' or col_prop_mode is null)";
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .=" and (col_prop_mode!='SAT' or col_prop_mode is null)";
$sql .= " and col_band = ?";
$binding[]=$band;
}

View File

@@ -10,8 +10,8 @@
<div class="mb-4 text-center">
<div class="dropdown" data-bs-auto-close="outside">
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary"><?= __("Show"); ?></button>
<button class="btn btn-sm btn-primary dropdown-toggle" type="button" id="filterDropdown" data-bs-toggle="dropdown" aria-expanded="false"><?= __("Filters") ?></button>
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary"><?= __("Show"); ?></button>
<!-- Dropdown Menu with Filter Content -->
<div class="dropdown-menu start-50 translate-middle-x p-3 mt-5" aria-labelledby="filterDropdown" style="min-width: 250px;">