mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Winkey] Did a little touch up of the code here
This commit is contained in:
@@ -147,16 +147,16 @@ class QSO extends CI_Controller {
|
||||
//change to create_qso function as add and create_qso duplicate functionality
|
||||
$this->logbook_model->create_qso();
|
||||
|
||||
$retuner=[];
|
||||
$actstation=$this->stations->find_active() ?? '';
|
||||
$returner['activeStationId'] = $actstation;
|
||||
$profile_info = $this->stations->profile($actstation)->row();
|
||||
$returner['activeStationTXPower'] = xss_clean($profile_info->station_power);
|
||||
$returner['activeStationOP'] = xss_clean($this->session->userdata('operator_callsign'));
|
||||
$returner=[];
|
||||
$actstation=$this->stations->find_active() ?? '';
|
||||
$returner['activeStationId'] = $actstation;
|
||||
$profile_info = $this->stations->profile($actstation)->row();
|
||||
$returner['activeStationTXPower'] = xss_clean($profile_info->station_power);
|
||||
$returner['activeStationOP'] = xss_clean($this->session->userdata('operator_callsign'));
|
||||
$returner['message']='success';
|
||||
|
||||
// Get last 5 qsos
|
||||
echo json_encode($returner);
|
||||
echo json_encode($returner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,13 +205,9 @@ class QSO extends CI_Controller {
|
||||
$this->load->model('winkey');
|
||||
|
||||
// call settings from model winkey
|
||||
$data['result'] = $this->winkey->settings($this->session->userdata('user_id'), $this->session->userdata('station_profile_id'));
|
||||
$data['result'] = $this->winkey->settings($this->session->userdata('user_id'), $this->stations->find_active());
|
||||
|
||||
if ($data['result'] == false) {
|
||||
$this->load->view('qso/components/winkeysettings', $data);
|
||||
} else {
|
||||
$this->load->view('qso/components/winkeysettings_results', $data);
|
||||
}
|
||||
$this->load->view('qso/components/winkeysettings', $data);
|
||||
}
|
||||
|
||||
function cwmacrosave(){
|
||||
@@ -233,7 +229,7 @@ class QSO extends CI_Controller {
|
||||
|
||||
$data = [
|
||||
'user_id' => $this->session->userdata('user_id'),
|
||||
'station_location_id' => $this->session->userdata('station_profile_id'),
|
||||
'station_location_id' => $this->stations->find_active(),
|
||||
'function1_name' => $function1_name,
|
||||
'function1_macro' => $function1_macro,
|
||||
'function2_name' => $function2_name,
|
||||
@@ -262,7 +258,7 @@ class QSO extends CI_Controller {
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
// Call settings_json from model winkey
|
||||
echo $this->winkey->settings_json($this->session->userdata('user_id'), $this->session->userdata('station_profile_id'));
|
||||
echo $this->winkey->settings_json($this->session->userdata('user_id'), $this->stations->find_active());
|
||||
}
|
||||
|
||||
function edit_ajax() {
|
||||
@@ -340,20 +336,20 @@ class QSO extends CI_Controller {
|
||||
function qsl_sent_ajax() {
|
||||
$id = str_replace('"', "", $this->input->post("id", TRUE));
|
||||
$method = str_replace('"', "", $this->input->post("method", TRUE));
|
||||
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
$this->load->model('user_model');
|
||||
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
|
||||
if(!$this->user_model->authorize(2)) {
|
||||
echo json_encode(array('message' => 'Error'));
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
// Update Logbook to Mark Paper Card Sent
|
||||
$this->logbook_model->paperqsl_update_sent($id, $method);
|
||||
|
||||
|
||||
echo json_encode(array('message' => 'OK'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user