Always get active station id from the database not session data

这个提交包含在:
Peter Goodhall 2020-02-27 14:43:07 +00:00
父节点 ddb7744f50
当前提交 a3b134786c
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@ -18,12 +18,12 @@ class QSO extends CI_Controller {
$this->load->model('user_model');
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();
$data['radios'] = $this->cat->radios();
$data['query'] = $this->logbook_model->last_custom('5');
$this->load->library('form_validation');
$this->form_validation->set_rules('start_date', 'Date', 'required');

查看文件

@ -163,7 +163,7 @@
<label for="inputStationProfile">Station Profile</label>
<select id="stationProfile" class="custom-select" name="station_profile">
<?php foreach ($stations->result() as $stationrow) { ?>
<option value="<?php echo $stationrow->station_id; ?>" <?php if($this->session->userdata('station_profile_id') == $stationrow->station_id) { echo "selected=\"selected\""; } ?>><?php echo $stationrow->station_profile_name; ?></option>
<option value="<?php echo $stationrow->station_id; ?>" <?php if($active_station_profile == $stationrow->station_id) { echo "selected=\"selected\""; } ?>><?php echo $stationrow->station_profile_name; ?></option>
<?php } ?>
</select>
</div>