当前提交
895ea9b0fa
共有 2 个文件被更改,包括 170 次插入 和 144 次删除
|
|
@ -78,8 +78,20 @@
|
|||
|
||||
}
|
||||
|
||||
function json($id)
|
||||
{
|
||||
function json($id) {
|
||||
|
||||
$this->load->model('user_model');
|
||||
|
||||
// Check if users logged in
|
||||
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
// Return Json data
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array(
|
||||
"error" => "not_logged_in"
|
||||
), JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
|
|
@ -157,6 +169,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function get_mode_designator($frequency)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1246,8 +1246,21 @@ $(document).on('keypress',function(e) {
|
|||
"satmode": "S/X",
|
||||
"satname": "QO-100"
|
||||
"power": "20"
|
||||
"prop_mode": "SAT"
|
||||
"prop_mode": "SAT",
|
||||
"error": "not_logged_id" // optional, reserved for errors
|
||||
} */
|
||||
if (data.error) {
|
||||
if (data.error == 'not_logged_in') {
|
||||
$(".radio_cat_state" ).remove();
|
||||
if($('.radio_login_error').length == 0) {
|
||||
$('.qso_panel').prepend('<div class="alert alert-danger radio_login_error" role="alert"><i class="fas fa-broadcast-tower"></i> You\'re not logged it. Please <a href="<?php echo base_url();?>">login</a></div>');
|
||||
}
|
||||
}
|
||||
// Put future Errorhandling here
|
||||
} else {
|
||||
if($('.radio_login_error').length != 0) {
|
||||
$(".radio_login_error" ).remove();
|
||||
}
|
||||
$('#frequency').val(data.frequency);
|
||||
$("#band").val(frequencyToBand(data.frequency));
|
||||
if (data.frequency_rx != "") {
|
||||
|
|
@ -1303,7 +1316,7 @@ $(document).on('keypress',function(e) {
|
|||
$('#radio_cat_state').html(text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
正在加载…
在新工单中引用