Merge branch 'dev' of https://github.com/magicbug/Cloudlog
这个提交包含在:
当前提交
a8df9fd52a
共有 43 个文件被更改,包括 293 次插入 和 153 次删除
|
|
@ -188,7 +188,7 @@ class Contesting extends CI_Controller {
|
|||
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest);
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if ($result->num_rows()) {
|
||||
if ($result && $result->num_rows()) {
|
||||
echo json_encode(array('message' => 'Worked before'));
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,69 +1,65 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Debug extends CI_Controller {
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$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'); }
|
||||
}
|
||||
|
||||
/* User Facing Links to Backup URLs */
|
||||
public function index()
|
||||
{
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
}
|
||||
|
||||
/* User Facing Links to Backup URLs */
|
||||
public function index()
|
||||
{
|
||||
$this->load->helper('file');
|
||||
|
||||
$this->load->model('MigrationVersion');
|
||||
|
||||
$data['migration_version'] = $this->MigrationVersion->getMigrationVersion();
|
||||
|
||||
// Test writing to backup folder
|
||||
if ( ! write_file('backup/myfile.txt', "dummydata"))
|
||||
{
|
||||
$data['backup_folder'] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(unlink(realpath('backup/myfile.txt'))) {
|
||||
$data['backup_folder'] = true;
|
||||
} else {
|
||||
$data['backup_folder'] = false;
|
||||
}
|
||||
}
|
||||
$backup_folder = $this->is_really_writable('backup');
|
||||
$data['backup_folder'] = $backup_folder;
|
||||
|
||||
// Test writing to updates folder
|
||||
if ( ! write_file('updates/myfile.txt', "dummydata"))
|
||||
{
|
||||
$data['updates_folder'] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(unlink(realpath('updates/myfile.txt'))) {
|
||||
$data['updates_folder'] = true;
|
||||
} else {
|
||||
$data['updates_folder'] = false;
|
||||
}
|
||||
}
|
||||
$updates_folder = $this->is_really_writable('updates');
|
||||
$data['updates_folder'] = $updates_folder;
|
||||
|
||||
// Test writing to uploads folder
|
||||
if ( ! write_file('uploads/myfile.txt', "dummydata"))
|
||||
{
|
||||
$data['uploads_folder'] = false;
|
||||
$uploads_folder = $this->is_really_writable('uploads');
|
||||
$data['uploads_folder'] = $uploads_folder;
|
||||
|
||||
$data['page_title'] = "Debug";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('debug/main');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
private function is_really_writable($folder)
|
||||
{
|
||||
// Get the absolute path to the folder
|
||||
$path = FCPATH . $folder;
|
||||
|
||||
// Check if the folder exists
|
||||
if (!file_exists($path)) {
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(unlink(realpath('uploads/myfile.txt'))) {
|
||||
$data['uploads_folder'] = true;
|
||||
} else {
|
||||
$data['uploads_folder'] = false;
|
||||
|
||||
// Check if the folder is writable
|
||||
if (is_writable($path)) {
|
||||
// Check if the subdirectories are writable (recursive check)
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
|
||||
foreach ($iterator as $item) {
|
||||
if (!is_writable($item->getPathname())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['page_title'] = "Debug";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('debug/main');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -207,3 +207,5 @@ $lang['southamerica'] = 'Jižní Amerika';
|
|||
|
||||
$lang['gen_band_selection'] = 'Výběr pásma';
|
||||
$lang['general_word_today'] = 'Dnes';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -210,3 +210,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -210,3 +210,5 @@ $lang['dashboard_php_version_warning'] = 'Die PHP Version is zu alt. Benötigt w
|
|||
$lang['dashboard_country_files_warning'] = 'Die Länderlisten müssen aktualisiert werden! Klicke <a href="'.site_url('update').'">hier</a>, um das zu tun!';
|
||||
$lang['dashboard_locations_warning'] = 'Ea wurde kein Stationsstandort angelegt! Klicke <a href="'. site_url('station') . '">hier</a>, um das zu tun!';
|
||||
$lang['dashboard_logbooks_warning'] = 'Es wurde kein Stationslogbuch angelegt. Klicke <a href="'. site_url('logbooks') . '">hier</a>, um das zu tun!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'Keine bevorstehenden Aktivierungen gefunden. Bitte später noch einmal vorbeischauen.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Stationsstandort nicht ausgewählt";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Feld ist leer";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warnung! Willst du wirklich alles zurücksetzen?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warnung! Du kannst die QSO Liste nicht loggen, da bei manchen QSO das Band und/oder der Mode fehlt!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warnung! Du kannst die QSO Liste nicht loggen, da bei manchen QSO die Zeit fehlt!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Achtung! Das Daten Feld enthält Beispiel Daten. Lösche zuerst die QSO Daten!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Bist du dir sicher, dass du diese QSO loggen und die Eingabe zurücksetzen willst?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO geloggt!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -207,3 +207,5 @@ $lang['southamerica'] = 'South America';
|
|||
|
||||
$lang['gen_band_selection'] = 'Band selection';
|
||||
$lang['general_word_today'] = 'Today';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -213,3 +213,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -213,3 +213,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -212,3 +212,5 @@ $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version.
|
|||
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
|
||||
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
|
||||
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
|
||||
|
||||
$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang['qso_simplefle_error_stationcall'] = "Station Call is not selected";
|
|||
$lang['qso_simplefle_error_operator'] = "'Operator' Field is empty";
|
||||
$lang['qso_simplefle_warning_reset'] = "Warning! Do you really want to reset everything?";
|
||||
$lang['qso_simplefle_warning_missing_band_mode'] = "Warning! You can't log the QSO List, because some QSO don't have band and/or mode defined!";
|
||||
$lang['qso_simplefle_warning_missing_time'] = "Warning! You can't log the QSO List, because some QSO don't have a time defined!";
|
||||
$lang['qso_simplefle_warning_example_data'] = "Attention! The Data Field containes example data. First Clear Logging Session!";
|
||||
$lang['qso_simplefle_confirm_save_to_log'] = "Are you sure that you want to add these QSO to the Log and clear the session?";
|
||||
$lang['qso_simplefle_success_save_to_log_header'] = "QSO Logged!";
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Bands extends CI_Model {
|
|||
$results = array();
|
||||
|
||||
foreach($result as $band) {
|
||||
$results['b'.strtoupper($band->band)] = array('cw' => $band->cw, 'ssb' => $band->ssb, 'digi' => $band->data);
|
||||
$results['b'.strtoupper($band->band)] = array('CW' => $band->cw, 'SSB' => $band->ssb, 'DIGI' => $band->data);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class Contesting_model extends CI_Model {
|
|||
|
||||
$contest_session = $this->getSession();
|
||||
|
||||
if ($contest_session) {
|
||||
if ($contest_session && $contest_session->qso != "") {
|
||||
$qsoarray = explode(',', $contest_session->qso);
|
||||
|
||||
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
|
||||
|
|
|
|||
|
|
@ -289,10 +289,10 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
// Decide whether its single gridsquare or a multi which makes it vucc_grids
|
||||
if (strpos(trim($this->input->post('locator')), ',') !== false) {
|
||||
$data['COL_VUCC_GRIDS'] = strtoupper(trim($this->input->post('locator')));
|
||||
if (strpos(trim(xss_clean($this->input->post('locator')) ?? ''), ',') !== false) {
|
||||
$data['COL_VUCC_GRIDS'] = strtoupper(trim(xss_clean($this->input->post('locator')) ?? ''));
|
||||
} else {
|
||||
$data['COL_GRIDSQUARE'] = strtoupper(trim($this->input->post('locator')));
|
||||
$data['COL_GRIDSQUARE'] = strtoupper(trim(xss_clean($this->input->post('locator')) ?? ''));
|
||||
}
|
||||
|
||||
// if eQSL username set, default SENT & RCVD to 'N' else leave as null
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
class MigrationVersion extends CI_Model {
|
||||
|
||||
function getMigrationVersion() {
|
||||
$this->db->select_max('version');
|
||||
$query = $this->db->get('migrations');
|
||||
$migration_version = $query->row();
|
||||
|
||||
if ($query->num_rows() == 1) {
|
||||
$migration_version = $query->row()->version;
|
||||
return $migration_version;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -2,12 +2,18 @@
|
|||
|
||||
<h2>Hamsat - Satellite Rovers</h2>
|
||||
<p>This data is from <a target="_blank" href="https://hams.at/">https://hams.at/</a></p>
|
||||
<?php if ($rovedata == []) { ?>
|
||||
<div class="alert alert-warning" role="warning">
|
||||
<?php echo lang('hams_at_no_activations_found');?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
<th>Callsign</th>
|
||||
<th>Comment</th>
|
||||
<th>Satellite</th>
|
||||
<th>Gridsquare(s)</th>
|
||||
<th></th>
|
||||
|
|
@ -44,13 +50,16 @@
|
|||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$CI->load->model('logbook_model');
|
||||
$call_worked = $CI->logbook_model->check_if_callsign_worked_in_logbook($rove['callsign'], $logbooks_locations_array, "SAT");
|
||||
echo " <span data-toggle=\"tooltip\" title=\"".$rove['comment']."\">";
|
||||
if ($call_worked != 0) {
|
||||
echo "<span class=\"text-success\">".$rove['callsign']."</span>";
|
||||
} else {
|
||||
echo $rove['callsign'];
|
||||
}
|
||||
echo "</span></td>";
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
echo xss_clean($rove['comment']);
|
||||
?>
|
||||
</td>
|
||||
<td><span data-toggle="tooltip" title="<?php echo $rove['frequency']; ?> - <?php echo $rove['mode']; ?>"><?= $rove['satellite'] ?></span></td>
|
||||
|
|
@ -87,4 +96,5 @@
|
|||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
<td>Base URL</td>
|
||||
<td><span id="baseUrl"><a href="<?php echo $this->config->item('base_url')?>" target="_blank"><?php echo $this->config->item('base_url'); ?></a></span> <span data-toggle="tooltip" data-original-title="<?php echo lang('copy_to_clipboard'); ?>" onclick='copyURL("<?php echo $this->config->item('base_url'); ?>")'><i class="copy-icon fas fa-copy"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Migration</td>
|
||||
<td><?php echo (isset($migration_version) ? $migration_version : "<span class='badge badge-danger'>There is something wrong with your Migration in Database!</span>"); ?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -924,8 +924,8 @@ function searchButtonPress(){
|
|||
|
||||
$(document).ready(function(){
|
||||
|
||||
<?php if($this->input->post('searchBar') != "") { ?>
|
||||
$('#partial_view').load("logbook/search_result/<?php echo str_replace("Ø","0",$this->input->post('searchBar')); ?>", function() {
|
||||
<?php if($this->input->post('callsign') != "") { ?>
|
||||
$('#partial_view').load("logbook/search_result/<?php echo str_replace("Ø","0",$this->input->post('callsign')); ?>", function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
});
|
||||
<?php } ?>
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@
|
|||
if (localStorage.getItem("quicklogCallsign") !== "") {
|
||||
localStorage.removeItem("quicklogCallsign");
|
||||
}
|
||||
localStorage.setItem("quicklogCallsign", $("input[name='searchBar']").val());
|
||||
localStorage.setItem("quicklogCallsign", $("input[name='callsign']").val());
|
||||
window.open("<?php echo site_url('qso?manual=0'); ?>", "_self");
|
||||
}
|
||||
</script>
|
||||
|
|
@ -266,7 +266,7 @@
|
|||
</script>
|
||||
<?php } ?>
|
||||
<form id="quicklog-form" class="form-inline" onsubmit="return false;">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="text" name="searchBar" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Quicklog" onkeypress="handleKeyPress(event)">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="text" name="callsign" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Quicklog" onkeypress="handleKeyPress(event)">
|
||||
|
||||
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="logQuicklog()"><i class="fas fa-plus"></i>
|
||||
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button_qicksearch_log'); ?></div>
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
</form>
|
||||
<?php } else { ?>
|
||||
<form method="post" action="<?php echo site_url('search'); ?>" class="form-inline">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="searchBar" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
|
||||
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i>
|
||||
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<div class="form-group row">
|
||||
<label for="callsign" class="col-sm-2 col-form-label">Callsign / Gridsquare</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="callsign" value="<?php if ($this->input->post('searchBar') !== null) { echo htmlspecialchars($this->input->post('searchBar')); }; ?>">
|
||||
<input type="text" class="form-control" id="callsign" value="<?php if ($this->input->post('callsign') !== null) { echo htmlspecialchars($this->input->post('callsign')); }; ?>">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button onclick="searchButtonPress()" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> Search</button>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
var lang_qso_simplefle_error_operator = "<?php echo lang('qso_simplefle_error_operator'); ?>";
|
||||
var lang_qso_simplefle_warning_reset = "<?php echo lang('qso_simplefle_warning_reset'); ?>";
|
||||
var lang_qso_simplefle_warning_missing_band_mode = "<?php echo lang('qso_simplefle_warning_missing_band_mode'); ?>";
|
||||
var lang_qso_simplefle_warning_missing_time = "<?php echo lang('qso_simplefle_warning_missing_time'); ?>";
|
||||
var lang_qso_simplefle_warning_example_data = "<?php echo lang('qso_simplefle_warning_example_data'); ?>";
|
||||
var lang_qso_simplefle_confirm_save_to_log = "<?php echo lang('qso_simplefle_confirm_save_to_log'); ?>";
|
||||
var lang_qso_simplefle_success_save_to_log_header = "<?php echo lang('qso_simplefle_success_save_to_log_header'); ?>";
|
||||
|
|
@ -72,7 +73,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-lg-12 col-xl-6">
|
||||
<label for="utc-time"><?php echo lang('qso_simplefle_utc_time'); ?></label>
|
||||
<p><?php echo lang('qso_simplefle_utc_time'); ?></p>
|
||||
<h4 class="font-weight-bold" id="utc-time"></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,25 +8,25 @@ var callsign = "";
|
|||
var errors = [];
|
||||
var qsoList = [];
|
||||
|
||||
$('#simpleFleInfoButton').click(function (event) {
|
||||
var awardInfoLines = [
|
||||
lang_qso_simplefle_info_ln2,
|
||||
lang_qso_simplefle_info_ln3,
|
||||
lang_qso_simplefle_info_ln4
|
||||
];
|
||||
var simpleFleInfo = "";
|
||||
awardInfoLines.forEach(function (line) {
|
||||
simpleFleInfo += line + "<br><br>";
|
||||
});
|
||||
BootstrapDialog.alert({
|
||||
title: "<h4>"+lang_qso_simplefle_info_ln1+"</h4>",
|
||||
message: simpleFleInfo,
|
||||
});
|
||||
$("#simpleFleInfoButton").click(function (event) {
|
||||
var awardInfoLines = [
|
||||
lang_qso_simplefle_info_ln2,
|
||||
lang_qso_simplefle_info_ln3,
|
||||
lang_qso_simplefle_info_ln4,
|
||||
];
|
||||
var simpleFleInfo = "";
|
||||
awardInfoLines.forEach(function (line) {
|
||||
simpleFleInfo += line + "<br><br>";
|
||||
});
|
||||
BootstrapDialog.alert({
|
||||
title: "<h4>" + lang_qso_simplefle_info_ln1 + "</h4>",
|
||||
message: simpleFleInfo,
|
||||
});
|
||||
});
|
||||
|
||||
$('#js-syntax').click(function (event) {
|
||||
$('#js-syntax').prop("disabled", false);
|
||||
$.ajax({
|
||||
$("#js-syntax").click(function (event) {
|
||||
$("#js-syntax").prop("disabled", false);
|
||||
$.ajax({
|
||||
url: base_url + "index.php/simplefle/displaySyntax",
|
||||
type: "post",
|
||||
success: function (html) {
|
||||
|
|
@ -123,23 +123,25 @@ function handleInput() {
|
|||
var rst_r = null;
|
||||
items = row.startsWith("day ") ? [row] : row.split(" ");
|
||||
var itemNumber = 0;
|
||||
var freq = 0;
|
||||
items.forEach((item) => {
|
||||
if (item === "") {
|
||||
return;
|
||||
}
|
||||
if (item.trim().match(/^day (\+)+$/)) {
|
||||
var plusCount = item.match(/\+/g).length;
|
||||
var originalDate = new Date(extraQsoDate);;
|
||||
console.log(plusCount)
|
||||
var originalDate = new Date(extraQsoDate);
|
||||
originalDate.setDate(originalDate.getDate() + plusCount);
|
||||
extraQsoDate = originalDate.toISOString().split("T")[0];
|
||||
} else if (item.match(/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/)) {
|
||||
extraQsoDate = item;
|
||||
} else if (
|
||||
item.match(/^[0-2][0-9][0-5][0-9]$/)
|
||||
item.match(/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/)
|
||||
) {
|
||||
extraQsoDate = item;
|
||||
} else if (item.match(/^[0-2][0-9][0-5][0-9]$/)) {
|
||||
qsotime = item;
|
||||
} else if (item.match(/^CW$|^SSB$|^FM$|^AM$|^PSK$|^FT8$/i)) {
|
||||
} else if (
|
||||
item.match(/^CW$|^SSB$|^LSB$|^USB$|^FM$|^AM$|^PSK$|^FT8$/i)
|
||||
) {
|
||||
mode = item.toUpperCase();
|
||||
} else if (
|
||||
item.match(/^[0-9]{1,4}(?:m|cm|mm)$/) ||
|
||||
|
|
@ -164,13 +166,13 @@ function handleInput() {
|
|||
qsotime = qsotime.slice(0, -2) + item;
|
||||
} else if (
|
||||
item.match(
|
||||
/^[A-Z0-9]{1,3}\/[A-Z]{2}-\d{3}|[AENOS]*[FNSUACA]-\d{3}|(?!.*FF)[A-Z0-9]{1,3}-\d{4}|[A-Z0-9]{1,3}[F]{2}-\d{4}$/i
|
||||
/^[A-Z0-9]{1,3}\/[A-Z]{2}-\d{3}|[AENOS]*[FNSUACA]-\d{3}|(?!.*FF)[A-Z0-9]{1,3}-\d{4,5}|[A-Z0-9]{1,3}[F]{2}-\d{4}$/i,
|
||||
)
|
||||
) {
|
||||
sotaWwff = item.toUpperCase();
|
||||
} else if (
|
||||
item.match(
|
||||
/([a-zA-Z0-9]{1,3}[0123456789][a-zA-Z0-9]{0,3}[a-zA-Z])|.*\/([a-zA-Z0-9]{1,3}[0123456789][a-zA-Z0-9]{0,3}[a-zA-Z])|([a-zA-Z0-9]{1,3}[0123456789][a-zA-Z0-9]{0,3}[a-zA-Z])\/.*/
|
||||
/([a-zA-Z0-9]{1,3}[0-9][a-zA-Z0-9]{0,3}[a-zA-Z])|.*\/([a-zA-Z0-9]{1,3}[0-9][a-zA-Z0-9]{0,3}[a-zA-Z])|([a-zA-Z0-9]{1,3}[0-9][a-zA-Z0-9]{0,3}[a-zA-Z])\/.*/,
|
||||
)
|
||||
) {
|
||||
callsign = item.toUpperCase();
|
||||
|
|
@ -206,7 +208,9 @@ function handleInput() {
|
|||
}
|
||||
|
||||
if (isValidDate(extraQsoDate) === false) {
|
||||
addErrorMessage(lang_qso_simplefle_error_date + " " + extraQsoDate);
|
||||
addErrorMessage(
|
||||
lang_qso_simplefle_error_date + " " + extraQsoDate,
|
||||
);
|
||||
extraQsoDate = qsodate;
|
||||
}
|
||||
|
||||
|
|
@ -251,14 +255,38 @@ function handleInput() {
|
|||
|
||||
$("#qsoTable > tbody:last-child").append(tableRow);
|
||||
|
||||
localStorage.setItem(`user_${user_id}_tabledata`, $("#qsoTable").html());
|
||||
localStorage.setItem(`user_${user_id}_my-call`, $("#station-call").val());
|
||||
localStorage.setItem(`user_${user_id}_operator`, $("#operator").val());
|
||||
localStorage.setItem(`user_${user_id}_my-sota-wwff`, $("#my-sota-wwff").val());
|
||||
localStorage.setItem(`user_${user_id}_qso-area`, $(".qso-area").val());
|
||||
localStorage.setItem(`user_${user_id}_qsodate`, $("#qsodate").val());
|
||||
localStorage.setItem(`user_${user_id}_my-power`, $("#my-power").val());
|
||||
localStorage.setItem(`user_${user_id}_my-grid`, $("#my-grid").val());
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_tabledata`,
|
||||
$("#qsoTable").html(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_my-call`,
|
||||
$("#station-call").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_operator`,
|
||||
$("#operator").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_my-sota-wwff`,
|
||||
$("#my-sota-wwff").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_qso-area`,
|
||||
$(".qso-area").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_qsodate`,
|
||||
$("#qsodate").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_my-power`,
|
||||
$("#my-power").val(),
|
||||
);
|
||||
localStorage.setItem(
|
||||
`user_${user_id}_my-grid`,
|
||||
$("#my-grid").val(),
|
||||
);
|
||||
|
||||
callsign = "";
|
||||
sotaWwff = "";
|
||||
|
|
@ -272,7 +300,14 @@ function handleInput() {
|
|||
|
||||
var qsoCount = qsoList.length;
|
||||
if (qsoCount) {
|
||||
$(".js-qso-count").html("<strong>" + lang_qso_simplefle_qso_list_total + ":</strong> " + qsoCount + " " + lang_gen_hamradio_qso);
|
||||
$(".js-qso-count").html(
|
||||
"<strong>" +
|
||||
lang_qso_simplefle_qso_list_total +
|
||||
":</strong> " +
|
||||
qsoCount +
|
||||
" " +
|
||||
lang_gen_hamradio_qso,
|
||||
);
|
||||
} else {
|
||||
$(".js-qso-count").html("");
|
||||
}
|
||||
|
|
@ -283,31 +318,31 @@ function handleInput() {
|
|||
}
|
||||
|
||||
function checkMainFieldsErrors() {
|
||||
if ($("#station-call").val() === '-') {
|
||||
$('#warningStationCall').show();
|
||||
$('#station-call').css('border', '2px solid rgb(217, 83, 79)');
|
||||
$('#warningStationCall').text(lang_qso_simplefle_error_stationcall);
|
||||
if ($("#station-call").val() === "-") {
|
||||
$("#warningStationCall").show();
|
||||
$("#station-call").css("border", "2px solid rgb(217, 83, 79)");
|
||||
$("#warningStationCall").text(lang_qso_simplefle_error_stationcall);
|
||||
} else {
|
||||
$('#station-call').css('border', '');
|
||||
$('#warningStationCall').hide();
|
||||
}
|
||||
$("#station-call").css("border", "");
|
||||
$("#warningStationCall").hide();
|
||||
}
|
||||
|
||||
if ($("#operator").val() === "") {
|
||||
$('#warningOperatorField').show();
|
||||
$('#operator').css('border', '2px solid rgb(217, 83, 79)');
|
||||
$('#warningOperatorField').text(lang_qso_simplefle_error_operator);
|
||||
}else {
|
||||
$('#operator').css('border', '');
|
||||
$('#warningOperatorField').hide();
|
||||
}
|
||||
$("#warningOperatorField").show();
|
||||
$("#operator").css("border", "2px solid rgb(217, 83, 79)");
|
||||
$("#warningOperatorField").text(lang_qso_simplefle_error_operator);
|
||||
} else {
|
||||
$("#operator").css("border", "");
|
||||
$("#warningOperatorField").hide();
|
||||
}
|
||||
if ($("textarea").val() === "") {
|
||||
$('#textarea').css('border', '2px solid rgb(217, 83, 79)');
|
||||
setTimeout(function() {
|
||||
$('#textarea').css('border', '');
|
||||
}, 2000);
|
||||
}else {
|
||||
$('#textarea').css('border', '');
|
||||
}
|
||||
$("#textarea").css("border", "2px solid rgb(217, 83, 79)");
|
||||
setTimeout(function () {
|
||||
$("#textarea").css("border", "");
|
||||
}, 2000);
|
||||
} else {
|
||||
$("#textarea").css("border", "");
|
||||
}
|
||||
}
|
||||
|
||||
$textarea.keydown(function (event) {
|
||||
|
|
@ -382,7 +417,6 @@ $(".js-download-qso").click(function () {
|
|||
handleInput();
|
||||
});
|
||||
|
||||
|
||||
function getBandFromFreq(freq) {
|
||||
if (freq > 1.7 && freq < 2) {
|
||||
return "160m";
|
||||
|
|
@ -416,15 +450,23 @@ function getBandFromFreq(freq) {
|
|||
}
|
||||
|
||||
function getFreqFromBand(band, mode) {
|
||||
const settingsMode = getSettingsMode(mode.toUpperCase());
|
||||
const id = "#" + band + settingsMode;
|
||||
if ($(id).length) {
|
||||
return $(id).val();
|
||||
var settingsMode = getSettingsMode(mode.toUpperCase());
|
||||
var settingsBand = "b" + band.toUpperCase();
|
||||
var bandData = Bands[settingsBand];
|
||||
|
||||
if (bandData) {
|
||||
return bandData[settingsMode] / 1000000;
|
||||
}
|
||||
}
|
||||
|
||||
function getSettingsMode(mode) {
|
||||
if (mode === "AM" || mode === "FM" || mode === "SSB") {
|
||||
if (
|
||||
mode === "AM" ||
|
||||
mode === "FM" ||
|
||||
mode === "SSB" ||
|
||||
mode === "LSB" ||
|
||||
mode === "USB"
|
||||
) {
|
||||
return "SSB";
|
||||
}
|
||||
|
||||
|
|
@ -447,7 +489,7 @@ for (const [key, value] of Object.entries(Bands)) {
|
|||
<div class="form-group">
|
||||
<label for="${key.slice(1)}CW">CW</label>
|
||||
<input type="text" class="form-control text-uppercase" id="${key.slice(
|
||||
1
|
||||
1,
|
||||
)}CW" value="${value.cw}">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -455,7 +497,7 @@ for (const [key, value] of Object.entries(Bands)) {
|
|||
<div class="form-group">
|
||||
<label for="${key.slice(1)}SSB">SSB</label>
|
||||
<input type="text" class="form-control text-uppercase" id="${key.slice(
|
||||
1
|
||||
1,
|
||||
)}SSB" value="${value.ssb}">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -463,7 +505,7 @@ for (const [key, value] of Object.entries(Bands)) {
|
|||
<div class="form-group">
|
||||
<label for="${key.slice(1)}DIGI">DIGI</label>
|
||||
<input type="text" class="form-control text-uppercase" id="${key.slice(
|
||||
1
|
||||
1,
|
||||
)}DIGI" value="${value.digi}">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -484,14 +526,23 @@ function isBandModeEntered() {
|
|||
return isBandModeOK;
|
||||
}
|
||||
|
||||
function isTimeEntered() {
|
||||
let isTimeOK = true;
|
||||
qsoList.forEach((item) => {
|
||||
if (item[1] === "") {
|
||||
isTimeOK = false;
|
||||
}
|
||||
});
|
||||
|
||||
return isTimeOK;
|
||||
}
|
||||
|
||||
function isExampleDataEntered() {
|
||||
let isExampleData = false;
|
||||
if (textarea.value.startsWith("*example-data*")) {
|
||||
isExampleData = true;
|
||||
|
||||
};
|
||||
}
|
||||
return isExampleData;
|
||||
|
||||
}
|
||||
|
||||
function getAdifTag(tagName, value) {
|
||||
|
|
@ -544,7 +595,7 @@ function isIOTA(value) {
|
|||
}
|
||||
|
||||
function isPOTA(value) {
|
||||
if (value.match(/^(?!.*FF)[A-Z0-9]{1,3}-\d{4}$/)) {
|
||||
if (value.match(/^(?!.*FF)[A-Z0-9]{1,3}-\d{4,5}$/)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -557,7 +608,6 @@ function isWWFF(value) {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
setInterval(updateUTCTime, 1000);
|
||||
updateUTCTime();
|
||||
|
|
@ -606,10 +656,10 @@ $(document).ready(function () {
|
|||
|
||||
$(".js-save-to-log").click(function () {
|
||||
if ($("textarea").val() === "") {
|
||||
$('#textarea').css('border', '2px solid rgb(217, 83, 79)');
|
||||
setTimeout(function() {
|
||||
$('#textarea').css('border', '');
|
||||
}, 2000);
|
||||
$("#textarea").css("border", "2px solid rgb(217, 83, 79)");
|
||||
setTimeout(function () {
|
||||
$("#textarea").css("border", "");
|
||||
}, 2000);
|
||||
return false;
|
||||
}
|
||||
if (false === isBandModeEntered()) {
|
||||
|
|
@ -623,6 +673,17 @@ $(".js-save-to-log").click(function () {
|
|||
});
|
||||
return false;
|
||||
}
|
||||
if (false === isTimeEntered()) {
|
||||
BootstrapDialog.alert({
|
||||
title: lang_general_word_warning,
|
||||
message: lang_qso_simplefle_warning_missing_time,
|
||||
type: BootstrapDialog.TYPE_DANGER,
|
||||
btnCancelLabel: lang_general_word_cancel,
|
||||
btnOKLabel: lang_general_word_ok,
|
||||
btnOKClass: "btn-warning",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (true === isExampleDataEntered()) {
|
||||
BootstrapDialog.alert({
|
||||
title: lang_general_word_warning,
|
||||
|
|
@ -633,13 +694,11 @@ $(".js-save-to-log").click(function () {
|
|||
btnOKClass: "btn-warning",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
handleInput();
|
||||
BootstrapDialog.confirm({
|
||||
title: lang_general_word_attention,
|
||||
message:
|
||||
lang_qso_simplefle_confirm_save_to_log,
|
||||
message: lang_qso_simplefle_confirm_save_to_log,
|
||||
type: BootstrapDialog.TYPE_INFO,
|
||||
btnCancelLabel: lang_general_word_cancel,
|
||||
btnOKLabel: lang_general_word_ok,
|
||||
|
|
@ -660,15 +719,20 @@ $(".js-save-to-log").click(function () {
|
|||
var rst_rcvd = item[7];
|
||||
var rst_sent = item[6];
|
||||
var start_date = item[0];
|
||||
var start_time = item[1][0] +item[1][1] + ":" + item[1][2] + item[1][3];
|
||||
var start_time =
|
||||
item[1][0] +
|
||||
item[1][1] +
|
||||
":" +
|
||||
item[1][2] +
|
||||
item[1][3];
|
||||
var band = item[4];
|
||||
var mode = item[5];
|
||||
var freq_display = item[3] * 1000000;
|
||||
var station_profile = $(".station_id").val();
|
||||
var sota_ref = '';
|
||||
var iota_ref = '';
|
||||
var pota_ref = '';
|
||||
var wwff_ref = '';
|
||||
var sota_ref = "";
|
||||
var iota_ref = "";
|
||||
var pota_ref = "";
|
||||
var wwff_ref = "";
|
||||
if (isSOTA(item[8])) {
|
||||
sota_ref = item[8];
|
||||
} else if (isIOTA(item[8])) {
|
||||
|
|
@ -704,8 +768,7 @@ $(".js-save-to-log").click(function () {
|
|||
clearSession();
|
||||
BootstrapDialog.alert({
|
||||
title: lang_qso_simplefle_success_save_to_log_header,
|
||||
message:
|
||||
lang_qso_simplefle_success_save_to_log,
|
||||
message: lang_qso_simplefle_success_save_to_log,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
正在加载…
在新工单中引用