diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 51fa6e2a..0343da7a 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -29,6 +29,7 @@ class QSO extends CI_Controller { if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $data['active_station_profile'] = $this->stations->find_active(); + $data['notice'] = false; $data['stations'] = $this->stations->all_of_user(); $data['radios'] = $this->cat->radios(); diff --git a/application/libraries/Qra.php b/application/libraries/Qra.php index 55cd9560..4147e45c 100644 --- a/application/libraries/Qra.php +++ b/application/libraries/Qra.php @@ -129,6 +129,12 @@ function get_bearing($lat1, $lon1, $lat2, $lon2) { } function qra2latlong($strQRA) { + + if (strpos($strQRA, ',') !== false) { + $gridsquareArray = explode(',', $strQRA); + $strQRA = $gridsquareArray[0]; + } + if (strlen($strQRA) %2 == 0) { $strQRA = strtoupper($strQRA); if (strlen($strQRA) == 4) $strQRA .= "MM"; diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 72cd9a44..66559514 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -813,17 +813,28 @@ $(document).on('keypress',function(e) { uri->segment(1) == "qso") { ?> +load->model('stations'); + $active_station_id = $this->stations->find_active(); + $station_profile = $this->stations->profile($active_station_id); + $active_station_info = $station_profile->row(); + + if (strpos($active_station_info->station_gridsquare, ',') !== false) { + $gridsquareArray = explode(',', $active_station_info->station_gridsquare); + $user_gridsquare = $gridsquareArray[0]; + } else { + $user_gridsquare = $active_station_info->station_gridsquare; + } +?> +