kopia lustrzana https://github.com/magicbug/Cloudlog
Always get active station id from the database not session data
rodzic
ddb7744f50
commit
a3b134786c
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue