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

This commit is contained in:
Peter Goodhall 2020-03-02 19:53:50 +00:00
parent 7b4f4621d0
commit 18abea2aa0
3 changed files with 25 additions and 19 deletions

View File

@ -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');

View File

@ -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');

View File

@ -194,24 +194,24 @@
<div class="form-group">
<label for="selectPropagation">Propagation Mode</label>
<select class="custom-select" id="selectPropagation" name="prop_mode">
<option value="" selected="selected"></option>
<option value="AUR">Aurora</option>
<option value="AUE">Aurora-E</option>
<option value="BS">Back scatter</option>
<option value="ECH">EchoLink</option>
<option value="EME">Earth-Moon-Earth</option>
<option value="ES">Sporadic E</option>
<option value="FAI">Field Aligned Irregularities</option>
<option value="F2">F2 Reflection</option>
<option value="INTERNET">Internet-assisted</option>
<option value="ION">Ionoscatter</option>
<option value="IRL">IRLP</option>
<option value="MS">Meteor scatter</option>
<option value="RPT">Terrestrial or atmospheric repeater or transponder</option>
<option value="RS">Rain scatter</option>
<option value="SAT">Satellite</option>
<option value="TEP">Trans-equatorial</option>
<option value="TR">Tropospheric ducting</option>
<option value="" <?php if(!empty($this->session->userdata('prop_mode'))) { echo "selected=\"selected\""; } ?>></option>
<option value="AUR" <?php if($this->session->userdata('prop_mode') == "AUR") { echo "selected=\"selected\""; } ?>>Aurora</option>
<option value="AUE" <?php if($this->session->userdata('prop_mode') == "AUE") { echo "selected=\"selected\""; } ?>>Aurora-E</option>
<option value="BS" <?php if($this->session->userdata('prop_mode') == "BS") { echo "selected=\"selected\""; } ?>>Back scatter</option>
<option value="ECH" <?php if($this->session->userdata('prop_mode') == "ECH") { echo "selected=\"selected\""; } ?>>EchoLink</option>
<option value="EME" <?php if($this->session->userdata('prop_mode') == "EME") { echo "selected=\"selected\""; } ?>>Earth-Moon-Earth</option>
<option value="ES" <?php if($this->session->userdata('prop_mode') == "ES") { echo "selected=\"selected\""; } ?>>Sporadic E</option>
<option value="FAI" <?php if($this->session->userdata('prop_mode') == "FAI") { echo "selected=\"selected\""; } ?>>Field Aligned Irregularities</option>
<option value="F2" <?php if($this->session->userdata('prop_mode') == "F2") { echo "selected=\"selected\""; } ?>>F2 Reflection</option>
<option value="INTERNET" <?php if($this->session->userdata('prop_mode') == "INTERNET") { echo "selected=\"selected\""; } ?>>Internet-assisted</option>
<option value="ION" <?php if($this->session->userdata('prop_mode') == "ION") { echo "selected=\"selected\""; } ?>>Ionoscatter</option>
<option value="IRL" <?php if($this->session->userdata('prop_mode') == "IRL") { echo "selected=\"selected\""; } ?>>IRLP</option>
<option value="MS" <?php if($this->session->userdata('prop_mode') == "AUR") { echo "selected=\"selected\""; } ?>>Meteor scatter</option>
<option value="RPT" <?php if($this->session->userdata('prop_mode') == "RPT") { echo "selected=\"selected\""; } ?>>Terrestrial or atmospheric repeater or transponder</option>
<option value="RS" <?php if($this->session->userdata('prop_mode') == "RS") { echo "selected=\"selected\""; } ?>>Rain scatter</option>
<option value="SAT" <?php if($this->session->userdata('prop_mode') == "SAT") { echo "selected=\"selected\""; } ?>>Satellite</option>
<option value="TEP" <?php if($this->session->userdata('prop_mode') == "TEP") { echo "selected=\"selected\""; } ?>>Trans-equatorial</option>
<option value="TR" <?php if($this->session->userdata('prop_mode') == "TR") { echo "selected=\"selected\""; } ?>>Tropospheric ducting</option>
</select>
</div>