From 18abea2aa04e4a2dbb5dde21ab4b6feaa25e5460 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 2 Mar 2020 19:53:50 +0000 Subject: [PATCH] Sets propagation mode as a session variable and prepopulates the next QSO till its unselected, if SAT if sat name is selected prop_mode SAT automatically populated --- application/controllers/Qso.php | 6 +++++ application/models/Logbook_model.php | 2 +- application/views/qso/index.php | 36 ++++++++++++++-------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index af18123c..a4773623 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -59,6 +59,7 @@ class QSO extends CI_Controller { 'mode' => $this->input->post('mode'), 'sat_name' => $this->input->post('sat_name'), 'sat_mode' => $this->input->post('sat_mode'), + 'prop_mode' => $this->input->post('prop_mode'), 'radio' => $this->input->post('radio'), 'station_profile_id' => $this->input->post('station_profile') ); @@ -68,6 +69,11 @@ class QSO extends CI_Controller { setcookie("station_profile_id", $qso_data['station_profile_id'], time()+3600*24*99); $this->session->set_userdata($qso_data); + + // If SAT name is set make it session set to sat + if($this->input->post('sat_name')) { + $this->session->set_userdata('prop_mode', 'SAT'); + } // Get last 5 qsos $data['query'] = $this->logbook_model->last_custom('5'); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 62990cc9..0ad10816 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -20,7 +20,7 @@ class Logbook_model extends CI_Model { if($this->input->post('sat_name')) { $prop_mode = "SAT"; - } + } if($this->session->userdata('user_locator')){ $locator = $this->session->userdata('user_locator'); diff --git a/application/views/qso/index.php b/application/views/qso/index.php index f4612294..68460747 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -194,24 +194,24 @@