[Visitor Gridmap] Get the gridmap working again

This commit is contained in:
Andreas Kristiansen
2025-11-15 14:37:27 +01:00
parent 1b301662a2
commit 2c91fbf655
2 changed files with 18 additions and 10 deletions

View File

@@ -235,7 +235,7 @@ class Visitor extends CI_Controller {
// Get Confirmed LoTW & Paper Squares (non VUCC)
$query = $this->gridmap_model->get_band_confirmed('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', $logbooks_locations_array);
$query = $this->gridmap_model->get_band_confirmed('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', 'All', '', $logbooks_locations_array);
if ($query && $query->num_rows() > 0)
@@ -271,7 +271,7 @@ class Visitor extends CI_Controller {
}
// Get worked squares
$query = $this->gridmap_model->get_band('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', $logbooks_locations_array);
$query = $this->gridmap_model->get_band('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', 'All', '', $logbooks_locations_array);
if ($query && $query->num_rows() > 0)
{

View File

@@ -2,13 +2,17 @@
class Gridmap_model extends CI_Model {
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $dxcc, $grids) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
// $query = $this->gridmap_model->get_band_confirmed('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', $logbooks_locations_array);
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $dxcc, $grids, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
return null;
}
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";
@@ -72,13 +76,17 @@ class Gridmap_model extends CI_Model {
return $this->db->query($sql, $binding);
}
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $dxcc, $grids) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
// $query = $this->gridmap_model->get_band('SAT', 'All', 'false', 'true', 'false', 'false', 'All', 'All', 'All', $logbooks_locations_array);
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $dxcc, $grids, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
return null;
}
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";