Merge branch 'dev' into labels_paper_types
这个提交包含在:
当前提交
3593987983
共有 12 个文件被更改,包括 353 次插入 和 105 次删除
|
|
@ -9,7 +9,7 @@ Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
|
||||||
## Requirements
|
## Requirements
|
||||||
* Linux based Operating System
|
* Linux based Operating System
|
||||||
* Apache (Nginx should work)
|
* Apache (Nginx should work)
|
||||||
* PHP Version 7.4 (PHP 8.0 is working, 8.1 might have some undetected issues, please report so we can fix)
|
* PHP Version 7.4 (PHP 8.2 works)
|
||||||
* MySQL (MySQL 5.7 or higher)
|
* MySQL (MySQL 5.7 or higher)
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
|
|
|
||||||
|
|
@ -151,9 +151,62 @@ $config['url_suffix'] = '';
|
||||||
| there is an available translation if you intend to use something other
|
| there is an available translation if you intend to use something other
|
||||||
| than english.
|
| than english.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['language'] = 'english';
|
$lang = 'english'; // this language will be used per default
|
||||||
|
|
||||||
|
if (isset($_COOKIE["language"])) {
|
||||||
|
$tmp_value = $_COOKIE["language"];
|
||||||
|
if (!empty($tmp_value)) { $lang = $tmp_value; }
|
||||||
|
}
|
||||||
|
switch ($lang) { // do this for security-reasons! parse only langs, which are known to us
|
||||||
|
case 'dutch':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'chinese_simplified':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'spanish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'czech':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'bulgarian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'turkish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'swedish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'polish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'italian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'greek':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'french':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'finnish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'russian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'english':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'german':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$config['cl_multilanguage']=true;
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Default Character Set
|
| Default Character Set
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,12 @@ class User extends CI_Controller {
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
// Load language files
|
$this->lang->load(array(
|
||||||
$this->lang->load(array(
|
'account',
|
||||||
'account',
|
'lotw',
|
||||||
'lotw',
|
'eqsl',
|
||||||
'eqsl',
|
'admin',
|
||||||
'admin',
|
));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
|
|
@ -33,6 +32,8 @@ class User extends CI_Controller {
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||||
|
|
||||||
|
$data['existing_languages'] = $this->find();
|
||||||
|
|
||||||
$this->load->model('bands');
|
$this->load->model('bands');
|
||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
|
@ -54,15 +55,14 @@ class User extends CI_Controller {
|
||||||
|
|
||||||
// Get timezones
|
// Get timezones
|
||||||
$data['timezones'] = $this->user_model->timezones();
|
$data['timezones'] = $this->user_model->timezones();
|
||||||
|
$data['language'] = 'english';
|
||||||
|
|
||||||
if ($this->form_validation->run() == FALSE)
|
if ($this->form_validation->run() == FALSE) {
|
||||||
{
|
|
||||||
$data['page_title'] = "Add User";
|
$data['page_title'] = "Add User";
|
||||||
$data['measurement_base'] = $this->config->item('measurement_base');
|
$data['measurement_base'] = $this->config->item('measurement_base');
|
||||||
|
|
||||||
$this->load->view('interface_assets/header', $data);
|
$this->load->view('interface_assets/header', $data);
|
||||||
if($this->input->post('user_name'))
|
if($this->input->post('user_name')) {
|
||||||
{
|
|
||||||
$data['user_name'] = $this->input->post('user_name');
|
$data['user_name'] = $this->input->post('user_name');
|
||||||
$data['user_email'] = $this->input->post('user_email');
|
$data['user_email'] = $this->input->post('user_email');
|
||||||
$data['user_password'] = $this->input->post('user_password');
|
$data['user_password'] = $this->input->post('user_password');
|
||||||
|
|
@ -90,14 +90,13 @@ class User extends CI_Controller {
|
||||||
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
||||||
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
||||||
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
||||||
|
$data['language'] = $this->input->post('language');
|
||||||
$this->load->view('user/add', $data);
|
$this->load->view('user/add', $data);
|
||||||
} else {
|
} else {
|
||||||
$this->load->view('user/add', $data);
|
$this->load->view('user/add', $data);
|
||||||
}
|
}
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
switch($this->user_model->add($this->input->post('user_name'),
|
switch($this->user_model->add($this->input->post('user_name'),
|
||||||
$this->input->post('user_password'),
|
$this->input->post('user_password'),
|
||||||
$this->input->post('user_email'),
|
$this->input->post('user_email'),
|
||||||
|
|
@ -125,7 +124,9 @@ class User extends CI_Controller {
|
||||||
$this->input->post('user_amsat_status_upload'),
|
$this->input->post('user_amsat_status_upload'),
|
||||||
$this->input->post('user_mastodon_url'),
|
$this->input->post('user_mastodon_url'),
|
||||||
$this->input->post('user_gridmap_default_band'),
|
$this->input->post('user_gridmap_default_band'),
|
||||||
($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : ''))) {
|
($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : ''),
|
||||||
|
$this->input->post('language'),
|
||||||
|
)) {
|
||||||
// Check for errors
|
// Check for errors
|
||||||
case EUSERNAMEEXISTS:
|
case EUSERNAMEEXISTS:
|
||||||
$data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!';
|
$data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!';
|
||||||
|
|
@ -171,16 +172,35 @@ class User extends CI_Controller {
|
||||||
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
||||||
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
||||||
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
||||||
|
$data['language'] = $this->input->post('language');
|
||||||
$this->load->view('user/add', $data);
|
$this->load->view('user/add', $data);
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function find() {
|
||||||
|
$existing_langs = array();
|
||||||
|
$lang_path = APPPATH.'language';
|
||||||
|
|
||||||
|
$results = scandir($lang_path);
|
||||||
|
|
||||||
|
foreach ($results as $result) {
|
||||||
|
if ($result === '.' or $result === '..') continue;
|
||||||
|
|
||||||
|
if (is_dir(APPPATH.'language' . '/' . $result)) {
|
||||||
|
$dirs[] = $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $dirs;
|
||||||
|
}
|
||||||
|
|
||||||
function edit() {
|
function edit() {
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||||
$query = $this->user_model->get_by_id($this->uri->segment(3));
|
$query = $this->user_model->get_by_id($this->uri->segment(3));
|
||||||
|
|
||||||
|
$data['existing_languages'] = $this->find();
|
||||||
|
|
||||||
$this->load->model('bands');
|
$this->load->model('bands');
|
||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
|
@ -208,7 +228,6 @@ class User extends CI_Controller {
|
||||||
{
|
{
|
||||||
$data['page_title'] = "Edit User";
|
$data['page_title'] = "Edit User";
|
||||||
|
|
||||||
$this->load->view('interface_assets/header', $data);
|
|
||||||
$q = $query->row();
|
$q = $query->row();
|
||||||
|
|
||||||
$data['id'] = $q->user_id;
|
$data['id'] = $q->user_id;
|
||||||
|
|
@ -327,6 +346,13 @@ class User extends CI_Controller {
|
||||||
$data['user_date_format'] = $q->user_date_format;
|
$data['user_date_format'] = $q->user_date_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->input->post('language')) {
|
||||||
|
$data['language'] = $this->input->post('language', true);
|
||||||
|
} else {
|
||||||
|
$data['language'] = $q->language;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($this->input->post('user_stylesheet')) {
|
if($this->input->post('user_stylesheet')) {
|
||||||
$data['user_stylesheet'] = $this->input->post('user_stylesheet', true);
|
$data['user_stylesheet'] = $this->input->post('user_stylesheet', true);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -429,11 +455,10 @@ class User extends CI_Controller {
|
||||||
$data['user_column5'] = $q->user_column5;
|
$data['user_column5'] = $q->user_column5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->load->view('interface_assets/header', $data);
|
||||||
$this->load->view('user/edit', $data);
|
$this->load->view('user/edit', $data);
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
unset($data);
|
unset($data);
|
||||||
switch($this->user_model->edit($this->input->post())) {
|
switch($this->user_model->edit($this->input->post())) {
|
||||||
// Check for errors
|
// Check for errors
|
||||||
|
|
@ -448,6 +473,17 @@ class User extends CI_Controller {
|
||||||
break;
|
break;
|
||||||
// All okay, return to user screen
|
// All okay, return to user screen
|
||||||
case OK:
|
case OK:
|
||||||
|
if ($this->session->userdata('user_id') == $this->uri->segment(3)) { // Editing own User? Set cookie!
|
||||||
|
$cookie= array(
|
||||||
|
|
||||||
|
'name' => 'language',
|
||||||
|
'value' => $this->input->post('language', true),
|
||||||
|
'expire' => time()+1000,
|
||||||
|
'secure' => FALSE
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->input->set_cookie($cookie);
|
||||||
|
}
|
||||||
if($this->session->userdata('user_id') == $this->input->post('id', true)) {
|
if($this->session->userdata('user_id') == $this->input->post('id', true)) {
|
||||||
$this->session->set_flashdata('success', 'User '.$this->input->post('user_name', true).' edited');
|
$this->session->set_flashdata('success', 'User '.$this->input->post('user_name', true).' edited');
|
||||||
redirect('user/edit/'.$this->uri->segment(3));
|
redirect('user/edit/'.$this->uri->segment(3));
|
||||||
|
|
@ -487,6 +523,7 @@ class User extends CI_Controller {
|
||||||
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
|
||||||
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
|
||||||
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
|
||||||
|
$data['language'] = $this->input->post('language');
|
||||||
$this->load->view('user/edit');
|
$this->load->view('user/edit');
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
}
|
||||||
|
|
@ -557,19 +594,26 @@ class User extends CI_Controller {
|
||||||
|
|
||||||
$data['user'] = $query->row();
|
$data['user'] = $query->row();
|
||||||
|
|
||||||
if ($this->form_validation->run() == FALSE)
|
|
||||||
{
|
if ($this->form_validation->run() == FALSE) {
|
||||||
$data['page_title'] = "Login";
|
$data['page_title'] = "Login";
|
||||||
$this->load->view('interface_assets/mini_header', $data);
|
$this->load->view('interface_assets/mini_header', $data);
|
||||||
$this->load->view('user/login');
|
$this->load->view('user/login');
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if($this->user_model->login() == 1) {
|
if($this->user_model->login() == 1) {
|
||||||
$this->session->set_flashdata('notice', 'User logged in');
|
$this->session->set_flashdata('notice', 'User logged in');
|
||||||
$this->user_model->update_session($data['user']->user_id);
|
$this->user_model->update_session($data['user']->user_id);
|
||||||
|
$cookie= array(
|
||||||
|
|
||||||
|
'name' => 'language',
|
||||||
|
'value' => $data['user']->language,
|
||||||
|
'expire' => time()+1000,
|
||||||
|
'secure' => FALSE
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->input->set_cookie($cookie);
|
||||||
redirect('dashboard');
|
redirect('dashboard');
|
||||||
} else {
|
} else {
|
||||||
$this->session->set_flashdata('error', 'Incorrect username or password!');
|
$this->session->set_flashdata('error', 'Incorrect username or password!');
|
||||||
|
|
@ -591,9 +635,9 @@ class User extends CI_Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: forgot_password
|
* Function: forgot_password
|
||||||
*
|
*
|
||||||
* Allows users to input an email address and a password will be sent to that address.
|
* Allows users to input an email address and a password will be sent to that address.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function forgot_password() {
|
function forgot_password() {
|
||||||
|
|
||||||
|
|
@ -614,7 +658,7 @@ class User extends CI_Controller {
|
||||||
{
|
{
|
||||||
// Check email address exists
|
// Check email address exists
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
|
|
||||||
$check_email = $this->user_model->check_email_address($this->input->post('email', true));
|
$check_email = $this->user_model->check_email_address($this->input->post('email', true));
|
||||||
|
|
||||||
if($check_email == TRUE) {
|
if($check_email == TRUE) {
|
||||||
|
|
@ -623,7 +667,7 @@ class User extends CI_Controller {
|
||||||
$reset_code = random_string('alnum', 50);
|
$reset_code = random_string('alnum', 50);
|
||||||
|
|
||||||
$this->user_model->set_password_reset_code($this->input->post('email', true), $reset_code);
|
$this->user_model->set_password_reset_code($this->input->post('email', true), $reset_code);
|
||||||
|
|
||||||
// Send email with reset code
|
// Send email with reset code
|
||||||
|
|
||||||
$this->data['reset_code'] = $reset_code;
|
$this->data['reset_code'] = $reset_code;
|
||||||
|
|
@ -676,10 +720,10 @@ class User extends CI_Controller {
|
||||||
$this->load->helper(array('form', 'url'));
|
$this->load->helper(array('form', 'url'));
|
||||||
|
|
||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
$this->form_validation->set_rules('password', 'Password', 'required');
|
$this->form_validation->set_rules('password', 'Password', 'required');
|
||||||
$this->form_validation->set_rules('password_confirm', 'Password Confirmation', 'required|matches[password]');
|
$this->form_validation->set_rules('password_confirm', 'Password Confirmation', 'required|matches[password]');
|
||||||
|
|
||||||
if ($this->form_validation->run() == FALSE)
|
if ($this->form_validation->run() == FALSE)
|
||||||
{
|
{
|
||||||
$data['page_title'] = "Reset Password";
|
$data['page_title'] = "Reset Password";
|
||||||
|
|
@ -691,7 +735,7 @@ class User extends CI_Controller {
|
||||||
{
|
{
|
||||||
// Lets reset the password!
|
// Lets reset the password!
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
|
|
||||||
$this->user_model->reset_password($this->input->post('password', true), $reset_code);
|
$this->user_model->reset_password($this->input->post('password', true), $reset_code);
|
||||||
$this->session->set_flashdata('notice', 'Password Reset.');
|
$this->session->set_flashdata('notice', 'Password Reset.');
|
||||||
redirect('user/login');
|
redirect('user/login');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This adds a field to user-table to hold/persist language-setting per user
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Migration_add_user_language extends CI_Migration {
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
if (!$this->db->field_exists('language', 'users')) {
|
||||||
|
$fields = array(
|
||||||
|
'language varchar(32) default "english"',
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->dbforge->add_column('users', $fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
if ($this->db->field_exists('language', 'users')) {
|
||||||
|
$this->dbforge->drop_column('users', 'language');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -536,7 +536,7 @@ class Logbook_model extends CI_Model {
|
||||||
if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) {
|
if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->library('AdifHelper');
|
$CI->load->library('AdifHelper');
|
||||||
$qso = $this->get_qso($last_id)->result();
|
$qso = $this->get_qso($last_id,true)->result();
|
||||||
|
|
||||||
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
||||||
$result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif);
|
$result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif);
|
||||||
|
|
@ -550,7 +550,7 @@ class Logbook_model extends CI_Model {
|
||||||
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
|
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->library('AdifHelper');
|
$CI->load->library('AdifHelper');
|
||||||
$qso = $this->get_qso($last_id)->result();
|
$qso = $this->get_qso($last_id,true)->result();
|
||||||
|
|
||||||
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
||||||
$result = $this->push_qso_to_qrz($result->qrzapikey, $adif);
|
$result = $this->push_qso_to_qrz($result->qrzapikey, $adif);
|
||||||
|
|
@ -564,7 +564,7 @@ class Logbook_model extends CI_Model {
|
||||||
if (isset($result->webadifapikey) && $result->webadifrealtime == 1) {
|
if (isset($result->webadifapikey) && $result->webadifrealtime == 1) {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->library('AdifHelper');
|
$CI->load->library('AdifHelper');
|
||||||
$qso = $this->get_qso($last_id)->result();
|
$qso = $this->get_qso($last_id,true)->result();
|
||||||
|
|
||||||
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
$adif = $CI->adifhelper->getAdifLine($qso[0]);
|
||||||
$result = $this->push_qso_to_webadif(
|
$result = $this->push_qso_to_webadif(
|
||||||
|
|
@ -1446,8 +1446,8 @@ class Logbook_model extends CI_Model {
|
||||||
return $this->db->get();
|
return $this->db->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_qso($id) {
|
function get_qso($id, $trusted = false) {
|
||||||
if ($this->logbook_model->check_qso_is_accessible($id)) {
|
if ($trusted || ($this->logbook_model->check_qso_is_accessible($id))) {
|
||||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
|
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
|
||||||
$this->db->from($this->config->item('table_name'));
|
$this->db->from($this->config->item('table_name'));
|
||||||
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
|
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,9 @@ class User_Model extends CI_Model {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function: check_email_address
|
* Function: check_email_address
|
||||||
*
|
*
|
||||||
* Checks if an email address is already in use
|
* Checks if an email address is already in use
|
||||||
*
|
*
|
||||||
* @param string $email
|
* @param string $email
|
||||||
*/
|
*/
|
||||||
function check_email_address($email) {
|
function check_email_address($email) {
|
||||||
|
|
@ -68,7 +68,7 @@ class User_Model extends CI_Model {
|
||||||
|
|
||||||
$this->db->where('user_email', $clean_email);
|
$this->db->where('user_email', $clean_email);
|
||||||
$query = $this->db->get($this->config->item('auth_table'));
|
$query = $this->db->get($this->config->item('auth_table'));
|
||||||
|
|
||||||
if ($query->num_rows() > 0) {
|
if ($query->num_rows() > 0) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -80,7 +80,7 @@ class User_Model extends CI_Model {
|
||||||
$this->db->where('station_id', $station_id);
|
$this->db->where('station_id', $station_id);
|
||||||
$this->db->join('station_profile', 'station_profile.user_id = '.$this->config->item('auth_table').'.user_id');
|
$this->db->join('station_profile', 'station_profile.user_id = '.$this->config->item('auth_table').'.user_id');
|
||||||
$query = $this->db->get($this->config->item('auth_table'));
|
$query = $this->db->get($this->config->item('auth_table'));
|
||||||
|
|
||||||
$ret = $query->row();
|
$ret = $query->row();
|
||||||
return $ret->user_email;
|
return $ret->user_email;
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ class User_Model extends CI_Model {
|
||||||
$measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup,
|
$measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup,
|
||||||
$user_pota_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5,
|
$user_pota_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5,
|
||||||
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
|
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
|
||||||
$user_gridmap_default_band, $user_gridmap_confirmation) {
|
$user_gridmap_default_band, $user_gridmap_confirmation, $language) {
|
||||||
// Check that the user isn't already used
|
// Check that the user isn't already used
|
||||||
if(!$this->exists($username)) {
|
if(!$this->exists($username)) {
|
||||||
$data = array(
|
$data = array(
|
||||||
|
|
@ -156,6 +156,7 @@ class User_Model extends CI_Model {
|
||||||
'user_mastodon_url' => xss_clean($user_mastodon_url),
|
'user_mastodon_url' => xss_clean($user_mastodon_url),
|
||||||
'user_gridmap_default_band' => xss_clean($user_gridmap_default_band),
|
'user_gridmap_default_band' => xss_clean($user_gridmap_default_band),
|
||||||
'user_gridmap_confirmation' => xss_clean($user_gridmap_confirmation),
|
'user_gridmap_confirmation' => xss_clean($user_gridmap_confirmation),
|
||||||
|
'language' => xss_clean($language),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check the password is valid
|
// Check the password is valid
|
||||||
|
|
@ -216,6 +217,7 @@ class User_Model extends CI_Model {
|
||||||
'user_mastodon_url' => xss_clean($fields['user_mastodon_url']),
|
'user_mastodon_url' => xss_clean($fields['user_mastodon_url']),
|
||||||
'user_gridmap_default_band' => xss_clean($fields['user_gridmap_default_band']),
|
'user_gridmap_default_band' => xss_clean($fields['user_gridmap_default_band']),
|
||||||
'user_gridmap_confirmation' => (isset($fields['user_gridmap_confirmation_qsl']) ? 'Q' : '').(isset($fields['user_gridmap_confirmation_lotw']) ? 'L' : '').(isset($fields['user_gridmap_confirmation_eqsl']) ? 'E' : ''),
|
'user_gridmap_confirmation' => (isset($fields['user_gridmap_confirmation_qsl']) ? 'Q' : '').(isset($fields['user_gridmap_confirmation_lotw']) ? 'L' : '').(isset($fields['user_gridmap_confirmation_eqsl']) ? 'E' : ''),
|
||||||
|
'language' => xss_clean($fields['language']),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check to see if the user is allowed to change user levels
|
// Check to see if the user is allowed to change user levels
|
||||||
|
|
@ -340,6 +342,7 @@ class User_Model extends CI_Model {
|
||||||
'user_gridmap_default_band' => $u->row()->user_gridmap_default_band,
|
'user_gridmap_default_band' => $u->row()->user_gridmap_default_band,
|
||||||
'user_gridmap_confirmation' => $u->row()->user_gridmap_confirmation,
|
'user_gridmap_confirmation' => $u->row()->user_gridmap_confirmation,
|
||||||
'active_station_logbook' => $u->row()->active_station_logbook,
|
'active_station_logbook' => $u->row()->active_station_logbook,
|
||||||
|
'language' => isset($u->row()->language) ? $u->row()->language: 'english',
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->session->set_userdata($userdata);
|
$this->session->set_userdata($userdata);
|
||||||
|
|
@ -440,7 +443,7 @@ class User_Model extends CI_Model {
|
||||||
*
|
*
|
||||||
* Stores generated password reset code in the database and sets the date to exactly
|
* Stores generated password reset code in the database and sets the date to exactly
|
||||||
* when the sql query runs.
|
* when the sql query runs.
|
||||||
*
|
*
|
||||||
* @param string $user_email
|
* @param string $user_email
|
||||||
* @return string $reset_code
|
* @return string $reset_code
|
||||||
*/
|
*/
|
||||||
|
|
@ -449,7 +452,7 @@ class User_Model extends CI_Model {
|
||||||
'reset_password_code' => $reset_code,
|
'reset_password_code' => $reset_code,
|
||||||
'reset_password_date' => date('Y-m-d H:i:s')
|
'reset_password_date' => date('Y-m-d H:i:s')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->db->where('user_email', $user_email);
|
$this->db->where('user_email', $user_email);
|
||||||
$this->db->update('users', $data);
|
$this->db->update('users', $data);
|
||||||
}
|
}
|
||||||
|
|
@ -458,7 +461,7 @@ class User_Model extends CI_Model {
|
||||||
* FUNCTION: reset_password
|
* FUNCTION: reset_password
|
||||||
*
|
*
|
||||||
* Sets new password for users account where the reset code matches then clears the password reset code and password reset date.
|
* Sets new password for users account where the reset code matches then clears the password reset code and password reset date.
|
||||||
*
|
*
|
||||||
* @param string $password
|
* @param string $password
|
||||||
* @return string $reset_code
|
* @return string $reset_code
|
||||||
*/
|
*/
|
||||||
|
|
@ -468,7 +471,7 @@ class User_Model extends CI_Model {
|
||||||
'reset_password_code' => NULL,
|
'reset_password_code' => NULL,
|
||||||
'reset_password_date' => NULL
|
'reset_password_date' => NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->db->where('reset_password_code', $reset_code);
|
$this->db->where('reset_password_code', $reset_code);
|
||||||
$this->db->update('users', $data);
|
$this->db->update('users', $data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,57 +1,78 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<br>
|
<br>
|
||||||
<?php if($this->session->flashdata('message')) { ?>
|
<?php if($this->session->flashdata('message')) { ?>
|
||||||
<!-- Display Message -->
|
<!-- Display Message -->
|
||||||
<div class="alert-message error">
|
<div class="alert-message error">
|
||||||
<p><?php echo $this->session->flashdata('message'); ?></p>
|
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<h2><?php echo $page_title; ?></h2>
|
<h2><?php echo $page_title; ?></h2>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card" style="margin-bottom: 15px;">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
Maintenance
|
QSO-DB Maintenance
|
||||||
</div>
|
</div>
|
||||||
<?php if($is_there_qsos_with_no_station_id >= 1) { ?>
|
<?php if($is_there_qsos_with_no_station_id >= 1) { ?>
|
||||||
<div class="alert alert-danger" role="alert">
|
<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;">
|
||||||
<span class="badge badge-pill badge-warning">Warning</span> The Database contains QSOs without a station-profile (location)<br/>
|
<span class="badge badge-pill badge-warning">Warning</span> The Database contains QSOs without a station-profile (location)<br/>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="card-text">Please reassign those QSOs to an existing station location:</p>
|
<p class="card-text">Please reassign those QSOs to an existing station location:</p>
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="station_locations_table" class="table table-sm table-striped">
|
<table id="station_locations_table" class="table table-sm table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Call</th>
|
<th scope="col">Call</th>
|
||||||
<th scope="col">Target Location</th>
|
<th scope="col">Target Location</th>
|
||||||
<th scope="col">Reassign</th>
|
<th scope="col">Reassign</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($calls_wo_sid as $call) {
|
foreach ($calls_wo_sid as $call) {
|
||||||
echo '<tr><td>'.$call['COL_STATION_CALLSIGN'].'</td><td><select name="station_profile" id="station_profile">';
|
echo '<tr><td>'.$call['COL_STATION_CALLSIGN'].'</td><td><select name="station_profile" id="station_profile">';
|
||||||
$options='';
|
$options='';
|
||||||
foreach ($stations->result() as $station) {
|
foreach ($stations->result() as $station) {
|
||||||
$options.='<option value='.$station->station_id.'>'.$station->station_profile_name.' ('.$station->station_callsign.')</option>';
|
$options.='<option value='.$station->station_id.'>'.$station->station_profile_name.' ('.$station->station_callsign.')</option>';
|
||||||
}
|
}
|
||||||
echo $options.'</select></td><td><button class="btn btn-warning" onClick="reassign(\''.$call['COL_STATION_CALLSIGN'].'\',$(\'#station_profile option:selected\').val());"><i class="fas fa-sync"></i>Reassign</a></button></td></tr>';
|
echo $options.'</select></td><td><button class="btn btn-warning" onClick="reassign(\''.$call['COL_STATION_CALLSIGN'].'\',$(\'#station_profile option:selected\').val());"><i class="fas fa-sync"></i>Reassign</a></button></td></tr>';
|
||||||
} ?>
|
} ?>
|
||||||
</tbody></table>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
} else { ?>
|
<?php
|
||||||
<div class="alert alert-secondary" role="alert">
|
} else { ?>
|
||||||
<span class="badge badge-pill badge-success">Everything ok</span> Every QSO in your Database is assigned to a station-profile (location)
|
<div class="alert alert-secondary" role="alert" style="margin-bottom: 0px !important;">
|
||||||
</div>
|
<span class="badge badge-pill badge-success">Everything ok</span> Every QSO in your Database is assigned to a station-profile (location)
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Settings Maintenance
|
||||||
|
</div>
|
||||||
|
<?php if(!$this->config->item('cl_multilanguage')) { ?>
|
||||||
|
<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;">
|
||||||
|
<span class="badge badge-pill badge-warning">Warning</span> You didn't enabled Multilanguage support in your config.php
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<p class="card-text">Please edit your ./application/config/config.php File and add some rows to it:</br></br>
|
||||||
|
Go to your application/config Folder and compare config.sample.php with your config.php</br>
|
||||||
|
You'll probably find a block with language-settings. Please include this block into your current config.php
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else { ?>
|
||||||
|
<div class="alert alert-secondary" role="alert" style="margin-bottom: 0px !important;">
|
||||||
|
<span class="badge badge-pill badge-success">Everything ok</span> You have enabled Multuser-Language support
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -518,7 +518,7 @@
|
||||||
<div id="qsomap" style="width: 100%; height: 200px;"></div>
|
<div id="qsomap" style="width: 100%; height: 200px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="winkey" class="card winkey-settings">
|
<div id="winkey" class="card winkey-settings" style="margin-bottom: 10px;">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4 style="font-size: 16px; font-weight: bold;" class="card-title">Winkey
|
<h4 style="font-size: 16px; font-weight: bold;" class="card-title">Winkey
|
||||||
|
|
||||||
|
|
@ -533,8 +533,9 @@
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="winkey_buttons" class="card-body">
|
|
||||||
<div id="modals-here"></div>
|
<div id="modals-here"></div>
|
||||||
|
|
||||||
|
<div id="winkey_buttons" class="card-body">
|
||||||
<button id="morsekey_func1" onclick="morsekey_func1()" class="btn btn-warning">F1</button>
|
<button id="morsekey_func1" onclick="morsekey_func1()" class="btn btn-warning">F1</button>
|
||||||
<button id="morsekey_func2" onclick="morsekey_func2()" class="btn btn-warning">F2</button>
|
<button id="morsekey_func2" onclick="morsekey_func2()" class="btn btn-warning">F2</button>
|
||||||
<button id="morsekey_func3" onclick="morsekey_func3()" class="btn btn-warning">F3</button>
|
<button id="morsekey_func3" onclick="morsekey_func3()" class="btn btn-warning">F3</button>
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,18 @@
|
||||||
</select>
|
</select>
|
||||||
<small id="user_measurement_base_Help" class="form-text text-muted"><?php echo lang('account_choose_which_unit_distances_will_be_shown_in'); ?></small>
|
<small id="user_measurement_base_Help" class="form-text text-muted"><?php echo lang('account_choose_which_unit_distances_will_be_shown_in'); ?></small>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($this->config->item('cl_multilanguage')) { ?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="language">Cloudlog Language</label>
|
||||||
|
<?php
|
||||||
|
foreach($existing_languages as $lang){
|
||||||
|
$options[$lang] = ucfirst($lang);
|
||||||
|
}
|
||||||
|
echo form_dropdown('language', $options, $language);
|
||||||
|
?>
|
||||||
|
<small id="language_Help" class="form-text text-muted">Choose Cloudlog language.</small>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,11 @@
|
||||||
$levels = $this->config->item('auth_level');
|
$levels = $this->config->item('auth_level');
|
||||||
foreach ($levels as $key => $value) {
|
foreach ($levels as $key => $value) {
|
||||||
echo '<option value="'. $key . '"';
|
echo '<option value="'. $key . '"';
|
||||||
if($user_type == $key) {
|
if($user_type == $key) {
|
||||||
echo "selected=\"selected\"";
|
echo "selected=\"selected\"";
|
||||||
}
|
}
|
||||||
echo '>' . $value . '</option>';
|
echo '>' . $value . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php } else {
|
<?php } else {
|
||||||
|
|
@ -191,6 +191,19 @@
|
||||||
</select>
|
</select>
|
||||||
<small id="user_measurement_base_Help" class="form-text text-muted"><?php echo lang('account_choose_which_unit_distances_will_be_shown_in'); ?></small>
|
<small id="user_measurement_base_Help" class="form-text text-muted"><?php echo lang('account_choose_which_unit_distances_will_be_shown_in'); ?></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if ($this->config->item('cl_multilanguage')) { ?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="language">Cloudlog Language</label>
|
||||||
|
<?php
|
||||||
|
foreach($existing_languages as $lang){
|
||||||
|
$options[$lang] = ucfirst($lang);
|
||||||
|
}
|
||||||
|
echo form_dropdown('language', $options, $language);
|
||||||
|
?>
|
||||||
|
<small id="language_Help" class="form-text text-muted">Choose Cloudlog language.</small>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
// Lets see if CW is selected
|
// Lets see if CW is selected
|
||||||
const ModeSelected = document.getElementById('mode');
|
const ModeSelected = document.getElementById('mode');
|
||||||
|
|
||||||
|
$('#winkey_buttons').hide();
|
||||||
|
|
||||||
if (location.protocol == 'http:') {
|
if (location.protocol == 'http:') {
|
||||||
// Do something if the page is being served over SSL
|
// Do something if the page is being served over SSL
|
||||||
$('#winkey').hide(); // Hide the CW buttons
|
$('#winkey').hide(); // Hide the CW buttons
|
||||||
|
|
@ -96,6 +98,11 @@ navigator.serial.addEventListener('disconnect', e => {
|
||||||
connectButton.innerText = "Connect"
|
connectButton.innerText = "Connect"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let debug = 0;
|
||||||
|
let speed = 24;
|
||||||
|
let minSpeed = 20;
|
||||||
|
let maxSpeed = 40;
|
||||||
|
|
||||||
//Connect to the serial
|
//Connect to the serial
|
||||||
async function connect() {
|
async function connect() {
|
||||||
|
|
||||||
|
|
@ -111,7 +118,7 @@ async function connect() {
|
||||||
|
|
||||||
// - Wait for the port to open.
|
// - Wait for the port to open.
|
||||||
await port.open({ baudRate: 1200 });
|
await port.open({ baudRate: 1200 });
|
||||||
await port.setSignals({ requestToSend: true });
|
await port.setSignals({ dataTerminalReady: true });
|
||||||
|
|
||||||
statusBar.innerText = "Connected";
|
statusBar.innerText = "Connected";
|
||||||
connectButton.innerText = "Disconnect"
|
connectButton.innerText = "Disconnect"
|
||||||
|
|
@ -123,6 +130,11 @@ async function connect() {
|
||||||
const encoder = new TextEncoderStream();
|
const encoder = new TextEncoderStream();
|
||||||
outputDone = encoder.readable.pipeTo(port.writable);
|
outputDone = encoder.readable.pipeTo(port.writable);
|
||||||
outputStream = encoder.writable;
|
outputStream = encoder.writable;
|
||||||
|
|
||||||
|
writeToByte("0x00, 0x02");
|
||||||
|
writeToByte("0x02, 0x00");
|
||||||
|
|
||||||
|
$('#winkey_buttons').show();
|
||||||
|
|
||||||
reader = inputStream.getReader();
|
reader = inputStream.getReader();
|
||||||
readLoop();
|
readLoop();
|
||||||
|
|
@ -145,6 +157,13 @@ async function writeToStream(line) {
|
||||||
writer.releaseLock();
|
writer.releaseLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function writeToByte(line) {
|
||||||
|
const writer = outputStream.getWriter();
|
||||||
|
const data = new Uint8Array([line]);
|
||||||
|
writer.write(line);
|
||||||
|
writer.releaseLock();
|
||||||
|
}
|
||||||
|
|
||||||
//Disconnect from the Serial port
|
//Disconnect from the Serial port
|
||||||
async function disconnect() {
|
async function disconnect() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,8 +153,62 @@ $config['url_suffix'] = '';
|
||||||
| there is an available translation if you intend to use something other
|
| there is an available translation if you intend to use something other
|
||||||
| than english.
|
| than english.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['language'] = 'english';
|
$lang = 'english'; // this language will be used per default
|
||||||
|
|
||||||
|
if (isset($_COOKIE["language"])) {
|
||||||
|
$tmp_value = $_COOKIE["language"];
|
||||||
|
if (!empty($tmp_value)) { $lang = $tmp_value; }
|
||||||
|
}
|
||||||
|
switch ($lang) { // do this for security-reasons! parse only langs, which are known to us
|
||||||
|
case 'dutch':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'chinese_simplified':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'spanish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'czech':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'bulgarian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'turkish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'swedish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'polish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'italian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'greek':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'french':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'finnish':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'russian':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'english':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
case 'german':
|
||||||
|
$config['language'] = $lang;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$config['cl_multilanguage']=true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用