[Quick Lookup] Updated code to support station logbooks

This commit is contained in:
Andreas
2021-09-10 23:13:25 +02:00
parent 88222ca686
commit cad5c1c569
3 changed files with 19 additions and 18 deletions

View File

@@ -28,12 +28,14 @@ class Lookup extends CI_Controller {
public function search() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$this->load->model('lookup_model');
$data['bands'] = $this->lookup_model->get_Worked_Bands($station_id);
$data['bands'] = $this->lookup_model->get_Worked_Bands($location_list);
$data['type'] = xss_clean($this->input->post('type'));
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
@@ -43,7 +45,7 @@ class Lookup extends CI_Controller {
$data['iota'] = xss_clean($this->input->post('iota'));
$data['cqz'] = xss_clean($this->input->post('cqz'));
$data['wwff'] = xss_clean($this->input->post('wwff'));
$data['station_id'] = $station_id;
$data['location_list'] = $location_list;
$data['result'] = $this->lookup_model->getSearchResult($data);