diff --git a/application/controllers/Activated_gridmap.php b/application/controllers/Activated_gridmap.php index 8b8c2d4b0..34945a730 100644 --- a/application/controllers/Activated_gridmap.php +++ b/application/controllers/Activated_gridmap.php @@ -54,6 +54,7 @@ class Activated_gridmap extends CI_Controller { $qrz = $this->security->xss_clean($this->input->post('qrz')); $sat = $this->security->xss_clean($this->input->post('sat')); $orbit = $this->security->xss_clean($this->input->post('orbit')); + $propagation = $this->security->xss_clean($this->input->post('propagation')); $this->load->model('activated_gridmap_model'); $array_grid_2char = array(); @@ -72,7 +73,7 @@ class Activated_gridmap extends CI_Controller { $grid_4char_confirmed = ""; $grid_6char_confirmed = ""; - $query = $this->activated_gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query = $this->activated_gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { @@ -102,7 +103,7 @@ class Activated_gridmap extends CI_Controller { } } - $query = $this->activated_gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query = $this->activated_gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { @@ -132,7 +133,7 @@ class Activated_gridmap extends CI_Controller { } } } - $query_vucc = $this->activated_gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query_vucc = $this->activated_gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query_vucc && $query_vucc->num_rows() > 0) { foreach ($query_vucc->result() as $row) { @@ -157,7 +158,7 @@ class Activated_gridmap extends CI_Controller { } // // Confirmed Squares - $query_vucc = $this->activated_gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query_vucc = $this->activated_gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query_vucc && $query_vucc->num_rows() > 0) { foreach ($query_vucc->result() as $row) { diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 52f4815e9..8a73292cb 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -419,10 +419,11 @@ class Awards extends CI_Controller { $mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode"))); $sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat"))); $orbit = str_replace('"', "", $this->security->xss_clean($this->input->post("Orbit"))); + $propagation = str_replace('"', "", $this->security->xss_clean($this->input->post("Propagation")) ?? ''); $type = $this->security->xss_clean($this->input->post('Type')); $qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL')); $searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode')); - $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $sat, $orbit, $searchmode); + $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $sat, $orbit, $searchmode, $propagation); // This is done because we have two different ways to get dxcc info in Wavelog. Once is using the name (in awards), and the other one is using the ADIF DXCC. // We replace the values to make it look a bit nicer @@ -457,6 +458,9 @@ class Awards extends CI_Controller { $data['filter'] .= " and orbit type ".$orbit; } } + if ($propagation != '' && $propagation != null) { + $data['filter'] .= " and propagation ".$propagation; + } if ($mode != null && strtolower($mode) != 'all') { $data['filter'] .= " and mode ".$mode; } diff --git a/application/controllers/Gridmap.php b/application/controllers/Gridmap.php index c32155fb2..9d41c360f 100644 --- a/application/controllers/Gridmap.php +++ b/application/controllers/Gridmap.php @@ -54,6 +54,7 @@ class Gridmap extends CI_Controller { $qrz = $this->security->xss_clean($this->input->post('qrz')); $sat = $this->security->xss_clean($this->input->post('sat')); $orbit = $this->security->xss_clean($this->input->post('orbit')); + $propagation = $this->security->xss_clean($this->input->post('propagation')); $this->load->model('gridmap_model'); $array_grid_2char = array(); @@ -72,7 +73,7 @@ class Gridmap extends CI_Controller { $grid_4char_confirmed = ""; $grid_6char_confirmed = ""; - $query = $this->gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query = $this->gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { @@ -99,7 +100,7 @@ class Gridmap extends CI_Controller { } } - $query = $this->gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query = $this->gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { @@ -126,7 +127,7 @@ class Gridmap extends CI_Controller { } } } - $query_vucc = $this->gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query_vucc = $this->gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query_vucc && $query_vucc->num_rows() > 0) { foreach ($query_vucc->result() as $row) { @@ -151,7 +152,7 @@ class Gridmap extends CI_Controller { } // // Confirmed Squares - $query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit); + $query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation); if ($query_vucc && $query_vucc->num_rows() > 0) { foreach ($query_vucc->result() as $row) { diff --git a/application/models/Activated_gridmap_model.php b/application/models/Activated_gridmap_model.php index c24c788df..c669c5488 100644 --- a/application/models/Activated_gridmap_model.php +++ b/application/models/Activated_gridmap_model.php @@ -2,10 +2,10 @@ class Activated_gridmap_model extends CI_Model { - function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) { + + $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; @@ -20,20 +20,26 @@ class Activated_gridmap_model extends CI_Model { . 'AND station_profile.station_id in ('.$location_list.')'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); @@ -41,10 +47,10 @@ class Activated_gridmap_model extends CI_Model { return $this->db->query($sql); } - function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) { + + $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; @@ -59,30 +65,36 @@ class Activated_gridmap_model extends CI_Model { . 'AND station_profile.station_id in ('.$location_list.')'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); return $this->db->query($sql); } - function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) { + + $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; @@ -97,20 +109,26 @@ class Activated_gridmap_model extends CI_Model { .$location_list.') AND COL_VUCC_GRIDS != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); @@ -118,10 +136,10 @@ class Activated_gridmap_model extends CI_Model { return $this->db->query($sql); } - function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) { + + $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; @@ -136,20 +154,26 @@ class Activated_gridmap_model extends CI_Model { .$location_list.') AND COL_VUCC_GRIDS != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); @@ -197,9 +221,9 @@ class Activated_gridmap_model extends CI_Model { * Get's the worked modes from the log */ function get_worked_modes() { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $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; diff --git a/application/models/Gridmap_model.php b/application/models/Gridmap_model.php index 310754f83..be4cf55a5 100644 --- a/application/models/Gridmap_model.php +++ b/application/models/Gridmap_model.php @@ -2,11 +2,11 @@ class Gridmap_model extends CI_Model { - function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) { + function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) { if ($logbooks_locations_array == NULL) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); } if (!$logbooks_locations_array) { @@ -22,20 +22,26 @@ class Gridmap_model extends CI_Model { .$location_list.') AND COL_GRIDSQUARE != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); @@ -44,11 +50,11 @@ class Gridmap_model extends CI_Model { return $this->db->query($sql); } - function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) { + function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) { if ($logbooks_locations_array == NULL) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); } if (!$logbooks_locations_array) { @@ -64,31 +70,37 @@ class Gridmap_model extends CI_Model { .$location_list.') AND COL_GRIDSQUARE != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); return $this->db->query($sql); } - function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) { + function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) { if ($logbooks_locations_array == NULL) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); } if (!$logbooks_locations_array) { @@ -104,31 +116,37 @@ class Gridmap_model extends CI_Model { .$location_list.') AND COL_VUCC_GRIDS != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addOrbitToQuery($orbit); return $this->db->query($sql); } - function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) { + function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) { if ($logbooks_locations_array == NULL) { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); } if (!$logbooks_locations_array) { @@ -145,20 +163,26 @@ class Gridmap_model extends CI_Model { .$location_list.') AND COL_VUCC_GRIDS != ""'; if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - if ($sat != 'All') { - $sql .= " and col_sat_name ='" . $sat . "'"; - } - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All' && $sat != '') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + $sql .= " and col_band ='" . $band . "'"; + } + } else { + if ($propagation != '') { + $sql .= " and col_prop_mode ='" . $propagation . "'"; + } + } - if ($mode != 'All') { - $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; - } + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $qrz); @@ -211,9 +235,9 @@ class Gridmap_model extends CI_Model { * Get's the worked modes from the log */ function get_worked_modes() { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $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; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 958a5b2f0..c71df2b99 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -389,7 +389,7 @@ class Logbook_model extends CI_Model { /* * Used to fetch QSOs from the logbook in the awards */ - public function qso_details($searchphrase, $band, $mode, $type, $qsl, $sat = null, $orbit = null, $searchmode = null){ + public function qso_details($searchphrase, $band, $mode, $type, $qsl, $sat = null, $orbit = null, $searchmode = null, $propagation = null){ $this->load->model('logbooks_model'); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); @@ -446,6 +446,9 @@ class Logbook_model extends CI_Model { $this->db->where("satellite.orbit = '$orbit'"); } } + if ($propagation != '' && $propagation != null) { + $this->db->where("COL_PROP_MODE = '$propagation'"); + } } break; case 'CQZone': diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index 532c9a8d0..f688debde 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -1,135 +1,177 @@
-
+
-

+

- -
- - - - - - - - - - - - - -
-
- '; ?> - -
-
- '; ?> - -
-
- '; ?> - -
-
- '; ?> - -
+ + +
+ +
+
- - - - + + +
style="display: none;" > + +
+ + + - session->flashdata('message')) { ?> - -
-

session->flashdata('message'); ?>

-
- + +
+ +
+ +
+
+ +
+ +
+ +
style="display: none;" > + +
+ + +
+
+
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+
+
+ + + + + + + session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ ?> + \ No newline at end of file diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index 521c6da0d..807002bb7 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -3,17 +3,19 @@ var modalloading=false; $('#band').change(function(){ var band = $("#band option:selected").text(); if (band != "SAT") { - $("#sats").val('All'); + $("#sat").val('All'); $("#orbits").val('All'); - $("#sats").hide(); - $("#orbits").hide(); + $("#sats_div").hide(); + $("#orbits_div").hide(); $("#satslabel").hide(); $("#orbitslabel").hide(); + $('#propagation').val('').prop('disabled', false); } else { - $("#sats").show(); - $("#orbits").show(); + $("#sats_div").show(); + $("#orbits_div").show(); $("#orbitslabel").show(); $("#satslabel").show(); + $('#propagation').val('SAT').prop('disabled', true); } }); @@ -60,8 +62,9 @@ function gridPlot(form, visitor=true) { lotw: $("#lotw").is(":checked"), eqsl: $("#eqsl").is(":checked"), qrz: $("#qrz").is(":checked"), - sat: $("#sats").val(), + sat: $("#sat").val(), orbit: $("#orbits").val(), + propagation: $('#propagation').val() }, success: function (data) { $('.cohidden').show(); @@ -140,8 +143,9 @@ function spawnGridsquareModal(loc_4char) { 'Searchphrase': loc_4char, 'Band': $("#band").val(), 'Mode': $("#mode").val(), - 'Sat': $("#sats").val(), + 'Sat': $("#sat").val(), 'Orbit': $("#orbits").val(), + 'Propagation': $('#propagation').val(), 'Type': 'VUCC' }) if (type == 'activated') {