diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index fe6597cd..04c2ebcd 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -36,7 +36,7 @@ class Lookup extends CI_Controller { $this->load->model('lookup_model'); $this->load->model('bands'); - $data['bands'] = $this->bands->get_worked_bands('dxcc'); + $data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type'))); $data['type'] = xss_clean($this->input->post('type')); $data['dxcc'] = xss_clean($this->input->post('dxcc')); diff --git a/application/models/Lookup_model.php b/application/models/Lookup_model.php index 0f3f5cea..fce00f5a 100644 --- a/application/models/Lookup_model.php +++ b/application/models/Lookup_model.php @@ -52,8 +52,8 @@ class Lookup_model extends CI_Model{ switch ($queryinfo['type']) { case 'dxcc': $sqlquerytypestring .= " and col_dxcc = " . $queryinfo['dxcc']; break; case 'iota': $sqlquerytypestring .= " and col_iota = '" . $queryinfo['iota'] . "'"; break; - case 'grid': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; - case 'cqz': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; + case 'vucc': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; + case 'cq': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; case 'was': $sqlquerytypestring .= " and col_state = '" . $queryinfo['was'] . "' and COL_DXCC in ('291', '6', '110')";; break; case 'sota': $sqlquerytypestring .= " and col_sota_ref = '" . $queryinfo['sota'] . "'"; break; case 'wwff': $sqlquerytypestring .= " and col_sig = 'WWFF' and col_sig_info = '" . $queryinfo['wwff'] . "'"; break; diff --git a/application/views/lookup/index.php b/application/views/lookup/index.php index b0d755bb..fc839476 100644 --- a/application/views/lookup/index.php +++ b/application/views/lookup/index.php @@ -1,8 +1,8 @@