diff --git a/application/controllers/Map.php b/application/controllers/Map.php index 22b7714a..e05c5dde 100644 --- a/application/controllers/Map.php +++ b/application/controllers/Map.php @@ -33,12 +33,11 @@ class Map extends CI_Controller { function custom() { - $this->load->model('bands'); - //$this->load->model('modes'); + $this->load->model('modes'); $data['worked_bands'] = $this->bands->get_worked_bands(); // Used in the view for band select - //$data['modes'] = $this->modes->active(); // Used in the view for mode select + $data['modes'] = $this->modes->active(); // Used in the view for mode select if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands @@ -108,11 +107,13 @@ class Map extends CI_Controller { $start_date = $this->uri->segment(3); $end_date = $this->uri->segment(4); $band = $this->uri->segment(5); + $mode = $this->uri->segment(6); + $propagation = $this->uri->segment(7); $this->load->model('logbook_model'); $this->load->library('qra'); - $qsos = $this->logbook_model->map_custom_qsos(rawurldecode($start_date), rawurldecode($end_date), $band); + $qsos = $this->logbook_model->map_custom_qsos(rawurldecode($start_date), rawurldecode($end_date), $band, rawurldecode($mode), rawurldecode($propagation)); header('Content-Type: application/json; charset=utf-8'); echo "{\"markers\": ["; $count = 1; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 5c900aa4..b4c4f94a 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1284,7 +1284,7 @@ class Logbook_model extends CI_Model { } /* used to return custom qsos requires start, end date plus a band */ - function map_custom_qsos($start, $end, $band) { + function map_custom_qsos($start, $end, $band, $mode, $propagation) { $CI =& get_instance(); $CI->load->model('logbooks_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); @@ -1305,6 +1305,15 @@ class Logbook_model extends CI_Model { $this->db->where("COL_PROP_MODE", "SAT"); } + if ($mode != 'All') { + $this->db->where("COL_MODE", $mode); + $this->db->or_where("COL_SUBMODE", $mode); + } + + if ($propagation != 'All') { + $this->db->where("COL_PROP_MODE", $propagation); + } + $this->db->order_by("COL_TIME_ON", "ASC"); $query = $this->db->get($this->config->item('table_name')); diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 81d6da17..77786526 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -721,7 +721,7 @@ function getLookupResult() { var q_lng = -32.695312; - var qso_loc = '//input->post('band')); ?>'; + var qso_loc = '//input->post('band')); ?>/input->post('mode')); ?>/input->post('prop_mode')); ?>'; var q_zoom = 3; $(document).ready(function(){ diff --git a/application/views/map/custom_date.php b/application/views/map/custom_date.php index 518da1a4..f1d491b6 100644 --- a/application/views/map/custom_date.php +++ b/application/views/map/custom_date.php @@ -31,10 +31,10 @@ -
+
-
+
+ + result() as $mode){ + if ($mode->submode == null) { + echo ''."\n"; + } else { + echo ''."\n"; + } + } + ?> + +
+
+
+ +
+ +
+
+