save the band unit and write it in session and user_options

This commit is contained in:
HB9HIL
2024-07-05 21:37:50 +02:00
parent 44ee68c19f
commit ae5c93da46
2 changed files with 30 additions and 0 deletions

View File

@@ -155,4 +155,15 @@ class Band extends CI_Controller {
echo json_encode(array('message' => 'OK'));
return;
}
public function saveBandUnit() {
$unit = $this->security->xss_clean($this->input->post('unit'));
$band_id = $this->security->xss_clean($this->input->post('band_id'));
$this->load->model('bands');
$band = $this->bands->getband($band_id)->row()->band;
$this->user_options_model->set_option('frequency', 'unit', array($band => $unit));
$this->session->set_userdata('qrgunit_'.$band, $unit);
}
}