Merge remote-tracking branch 'upstream/dev' into HEAD

This commit is contained in:
phl0
2024-03-10 17:17:42 +01:00
71 changed files with 722 additions and 457 deletions

View File

@@ -12,9 +12,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| 'callbook' Selects which Callbook lookup to use defaults "hamqth" but supports "qrz"
*/
$config['app_name'] = "Wavelog";
$config['directory'] = "logbook";
$config['callbook'] = "hamqth"; // Options are hamqth or qrz
$config['app_name'] = 'Wavelog';
$config['directory'] = 'logbook';
$config['callbook'] = 'hamqth'; // Options are hamqth or qrz
$config['datadir'] = null; // default to install directory
@@ -28,8 +28,8 @@ $config['datadir'] = null; // default to install directory
| 'display_freq' Show or Hide frequnecy info
*/
$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
$config['locator'] = "";
$config['table_name'] = 'TABLE_HRD_CONTACTS_V01';
$config['locator'] = '';
$config['display_freq'] = true;
/*
@@ -42,8 +42,8 @@ $config['display_freq'] = true;
| 'use_fullname' Get full names from QRZ, may not be GDPR compliant
*/
$config['qrz_username'] = "";
$config['qrz_password'] = "";
$config['qrz_username'] = '';
$config['qrz_password'] = '';
$config['use_fullname'] = false;
/*
@@ -54,8 +54,8 @@ $config['use_fullname'] = false;
| 'hamqth_username' HamQTH user login
| 'hamqth_password' HamQTH user password
*/
$config['hamqth_username'] = "";
$config['hamqth_password'] = "";
$config['hamqth_username'] = '';
$config['hamqth_password'] = '';
/*
|--------------------------------------------------------------------------
@@ -70,11 +70,11 @@ $config['hamqth_password'] = "";
*/
$config['use_auth'] = true;
$config['auth_table'] = "users";
$config['auth_mode'] = "3";
$config['auth_table'] = 'users';
$config['auth_mode'] = '3';
$config['auth_level'][3] = "Operator";
$config['auth_level'][99] = "Administrator";
$config['auth_level'][3] = 'Operator';
$config['auth_level'][99] = 'Administrator';
/*
|--------------------------------------------------------------------------
@@ -676,4 +676,4 @@ $config['proxy_ips'] = '';
|
*/
$config['userdata'] = "userdata";
$config['userdata'] = 'userdata';

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 186;
$config['migration_version'] = 188;
/*
|--------------------------------------------------------------------------

View File

@@ -13,14 +13,39 @@ class Components extends CI_Controller {
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index() {
$this->load->model('stations');
$url = 'https://hams.at/api/alerts/upcoming';
$json = file_get_contents($url);
$data['rovedata'] = json_decode($json, true);
$data['gridsquare'] = strtoupper($this->stations->find_gridsquare());
// load view
$this->load->view('components/hamsat/table', $data);
}
public function index() {
$this->load->model("user_options_model");
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_key'] = $hkey_opt[0]->option_value;
} else {
$data['user_hamsat_key']='';
}
$url = 'https://hams.at/api/alerts/upcoming';
if ($data['user_hamsat_key'] ?? '' != '') {
$options = array(
'http' => array(
'method' => 'GET',
'header' => "Authorization: Bearer ".$data['user_hamsat_key']."\r\n"
)
);
$context = stream_context_create($options);
$json = file_get_contents($url, false, $context);
} else {
$json = file_get_contents($url);
}
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value;
} else {
$data['user_hamsat_workable_only'] = 0;
}
$this->load->model('stations');
$data['rovedata'] = json_decode($json, true);
$data['gridsquare'] = strtoupper($this->stations->find_gridsquare());
// load view
$this->load->view('components/hamsat/table', $data);
}
}

View File

@@ -178,6 +178,7 @@ class Contesting extends CI_Controller {
* Function is used for dupe-checking in contestinglogging
*/
public function checkIfWorkedBefore() {
session_write_close();
$call = $this->input->post('call');
$band = $this->input->post('band');
$mode = $this->input->post('mode');
@@ -186,7 +187,6 @@ class Contesting extends CI_Controller {
$this->load->model('Contesting_model');
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest);
header('Content-Type: application/json');
if ($result && $result->num_rows()) {
$timeb4=substr($result->row()->b4,0,5);

View File

@@ -616,8 +616,10 @@ class eqsl extends CI_Controller {
return $error;
}
$filename = uniqid().'.jpg';
if (file_put_contents($this->Eqsl_images->get_imagePath('p') .'/'. $filename, $content) !== false) {
$this->Eqsl_images->save_image($id, $filename);
if($this->Eqsl_images->get_image($id) == "No Image") {
if (file_put_contents($this->Eqsl_images->get_imagePath('p') .'/'. $filename, $content) !== false) {
$this->Eqsl_images->save_image($id, $filename);
}
}
}
return $error;

View File

@@ -131,24 +131,56 @@ class Lookup extends CI_Controller {
public function get_state_list() {
$this->load->library('subdivisions');
$dxcc = xss_clean($this->input->post('dxcc'));
$states_result = $this->subdivisions->get_state_list($dxcc);
$subdivision_name = $this->subdivisions->get_primary_subdivision_name($dxcc);
if ($states_result->num_rows() > 0) {
$states_array = $states_result->result_array();
$result = array(
$result = array(
'status' => 'ok',
'subdivision_name' => $subdivision_name,
'data' => $states_array
);
header('Content-Type: application/json');
echo json_encode($result);
echo json_encode($result);
} else {
header('Content-Type: application/json');
echo json_encode(array('status' => 'No States for this DXCC in Database'));
}
}
public function get_county() {
$json = [];
if(!empty($this->input->get("query"))) {
$county = $this->input->get("state");
$cleanedcounty = explode('(', $county);
$cleanedcounty = trim($cleanedcounty[0]);
$file = 'assets/json/US_counties.csv';
if (is_readable($file)) {
$lines = file($file, FILE_IGNORE_NEW_LINES);
$input = preg_quote($cleanedcounty, '~');
$reg = '~^'. $input .'(.*)$~';
$result = preg_grep($reg, $lines);
$json = [];
$i = 0;
foreach ($result as &$value) {
$county = explode(',', $value);
// Limit to 100 as to not slowdown browser too much
if (count($json) <= 100) {
$json[] = ["name"=>$county[1]];
}
}
}
}
header('Content-Type: application/json');
echo json_encode($json);
}
}

View File

@@ -4,6 +4,7 @@
class Map extends CI_Controller {
function index() {
redirect('dashboard');
}
// Generic fonction for return Json for MAP //
@@ -12,18 +13,9 @@ class Map extends CI_Controller {
$this->load->model('logbook_model');
// set informations //
if ($this->input->post('isCustom') == true) {
$date_from = xss_clean($this->input->post('date_from'));
$date_to = xss_clean($this->input->post('date_to'));
$band = xss_clean($this->input->post('band'));
$mode = xss_clean($this->input->post('mode'));
$prop_mode = xss_clean($this->input->post('prop_mode'));
$qsos = $this->logbook_model->map_custom_qsos($date_from, $date_to, $band, $mode, $prop_mode);
} else {
$nb_qso = (intval($this->input->post('nb_qso'))>0)?xss_clean($this->input->post('nb_qso')):18;
$offset = (intval($this->input->post('offset'))>0)?xss_clean($this->input->post('offset')):null;
$qsos = $this->logbook_model->get_qsos($nb_qso, $offset);
}
$nb_qso = (intval($this->input->post('nb_qso'))>0)?xss_clean($this->input->post('nb_qso')):18;
$offset = (intval($this->input->post('offset'))>0)?xss_clean($this->input->post('offset')):null;
$qsos = $this->logbook_model->get_qsos($nb_qso, $offset);
// [PLOT] ADD plot //
$plot_array = $this->logbook_model->get_plot_array_for_map($qsos->result());
// [MAP Custom] ADD Station //

View File

@@ -500,41 +500,6 @@ class QSO extends CI_Controller {
echo json_encode($json);
}
/*
* Function is used for autocompletion of Counties in the station profile form
*/
public function get_county() {
$json = [];
if(!empty($this->input->get("query"))) {
//$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
$county = $this->input->get("state");
$cleanedcounty = explode('(', $county);
$cleanedcounty = trim($cleanedcounty[0]);
$file = 'assets/json/US_counties.csv';
if (is_readable($file)) {
$lines = file($file, FILE_IGNORE_NEW_LINES);
$input = preg_quote($cleanedcounty, '~');
$reg = '~^'. $input .'(.*)$~';
$result = preg_grep($reg, $lines);
$json = [];
$i = 0;
foreach ($result as &$value) {
$county = explode(',', $value);
// Limit to 100 as to not slowdown browser too much
if (count($json) <= 300) {
$json[] = ["name"=>$county[1]];
}
}
}
}
header('Content-Type: application/json');
echo json_encode($json);
}
public function get_sota_info() {
$this->load->library('sota');

View File

@@ -182,38 +182,4 @@ class Station extends CI_Controller
redirect('stationsetup');
}
/*
* Function is used for autocompletion of Counties in the station profile form
*/
public function get_county()
{
$json = [];
if (!empty($this->input->get("query"))) {
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
$county = $this->input->get("state");
$file = 'assets/json/US_counties.csv';
if (is_readable($file)) {
$lines = file($file, FILE_IGNORE_NEW_LINES);
$input = preg_quote($county, '~');
$reg = '~^' . $input . '(.*)$~';
$result = preg_grep($reg, $lines);
$json = [];
$i = 0;
foreach ($result as &$value) {
$county = explode(',', $value);
// Limit to 300 as to not slowdown browser too much
if (count($json) <= 300) {
$json[] = ["name" => $county[1]];
}
}
}
}
header('Content-Type: application/json');
echo json_encode($json);
}
}

View File

@@ -95,6 +95,8 @@ class User extends CI_Controller {
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['user_quicklog'] = $this->input->post('user_quicklog');
$data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter');
$data['user_hamsat_key'] = $this->input->post('user_hamsat_key');
$data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only');
$data['language'] = $this->input->post('language');
$this->load->view('user/edit', $data);
} else {
@@ -134,6 +136,8 @@ class User extends CI_Controller {
$this->input->post('user_quicklog'),
$this->input->post('user_quicklog_enter'),
$this->input->post('language'),
$this->input->post('user_hamsat_key'),
$this->input->post('user_hamsat_workable_only'),
)) {
// Check for errors
case EUSERNAMEEXISTS:
@@ -491,6 +495,26 @@ class User extends CI_Controller {
$data['user_winkey'] = $q->winkey;
}
if($this->input->post('user_hamsat_key', true)) {
$data['user_hamsat_key'] = $this->input->post('user_hamsat_key', true);
} else {
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_key'] = $hkey_opt[0]->option_value;
} else {
$data['user_hamsat_key'] = '';
}
}
if($this->input->post('user_hamsat_workable_only')) {
$data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only', false);
} else {
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value;
}
}
// [MAP Custom] GET user options //
$options_object = $this->user_options_model->get_options('map_custom')->result();
if (count($options_object)>0) {
@@ -615,6 +639,8 @@ class User extends CI_Controller {
$data['user_locations_quickswitch'] = $this->input->post('user_locations_quickswitch', true);
$data['language'] = $this->input->post('language');
$data['user_winkey'] = $this->input->post('user_winkey');
$data['user_hamsat_key'] = $this->input->post('user_hamsat_key');
$data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only');
$this->load->view('user/edit');
$this->load->view('interface_assets/footer');
}

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -126,3 +126,9 @@ $lang['account_qso_logging_options'] = "QSO录入选项";
$lang['account_third_party_services'] = "第三方服务";
$lang['account_default_values'] = "默认值";
$lang['account_miscellaneous'] = "其他";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "奖状详情";
$lang['awards_show_worked'] = "显示已通联";
$lang['awards_show_confirmed'] = "显示已确认";
$lang['awards_show_not_worked'] = "显示未通联";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "查看CQ分区地图";
$lang['awards_summary'] = "概览";
$lang['awards_total'] = "总计";

View File

@@ -126,3 +126,9 @@ $lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -126,3 +126,9 @@ $lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -123,4 +123,10 @@ $lang['account_general_information'] = "Informations Générales";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Valeur par défaut";
$lang['account_miscellaneous'] = "Divers";
$lang['account_miscellaneous'] = "Divers";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Informations complémentaires";
$lang['awards_show_worked'] = "Voir les \"réalisés\"";
$lang['awards_show_confirmed'] = "Voir les \"confirmés\"";
$lang['awards_show_not_worked'] = "Voir les \"non réalisés\"";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Voir la carte";
$lang['awards_summary'] = "Résumé";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "Generelle Informationen";
$lang['account_qso_logging_options'] = "QSO-Logging Optionen";
$lang['account_third_party_services'] = "Externe Dienste";
$lang['account_default_values'] = "Standardwerte / Favoriten";
$lang['account_miscellaneous'] = "Verschiedenes";
$lang['account_miscellaneous'] = "Verschiedenes";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "Siehe dein Profil unter <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Zeige nur Überflüge an, die gearbeitet werden können";
$lang['account_hamsat_workable_only_hint'] = "Wenn aktiviert, werden nur sichtbare Überflüge basierend auf dem Locator des hams.at Profils angezeigt. Dazu muss der Private Feed Key konfiguriert sein.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Diplom Info";
$lang['awards_show_worked'] = "Zeige gearbeitete";
$lang['awards_show_confirmed'] = "Zeige bestätigte";
$lang['awards_show_not_worked'] = "Zeige nicht gearbeitete";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Zeige CQ Zonen Karte";
$lang['awards_summary'] = "Zusammenfassung";
$lang['awards_total'] = "Gesamt";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Информация о дипломе";
$lang['awards_show_worked'] = "Показать сработанные";
$lang['awards_show_confirmed'] = "Показать подтверждённые";
$lang['awards_show_not_worked'] = "Показать не сработанные";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Показать карту зон CQ";
$lang['awards_summary'] = "Сводка";
$lang['awards_total'] = "Всего";

View File

@@ -126,3 +126,9 @@ $lang['account_qso_logging_options'] = "Opciones del Registro de QSO";
$lang['account_third_party_services'] = "Servicios de Terceros";
$lang['account_default_values'] = "Valores por Defecto";
$lang['account_miscellaneous'] = "Otras Opciones";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -125,4 +125,10 @@ $lang['account_general_information'] = "General Information";
$lang['account_qso_logging_options'] = "QSO Logging Options";
$lang['account_third_party_services'] = "Third Party Services";
$lang['account_default_values'] = "Default Values";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_miscellaneous'] = "Miscellaneous";
$lang['account_hamsat'] = "Hams.at";
$lang['account_hamsat_private_feed_key'] = "Private Feed Key";
$lang['account_hamsat_hint'] = "See your profile at <a href='https://hams.at/users/settings' target='_blank'>https://hams.at/users/settings</a>.";
$lang['account_hamsat_workable_only'] = "Show Workable Passes Only";
$lang['account_hamsat_workable_only_hint'] = "If enabled shows only workable passes based on the gridsquare set in your hams.at account. Requires private feed key to be set.";

View File

@@ -6,6 +6,7 @@ $lang['awards_info_button'] = "Award Info";
$lang['awards_show_worked'] = "Show worked";
$lang['awards_show_confirmed'] = "Show confirmed";
$lang['awards_show_not_worked'] = "Show not worked";
$lang['awards_qsl_type'] = "Show QSO with QSL Type";
$lang['awards_show_cq_map'] = "Show CQ Zone Map";
$lang['awards_summary'] = "Summary";
$lang['awards_total'] = "Total";

View File

@@ -0,0 +1,111 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
// Remove Dupes from eQSL-Table and add a unique idx
class Migration_rm_eqsl_dbl extends CI_Migration
{
public function up()
{
$dbltrbl = 1;
while ($dbltrbl>0) {
$sql = 'SELECT MIN(id) as id,qso_id FROM eQSL_images GROUP BY qso_id HAVING count(1)>1;';
$query = $this->db->query($sql);
$dbltrbl = $query->num_rows();
if ($dbltrbl > 0) {
$eqsl2del = [];
foreach ($query->result() as $row)
$eqsl2del[] = $row->id;
foreach ($eqsl2del as $oneeqsl) {
$res = $this->db->query("SELECT image_file FROM eQSL_images WHERE id=?", $oneeqsl)->result()[0]->image_file;
if ($this->config->item('userdata')) {
$userdata_dir = $this->config->item('userdata');
$qso_id = $this->get_qsoid_from_eqsl_filename($res) ?? '';
// we need to get the user ID which corresponds to that particular qso
if (!empty($qso_id)) {
$get_user_id = $this->get_user_id_from_qso($qso_id);
// can be an deleted qso
if (!empty($get_user_id)) {
$user_id = $get_user_id;
} else {
$user_id = 'not_assigned';
}
} else {
$user_id = 'not_assigned';
}
// target path with userdata dir
$target_path = $userdata_dir . '/' . $user_id . '/eqsl_card';
// then remove the file
if (!unlink($target_path . '/' . $res)) {
log_message('error', "Mig 186: File: '" . $target_path . "/" . $res . "' could not be deleted. There is no file with this filename. This shouldn't be a problem.");
} else {
log_message('debug', "Mig 186: File: '" . $target_path . "/" . $res . "' was deleted because it was a dupe.");
}
} else {
// if 'userdata' is disabled we can use the old paths
if (!unlink('images/eqsl_card_images/' . $res)) {
log_message('error', "Mig 186: File: 'images/eqsl_card_images/" . $res . "' could not be deleted. There is no file with this filename. This shouldn't be a problem.");
} else {
log_message('debug', "Mig 186: File: 'images/eqsl_card_images/" . $res . "' was deleted because it was a dupe.");
}
}
}
foreach ($eqsl2del as $oneeqsl) {
$this->db->query('delete from eQSL_images where id=?',$oneeqsl);
}
}
}
$index = $this->db->query("SHOW INDEX FROM eQSL_images WHERE Key_name = 'qso_id_UNIQUE'")->num_rows();
if ($index == 0) {
$this->db->query("ALTER TABLE `eQSL_images` ADD UNIQUE INDEX `qso_id_UNIQUE` (`qso_id` ASC);");
}
}
public function down()
{
$index = $this->db->query("SHOW INDEX FROM eQSL_images WHERE Key_name = 'qso_id_UNIQUE'")->num_rows();
if ($index > 0) {
$this->db->query("ALTER TABLE `eQSL_images` DROP INDEX `qso_id_UNIQUE`;");
}
}
function get_qsoid_from_eqsl_filename($filename)
{
$sql = "SELECT qso_id FROM eQSL_images WHERE image_file = ?";
$result = $this->db->query($sql, $filename);
$row = $result->row();
return $row->qso_id;
}
function get_user_id_from_qso($qso_id)
{
$clean_qsoid = $this->security->xss_clean($qso_id);
$sql = 'SELECT station_profile.user_id
FROM ' . $this->config->item('table_name') . '
INNER JOIN station_profile ON (' . $this->config->item('table_name') . '.station_id = station_profile.station_id)
WHERE ' . $this->config->item('table_name') . '.COL_PRIMARY_KEY = ?';
$result = $this->db->query($sql, $clean_qsoid);
$row = $result->row();
return $row->user_id;
}
}

View File

@@ -0,0 +1,36 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
Tag Wavelog as Version 1.3
*/
class Migration_tag_1_3 extends CI_Migration {
public function up()
{
// Tag Wavelog New Version
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '1.3'));
// Trigger Version Info Dialog
$this->db->where('option_type', 'version_dialog');
$this->db->where('option_name', 'confirmed');
$this->db->update('user_options', array('option_value' => 'false'));
// Also set Version Dialog to "both" if only custom text is applied
$this->db->where('option_name', 'version_dialog');
$this->db->where('option_value', 'custom_text');
$this->db->update('options', array('option_value' => 'both'));
}
public function down()
{
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '1.2'));
}
}

View File

@@ -27,7 +27,7 @@ class Eqsl_images extends CI_Model {
function eqsl_qso_list() {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->db->select('COL_PRIMARY_KEY, qso_id, COL_CALL, COL_MODE, , COL_SUBMODE, COL_TIME_ON, COL_BAND, COL_SAT_NAME, image_file');
$this->db->select('COL_PRIMARY_KEY, qso_id, COL_CALL, COL_MODE, , COL_SUBMODE, COL_TIME_ON, COL_BAND, COL_SAT_NAME, COL_EQSL_QSLRDATE, image_file');
$this->db->join($this->config->item('table_name'), 'qso_id = COL_PRIMARY_KEY', 'left outer');
$this->db->join('station_profile', $this->config->item('table_name').'.station_id = station_profile.station_id', 'left outer');
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);

View File

@@ -1678,7 +1678,8 @@ class Logbook_model extends CI_Model {
$this->db->join('lotw_users', $this->config->item('table_name').'.COL_CALL = lotw_users.callsign', 'left outer');
$this->db->join('primary_subdivisions', $this->config->item('table_name').'.COL_DXCC = primary_subdivisions.adif AND '.$this->config->item('table_name').'.COL_STATE = primary_subdivisions.state', 'left outer');
$this->db->where('COL_PRIMARY_KEY', $id);
$this->db->limit(1);
return $this->db->get();
} else {
return;
@@ -4766,6 +4767,7 @@ function lotw_last_qsl_date($user_id) {
public function get_states_by_dxcc($dxcc) {
$this->db->where('adif', $dxcc);
$this->db->order_by('subdivision', 'ASC');
return $this->db->get('primary_subdivisions');
}

View File

@@ -149,7 +149,8 @@ class User_Model extends CI_Model {
$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_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
$user_default_band, $user_default_confirmation, $user_qso_end_times, $user_quicklog, $user_quicklog_enter, $language) {
$user_default_band, $user_default_confirmation, $user_qso_end_times, $user_quicklog, $user_quicklog_enter,
$language, $user_hamsat_key, $user_hamsat_workable_only) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
@@ -184,7 +185,7 @@ class User_Model extends CI_Model {
'user_qso_end_times' => xss_clean($user_qso_end_times),
'user_quicklog' => xss_clean($user_quicklog),
'user_quicklog_enter' => xss_clean($user_quicklog_enter),
'language' => xss_clean($language),
'language' => xss_clean($language)
);
// Check the password is valid
@@ -207,6 +208,8 @@ class User_Model extends CI_Model {
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'map_custom','icon','qsoconfirm','{\"icon\":\"fas fa-dot-circle\",\"color\":\"#00ff00\"}');");
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'map_custom','icon','station','{\"icon\":\"fas fa-broadcast-tower\",\"color\":\"#0000ff\"}');");
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'map_custom','gridsquare','show','0');");
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'hamsat','hamsat_key','api','".xss_clean($user_hamsat_key)."');");
$this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'hamsat','hamsat_key','workable','".xss_clean($user_hamsat_workable_only)."');");
return OK;
} else {
@@ -258,6 +261,9 @@ class User_Model extends CI_Model {
'winkey' => xss_clean($fields['user_winkey']),
);
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'hamsat','hamsat_key','api','".xss_clean($fields['user_hamsat_key'])."');");
$this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'hamsat','hamsat_key','workable','".xss_clean($fields['user_hamsat_workable_only'])."');");
// Check to see if the user is allowed to change user levels
if($this->session->userdata('user_type') == 99) {
$data['user_type'] = $fields['user_type'];
@@ -314,6 +320,7 @@ class User_Model extends CI_Model {
if($this->exists_by_id($user_id)) {
$this->db->query("DELETE FROM ".$this->config->item('auth_table')." WHERE user_id = '".$user_id."'");
$this->db->query("delete from user_options where user_id=?",$user_id);
return 1;
} else {
@@ -386,7 +393,7 @@ class User_Model extends CI_Model {
'active_station_logbook' => $u->row()->active_station_logbook,
'language' => isset($u->row()->language) ? $u->row()->language: 'english',
'isWinkeyEnabled' => $u->row()->winkey,
'hasQrzKey' => $this->hasQrzKey($u->row()->user_id),
'hasQrzKey' => $this->hasQrzKey($u->row()->user_id)
);
$this->session->set_userdata($userdata);

View File

@@ -33,8 +33,10 @@ class User_options_model extends CI_Model {
}
}
public function get_options($option_type, $option_array=null) {
$uid=$this->session->userdata('user_id');
public function get_options($option_type, $option_array=null, $uid=null) {
if ($uid ?? '' == '') {
$uid=$this->session->userdata('user_id');
}
$sql_more = "";
$array_sql_value = array($uid, $option_type);
if (is_array($option_array)) {

View File

@@ -86,7 +86,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2"><?php echo lang('gen_hamradio_qsltype'); ?></div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -48,7 +48,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -80,7 +80,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -88,7 +88,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -36,7 +36,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
@@ -200,7 +200,7 @@
$j++;
}
} else {
echo '<td style="text-align: center"><b>' . $jcc_summary['worked']['Total'] . '</b></td>';
echo '<td style="text-align: center"><b>' . $jcc_summary['confirmed']['Total'] . '</b></td>';
}
echo '</tr>

View File

@@ -80,7 +80,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -88,7 +88,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -88,7 +88,7 @@
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >

View File

@@ -1,118 +1,154 @@
<div class="table-responsive">
<br>
<h2>Hamsat - Satellite Rovers</h2>
<p>This data is from <a target="_blank" href="https://hams.at/">https://hams.at/</a></p>
<p>This data is from <a target="_blank" href="https://hams.at/">https://hams.at/</a>.
<?php if ($user_hamsat_workable_only) {
echo " Only workable passes shown.";
} else {
echo " All passes shown.";
}?>
</p>
<?php if ($user_hamsat_workable_only && $user_hamsat_key == '') { ?>
<div class="alert alert-warning" role="warning">
Private feed key empty. Please set the feed key in your profile.
</div>
<?php } else { ?>
<?php if ($rovedata['data'] == []) { ?>
<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>Mode</th>
<th>Gridsquare(s)</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($rovedata['data'] as $rove) : ?>
<tr>
<td>
<?php
// Get Date format
if ($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<?php $timestamp = strtotime($rove['aos_at']);
echo date($custom_date_format, $timestamp); ?>
</td>
<td>
<?php echo date("H:i:s", $timestamp)." - ".date("H:i:s", strtotime($rove['los_at'])); ?>
</td>
<td>
<?php
$CI = &get_instance();
$CI->load->model('logbooks_model');
$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");
if ($call_worked != 0) {
echo "<span class=\"text-success\">".$rove['callsign']."</span>";
} else {
echo $rove['callsign'];
}
?>
</td>
<td>
<?php
echo xss_clean($rove['comment'] ?? '-');
?>
</td>
<?php
$direction = '';
if ($rove['mhz_direction'] == 'up') {
$direction = '&uarr;';
} else if ($rove['mhz_direction'] == 'down') {
$direction = '&darr;';
}
$modeclass = '';
if ($rove['mode'] == 'SSB' || $rove['mode'] == 'CW') {
$modeclass = 'hamsatBgLin';
} else if ($rove['mode'] == 'Data') {
$modeclass = 'hamsatBgData';
} else if ($rove['mode'] == 'FM') {
$modeclass = 'hamsatBgFm';
}
?>
<td><span data-bs-toggle="tooltip" title="<?php if ($rove['mhz'] != '') { printf("%.3f", $rove['mhz']); echo " ".$direction ?? ''; } ?>"><?= $rove['satellite']['name'] ?></span></td>
<td><span title="<?php echo $rove['mode']; ?>" class="badge <?php echo $modeclass; ?>"><?php echo $rove['mode']; ?></span></td>
<td>
<?php
// Load the logbook model and call check_if_grid_worked_in_logbook
foreach ($rove['grids'] as $grid) {
$worked = $CI->logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT");
if ($worked != 0) {
echo " <span data-bs-toggle=\"tooltip\" title=\"Worked\" class=\"badge bg-success\">" . $grid . "</span>";
<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>Mode</th>
<th>Gridsquare(s)</th>
<th>Workable</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($rovedata['data'] as $rove) :
if ($user_hamsat_workable_only) {
if (!$rove['is_workable']) {
continue;
}
} ?>
<tr>
<td>
<?php
// Get Date format
if ($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
echo " <span data-bs-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge bg-danger\">" . $grid . "</span>";
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
}
?>
</td>
<td><a href="<?php echo $rove['url']; ?>" target="_blank">Track</a></td>
<?php
$sat = $rove['satellite']['name'];
switch (strtoupper($rove['satellite']['name'])) {
case "GREENCUBE":
$sat = 'IO-117';
break;
}
?>
<td><a href="https://sat.fg8oj.com/sked.php?s%5B%5D=<?php echo $sat; ?>&l=<?php echo strtoupper($gridsquare); ?>&el1=0&l2=<?php echo $rove['grids'][0]; ?>&el2=0&duration=1&start=0&OK=Search" target="_blank">Sked</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
?>
<?php $timestamp = strtotime($rove['aos_at']);
echo date($custom_date_format, $timestamp); ?>
</td>
<td>
<?php echo date("H:i:s", $timestamp)." - ".date("H:i:s", strtotime($rove['los_at'])); ?>
</td>
<td>
<?php
$CI = &get_instance();
$CI->load->model('logbooks_model');
$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");
if ($call_worked != 0) {
echo "<span class=\"text-success\">".$rove['callsign']."</span>";
} else {
echo $rove['callsign'];
}
?>
</td>
<td>
<?php
echo xss_clean($rove['comment'] ?? '-');
?>
</td>
<?php
$direction = '';
if ($rove['mhz_direction'] == 'up') {
$direction = '&uarr;';
} else if ($rove['mhz_direction'] == 'down') {
$direction = '&darr;';
}
$modeclass = '';
if ($rove['mode'] == 'SSB' || $rove['mode'] == 'CW') {
$modeclass = 'hamsatBgLin';
} else if ($rove['mode'] == 'Data') {
$modeclass = 'hamsatBgData';
} else if ($rove['mode'] == 'FM') {
$modeclass = 'hamsatBgFm';
}
?>
<td><span data-bs-toggle="tooltip" title="<?php if ($rove['mhz'] != '') { printf("%.3f", $rove['mhz']); echo " ".$direction ?? ''; } ?>"><?= $rove['satellite']['name'] ?></span></td>
<td><span title="<?php echo $rove['mode']; ?>" class="badge <?php echo $modeclass; ?>"><?php echo $rove['mode']; ?></span></td>
<td>
<?php
// Load the logbook model and call check_if_grid_worked_in_logbook
foreach ($rove['grids'] as $grid) {
$worked = $CI->logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT");
if ($worked != 0) {
echo " <span data-bs-toggle=\"tooltip\" title=\"Worked\" class=\"badge bg-success\">" . $grid . "</span>";
} else {
echo " <span data-bs-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge bg-danger\">" . $grid . "</span>";
}
}
?>
</td>
<td>
<?php
if ($user_hamsat_key != '') {
if ($rove['is_workable']) {
echo date("H:i", strtotime($rove['workable_start_at']))." - ".date("H:i", strtotime($rove['workable_end_at']));
} else {
echo "<span data-bs-toggle=\"tooltip\" title=\"No\" class=\"badge bg-danger\">No</span>";
}
} else {
echo "<span data-bs-toggle=\"tooltip\" title=\"Unkown\" class=\"badge bg-warning\">Unknown</span>";
}
?>
</td>
<td><a href="<?php echo $rove['url']; ?>" target="_blank">Track</a></td>
<?php
$sat = $rove['satellite']['name'];
switch (strtoupper($rove['satellite']['name'])) {
case "GREENCUBE":
$sat = 'IO-117';
break;
}
?>
<td>
<?php
if ($rove['is_workable'] || $user_hamsat_key == '') { ?>
<a href="https://sat.fg8oj.com/sked.php?s%5B%5D=<?php echo $sat; ?>&l=<?php echo strtoupper($gridsquare); ?>&el1=0&l2=<?php echo $rove['grids'][0]; ?>&el2=0&duration=1&start=0&OK=Search" target="_blank">Sked</a>
<?php } ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php } ?>
<?php } ?>
</div>

View File

@@ -103,7 +103,8 @@
<div class="mb-3 col-md-3">
<label for="callsign"><?php echo lang('gen_hamradio_callsign'); ?></label>
<input type="text" class="form-control form-control-sm" id="callsign" name="callsign" required>
<small id="callsign_info" class="badge text-bg-danger"></small>
<small id="callsign_info" class="badge text-bg-danger"></small><br/>
<small id="bearing_info" class="form-text text-muted"></small>
</div>
<div class="mb-3 col-md-1">

View File

@@ -13,13 +13,13 @@
<?php
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
if (is_array($qslarray->result())) {
echo '<table style="width:100%" class="eqsltable table table-sm table-bordered table-hover table-striped table-condensed">
@@ -30,7 +30,7 @@
<th style=\'text-align: center\'>'.$this->lang->line('general_word_date').'</th>
<th style=\'text-align: center\'>'.$this->lang->line('general_word_time').'</th>
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_band').'</th>
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_qsl').'</th>
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_qsl').' '.$this->lang->line('general_word_date').'</th>
<th style=\'text-align: center\'></th>
</tr>
</thead><tbody>';
@@ -38,19 +38,21 @@
foreach ($qslarray->result() as $qsl) {
echo '<tr>';
echo '<td style=\'text-align: center\'><a id="edit_qso" href="javascript:displayQso('.$qsl->COL_PRIMARY_KEY.')">' . str_replace("0","&Oslash;",$qsl->COL_CALL) . '</a></td>';
echo '<td style=\'text-align: center\'>';
echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE;
echo '</td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp);
echo '</td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp);
echo '</td>';
echo '<td style=\'text-align: center\'>';
if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); };
echo '</td>';
echo '<td style=\'text-align: center\'>' . $qsl->image_file . '</td>';
echo '<td style=\'text-align: center\'>';
echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE;
echo '</td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp);
echo '</td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp);
echo '</td>';
echo '<td style=\'text-align: center\'>';
if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); };
echo '</td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_EQSL_QSLRDATE); echo date($custom_date_format, $timestamp);
echo '</td>';
echo '<td style=\'text-align: center\'><button onclick="viewEqsl(\''.$qsl->image_file.'\', \''. $qsl->COL_CALL . '\')" class="btn btn-sm btn-success">View</button></td>';
echo '</tr>';
}

View File

@@ -732,56 +732,6 @@ function showActivatorsMap(call, count, grids) {
</script>
<?php if ($this->uri->segment(1) == "map" && $this->uri->segment(2) == "custom") { ?>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-bs-toggle="tooltip"]').tooltip()
});
<?php if($qra == "set") { ?>
var q_lat = <?php echo $qra_lat; ?>;
var q_lng = <?php echo $qra_lng; ?>;
<?php } else { ?>
var q_lat = 40.313043;
var q_lng = -32.695312;
<?php } ?>
var qso_loc = '<?php echo site_url('map/map_plot_json/');?>';
var q_zoom = 3;
$(document).ready(function(){
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
var grid = "Yes";
<?php } else { ?>
var grid = "No";
<?php } ?>
initmap(grid, 'custommap', {'initmap_only':true});
// Check and change date if to < from //
$('.custom-map-QSOs input[name="to"]').off('change').on('change', function() {
if ($('.custom-map-QSOs input[name="to"]').val().replaceAll('-','') < $('.custom-map-QSOs input[name="from"]').val().replaceAll('-','')) {
$('.custom-map-QSOs input[name="from"]').val($('.custom-map-QSOs input[name="to"]').val());
}
});
$('.custom-map-QSOs input[name="from"]').off('change').on('change', function() {
if ($('.custom-map-QSOs input[name="from"]').val().replaceAll('-','') > $('.custom-map-QSOs input[name="to"]').val().replaceAll('-','')) {
$('.custom-map-QSOs input[name="to"]').val($('.custom-map-QSOs input[name="from"]').val());
}
});
// Form "submit" //
$('.custom-map-QSOs .btn_submit_map_custom').off('click').on('click',function() {
var customdata = {'dataPost':{'date_from': $('.custom-map-QSOs input[name="from"]').val(), 'date_to': $('.custom-map-QSOs input[name="to"]').val(),
'band': $('.custom-map-QSOs select[name="band"]').val(), 'mode': $('.custom-map-QSOs select[name="mode"]').val(),
'prop_mode': $('.custom-map-QSOs select[name="prop_mode"]').val(), 'isCustom':true }, 'map_id':'#custommap'};
initplot(qso_loc, customdata);
})
});
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard" ) { ?>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
@@ -2559,64 +2509,6 @@ function viewEqsl(picture, callsign) {
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js?v2"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "station") { ?>
<script>
var baseURL= "<?php echo base_url();?>";
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
station_profile_selectize_usa_county();
}
$('#StateHelp').change(function(){
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
station_profile_selectize_usa_county();
} else {
$("#stationCntyInput").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
}
});
function station_profile_selectize_usa_county() {
$('#stationCntyInput').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
valueField: 'name',
labelField: 'name',
searchField: 'name',
options: [],
create: false,
load: function(query, callback) {
var state = $("#StateHelp option:selected").text();
if (!query || state == "") return callback();
$.ajax({
url: baseURL+'index.php/station/get_county',
type: 'GET',
dataType: 'json',
data: {
query: query,
state: state,
},
error: function() {
callback();
},
success: function(res) {
callback(res);
}
});
}
});
}
</script>
<?php } ?>
<?php if ($this->uri->segment(2) == "counties" || $this->uri->segment(2) == "counties_details") { ?>
<script>
$('.countiestable').DataTable({

View File

@@ -25,12 +25,12 @@
echo '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th style=\'text-align: center\'>' . lang('gen_hamradio_callsign') . '</th>
<th style=\'text-align: center\'>' . lang('gen_hamradio_mode') . '</th>
<th style=\'text-align: center\'>' . lang('general_word_date') . '</th>
<th style=\'text-align: center\'>' . lang('general_word_time') . '</th>
<th style=\'text-align: center\'>' . lang('gen_hamradio_band') . '</th>
<th style=\'text-align: center\'>' . lang('gen_hamradio_qsl') . '</th>
<th style=\'text-align: center\'>'.lang('gen_hamradio_callsign').'</th>
<th style=\'text-align: center\'>'.lang('gen_hamradio_mode').'</th>
<th style=\'text-align: center\'>'.lang('general_word_date').'</th>
<th style=\'text-align: center\'>'.lang('general_word_time').'</th>
<th style=\'text-align: center\'>'.lang('gen_hamradio_band').'</th>
<th style=\'text-align: center\'>'.lang('gen_hamradio_qsl').' '.lang('general_word_date').'</th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'></th>
@@ -39,7 +39,7 @@
foreach ($qslarray->result() as $qsl) {
echo '<tr>';
echo '<td style=\'text-align: center\'>' . str_replace("0", "&Oslash;", $qsl->COL_CALL) . '</td>';
echo '<td style=\'text-align: center\'>'.str_replace("0", "&Oslash;", $qsl->COL_CALL).'</td>';
echo '<td style=\'text-align: center\'>';
echo $qsl->COL_SUBMODE == null ? $qsl->COL_MODE : $qsl->COL_SUBMODE;
echo '</td>';
@@ -58,10 +58,13 @@
echo strtolower($qsl->COL_BAND);
};
echo '</td>';
echo '<td style=\'text-align: center\'>' . $qsl->filename . '</td>';
echo '<td id="' . $qsl->id . '" style=\'text-align: center\'><button onclick="deleteQsl(\'' . $qsl->id . '\')" class="btn btn-sm btn-danger">Delete</button></td>';
echo '<td style=\'text-align: center\'><button onclick="viewQsl(\'' . $qsl->filename . '\', \'' . $qsl->COL_CALL . '\')" class="btn btn-sm btn-success">View</button></td>';
echo '<td style=\'text-align: center\'><button onclick="addQsosToQsl(\'' . $qsl->filename . '\')" class="btn btn-sm btn-success">Add Qsos</button></td>';
echo '<td style=\'text-align: center\'>';
$timestamp = strtotime($qsl->COL_QSLRDATE);
echo date($custom_date_format, $timestamp);
echo '</td>';
echo '<td id="'.$qsl->id.'" style=\'text-align: center\'><button onclick="deleteQsl(\''.$qsl->id.'\')" class="btn btn-sm btn-danger">Delete</button></td>';
echo '<td style=\'text-align: center\'><button onclick="viewQsl(\''.$qsl->filename.'\', \''.$qsl->COL_CALL.'\')" class="btn btn-sm btn-success">View</button></td>';
echo '<td style=\'text-align: center\'><button onclick="addQsosToQsl(\''.$qsl->filename.'\')" class="btn btn-sm btn-success">Add Qsos</button></td>';
echo '</tr>';
}
@@ -69,4 +72,4 @@
}
?>
</div>
</div>

View File

@@ -352,8 +352,8 @@
</div>
<div class="mb-3" id="location_us_county">
<label for="stationCntyInputEdit"><?php echo lang('gen_hamradio_county_reference'); ?></label>
<input class="form-control" id="stationCntyInputEdit" type="text" name="county" value="" />
<label for="stationCntyInputQso"><?php echo lang('gen_hamradio_county_reference'); ?></label>
<input class="form-control" id="stationCntyInputQso" type="text" name="county" value="" />
</div>
<div class="mb-3">
@@ -377,7 +377,7 @@
<small id="sotaRefHelp" class="form-text text-muted"><?php echo lang('qso_sota_ref_helptext'); ?></small>
</div>
<div class="mb-3 col-md-3 align-self-center">
<button id="sota_info" class="btn btn-secondary spw-buttons"></button>
<small id="sota_info" class="btn btn-secondary spw-buttons"></small>
</div>
</div>
@@ -388,7 +388,7 @@
<small id="wwffRefHelp" class="form-text text-muted"><?php echo lang('qso_wwff_ref_helptext'); ?></small>
</div>
<div class="mb-3 col-md-3 align-self-center">
<button id="wwff_info" class="btn btn-secondary spw-buttons"></button>
<small id="wwff_info" class="btn btn-secondary spw-buttons"></small>
</div>
</div>
@@ -399,7 +399,7 @@
<small id="potaRefHelp" class="form-text text-muted"><?php echo lang('qso_pota_ref_helptext'); ?></small>
</div>
<div class="mb-3 col-md-3 align-self-center">
<button id="pota_info" class="btn btn-secondary spw-buttons"></button>
<small id="pota_info" class="btn btn-secondary spw-buttons"></small>
</div>
</div>

View File

@@ -789,6 +789,32 @@
</div>
</div>
</div>
<div class="row">
<!-- Hams.at Settings -->
<div class="col-md">
<div class="card">
<div class="card-header"><?php echo lang('account_hamsat'); ?></div>
<div class="card-body">
<div class="mb-3">
<label><?php echo lang('account_hamsat_private_feed_key'); ?></label>
<input class="form-control" type="text" name="user_hamsat_key" value="<?php if(isset($user_hamsat_key)) { echo $user_hamsat_key; } ?>" />
<small class="form-text text-muted"><?php echo lang('account_hamsat_hint'); ?></a></small>
</div>
<div class="mb-3">
<label><?php echo lang('account_hamsat_workable_only'); ?></label>
<?php if(!isset($user_hamsat_workable_only)) { $user_hamsat_workable_only='0'; }?>
<select class="form-select" name="user_hamsat_workable_only" id="user_hamsat_workable_only">
<option value="0" <?php if ($user_hamsat_workable_only == 0) { echo 'selected="selected"'; } ?>><?php echo lang('general_word_no'); ?></option>
<option value="1" <?php if ($user_hamsat_workable_only == 1) { echo 'selected="selected"'; } ?>><?php echo lang('general_word_yes'); ?></option>
</select>
<small class="form-text text-muted"><?php echo lang('account_hamsat_workable_only_hint'); ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -351,6 +351,8 @@
<td><?php echo lang('gen_hamradio_dok'); ?></td>
<?php if (preg_match('/^[A-Y]\d{2}$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://www.darc.de/<?php echo $row->COL_DARC_DOK; ?>" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
<?php } else if (preg_match('/^DV[ABCDEFGHIKLMNOPQRSTUVWXY]$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://www.darc.de/der-club/distrikte/<?php echo strtolower(substr($row->COL_DARC_DOK, 2, 1)); ?>" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
<?php } else if (preg_match('/^Z\d{2}$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://<?php echo $row->COL_DARC_DOK; ?>.vfdb.org" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
<?php } else { ?>

View File

@@ -859,7 +859,7 @@ label {
.spw-buttons {
--bs-btn-padding-x: 0.3rem;
--bs-btn-padding-y: 0.1rem;
--bs-btn-padding-y: 0.6rem;
display: none;
}

View File

@@ -1,3 +1,19 @@
function setRst(mode) {
if(mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS'){
$('#rst_sent').val('-5');
$('#rst_rcvd').val('-5');
} else if (mode == 'FSK441' || mode == 'JT6M') {
$('#rst_sent').val('26');
$('#rst_rcvd').val('26');
} else if (mode == 'CW' || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') {
$('#rst_sent').val('599');
$('#rst_rcvd').val('599');
} else {
$('#rst_sent').val('59');
$('#rst_rcvd').val('59');
}
}
function qsl_rcvd(id, method) {
$(".ld-ext-right-r-"+method).addClass('running');
$(".ld-ext-right-r-"+method).prop('disabled', true);
@@ -184,7 +200,7 @@ function qso_edit(id) {
var state = $("#stateDropdown option:selected").text();
if (state != "") {
$("#stationCntyInputEdit").prop('disabled', false);
selectize_usa_county();
selectize_usa_county('#stateDropdown', '#stationCntyInputEdit');
}
$('#stateDropdown').change(function(){
@@ -192,11 +208,10 @@ function qso_edit(id) {
if (state != "") {
$("#stationCntyInputEdit").prop('disabled', false);
selectize_usa_county();
selectize_usa_county('#stateDropdown', '#stationCntyInputEdit');
} else {
$("#stationCntyInputEdit").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInputEdit").val("");
}
});
@@ -358,7 +373,7 @@ function qso_edit(id) {
});
$("#dxcc_id").change(async function () {
await updateStateDropdown();
await updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
});
},
});
@@ -389,8 +404,8 @@ function qso_save() {
});
}
function selectize_usa_county() {
$('#stationCntyInputEdit').selectize({
function selectize_usa_county(state_field, county_field) {
$(county_field).selectize({
delimiter: ';',
maxItems: 1,
closeAfterSelect: true,
@@ -401,11 +416,11 @@ function selectize_usa_county() {
options: [],
create: false,
load: function(query, callback) {
var state = $("#stateDropdown option:selected").text();
var state = $(state_field + ' option:selected').text();
if (!query || state == "") return callback();
$.ajax({
url: base_url + 'index.php/qso/get_county',
url: base_url + 'index.php/lookup/get_county',
type: 'GET',
dataType: 'json',
data: {
@@ -423,8 +438,8 @@ function selectize_usa_county() {
});
}
async function updateStateDropdown() {
var selectedDxcc = $("#dxcc_id");
async function updateStateDropdown(dxcc_field, state_label, county_div, county_input) {
var selectedDxcc = $(dxcc_field);
if (selectedDxcc.val() !== "") {
await $.ajax({
@@ -434,10 +449,10 @@ async function updateStateDropdown() {
success: function (response) {
if (response.status === "ok") {
statesDropdown(response, set_state);
$('#stateInputLabel').html(response.subdivision_name);
$(state_label).html(response.subdivision_name);
} else {
statesDropdown(response);
$('#stateInputLabel').html('State');
$(state_label).html('State');
}
},
error: function () {
@@ -447,10 +462,10 @@ async function updateStateDropdown() {
}
if (selectedDxcc.val() == '291' || selectedDxcc.val() == '110' || selectedDxcc.val() == '6') {
$("#location_us_county").show();
$(county_div).show();
} else {
$("#location_us_county").hide();
$("#stationCntyInputEdit").val();
$(county_div).hide();
$(county_input).val();
}
}

View File

@@ -172,6 +172,7 @@ document.onkeyup = function (e) {
reset_log_fields();
// Space to jump to either callsign or the various exchanges
} else if (e.which == 32) {
getCallbook();
var exchangetype = $("#exchangetype").val();
if (exchangetype == 'Exchange') {
if ($(document.activeElement).attr("id") == "callsign") {
@@ -250,6 +251,14 @@ $('#start_date').change(function() {
}
});
$("#callsign").on( "blur", function() {
var call = $(this).val();
if ((call.length>=3) && ($("#bearing_info").html().length == 0)) {
getCallbook();
}
});
// On Key up check and suggest callsigns
$("#callsign").keyup(async function (e) {
var call = $(this).val();
@@ -273,9 +282,21 @@ $("#callsign").keyup(async function (e) {
}
else if (call.length <= 2) {
$('.callsign-suggestions').text("");
$('#bearing_info').html("");
}
});
async function getCallbook() {
var call = $("#callsign").val();
if (call.length >= 3) {
$.getJSON(base_url + 'index.php/logbook/json/' + call + '/0/'+$("#band").val()+'/'+$("#band").val() + '/' + current_active_location, function(result) {
try {
$('#bearing_info').html(result.bearing);
} catch {}
});
}
}
async function checkIfWorkedBefore() {
var call = $("#callsign").val();
if (call.length >= 3) {
@@ -309,6 +330,7 @@ async function reset_log_fields() {
$("#callsign").focus();
setRst($("#mode").val());
$('#callsign_info').text("");
$('#bearing_info').text("");
await refresh_qso_table(sessiondata);
var qTable = $('.qsotable').DataTable();
@@ -480,7 +502,7 @@ function logQso() {
}
$('#name').val("");
$('#bearing_info').html("");
$('#callsign').val("");
$('#comment').val("");
$('#exch_rcvd').val("");

View File

@@ -1,23 +1,13 @@
function setRst(mode) {
if(mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS'){
$('#rst_sent').val('-5');
$('#rst_rcvd').val('-5');
} else if (mode == 'FSK441' || mode == 'JT6M') {
$('#rst_sent').val('26');
$('#rst_rcvd').val('26');
} else if (mode == 'CW' || mode == 'RTTY' || mode == 'PSK31' || mode == 'PSK63') {
$('#rst_sent').val('599');
$('#rst_rcvd').val('599');
} else {
$('#rst_sent').val('59');
$('#rst_rcvd').val('59');
}
}
$( document ).ready(function() {
clearTimeout();
set_timers();
updateStateDropdown();
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputQso');
// if the dxcc id changes we need to update the state dropdown and clear the county value to avoid wrong data
$("#dxcc_id").change(function () {
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputQso');
$('#stationCntyInputQso').val('');
});
$('#notice-alerts').delay(1000).fadeOut(5000);
@@ -331,9 +321,9 @@ $( document ).ready(function() {
$('#stateDropdown').change(function(){
var state = $("#stateDropdown option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
$("#stationCntyInputQso").prop('disabled', false);
$('#stationCntyInput').selectize({
$('#stationCntyInputQso').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
@@ -365,9 +355,9 @@ $( document ).ready(function() {
});
} else {
$("#stationCntyInput").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
$("#stationCntyInputQso").prop('disabled', true);
//$('#stationCntyInputQso')[0].selectize.destroy();
$("#stationCntyInputQso").val("");
}
});
@@ -717,7 +707,7 @@ $( document ).ready(function() {
var $select = $('#darc_dok').selectize();
var selectize = $select[0].selectize;
selectize.clear();
$select = $('#stationCntyInputEdit').selectize();
$select = $('#stationCntyInputQso').selectize();
selectize = $select[0].selectize;
selectize.clear();
@@ -738,7 +728,7 @@ $( document ).ready(function() {
$('.callsign-suggest').hide();
$('.dxccsummary').remove();
$('#timesWorked').html(lang_qso_title_previous_contacts);
updateStateDropdown();
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
clearTimeout();
set_timers();
resetTimers(qso_manual);
@@ -876,7 +866,7 @@ $( document ).ready(function() {
}
$('#dxcc_id').val(result.dxcc.adif);
await updateStateDropdown();
await updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
$('#cqz').val(result.dxcc.cqz);
$('#ituz').val(result.dxcc.ituz);
@@ -966,9 +956,10 @@ $( document ).ready(function() {
/*
* Update county with returned value
*/
if( $('#stationCntyInput').has('option').length == 0 && result.callsign_us_county != "") {
var $county_select = $('#stationCntyInput').selectize();
var county_selectize = $county_select[0].selectize;
selectize_usa_county('#stateDropdown', '#stationCntyInputQso');
if( $('#stationCntyInputQso').has('option').length == 0 && result.callsign_us_county != "") {
var county_select = $('#stationCntyInputQso').selectize();
var county_selectize = county_select[0].selectize;
county_selectize.addOption({name: result.callsign_us_county});
county_selectize.setValue(result.callsign_us_county, false);
}

View File

@@ -7,10 +7,10 @@ $(document).ready(function () {
});
if (window.location.pathname.indexOf("/station/edit") !== -1 || window.location.pathname.indexOf("/station/create") !== -1 || window.location.pathname.indexOf("/station/copy") !== -1) {
selectize_usa_county();
updateStateDropdown();
selectize_usa_county('#stateDropdown', '#stationCntyInputEdit');
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
$("#dxcc_id").change(function () {
updateStateDropdown();
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
});
}
});

View File

@@ -12,9 +12,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| 'callbook' Selects which Callbook lookup to use defaults "hamqth" but supports "qrz"
*/
$config['app_name'] = "Wavelog";
$config['directory'] = "/%directory%";
$config['callbook'] = "%callbook%"; // Options are hamqth or qrz
$config['app_name'] = 'Wavelog';
$config['directory'] = '/%directory%';
$config['callbook'] = '%callbook%'; // Options are hamqth or qrz
$config['datadir'] = null; // default to install directory
@@ -28,8 +28,8 @@ $config['datadir'] = null; // default to install directory
| 'display_freq' Show or Hide frequnecy info
*/
$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
$config['locator'] = "%baselocator%";
$config['table_name'] = 'TABLE_HRD_CONTACTS_V01';
$config['locator'] = '%baselocator%';
$config['display_freq'] = true;
/*
@@ -42,8 +42,8 @@ $config['display_freq'] = true;
| 'use_fullname' Get full names from QRZ, may not be GDPR compliant
*/
$config['qrz_username'] = "%qrz_username%";
$config['qrz_password'] = "%qrz_password%";
$config['qrz_username'] = '%qrz_username%';
$config['qrz_password'] = '%qrz_password%';
$config['use_fullname'] = false;
/*
@@ -54,8 +54,8 @@ $config['use_fullname'] = false;
| 'hamqth_username' HamQTH user login
| 'hamqth_password' HamQTH user password
*/
$config['hamqth_username'] = "%hamqth_username%";
$config['hamqth_password'] = "%hamqth_password%";
$config['hamqth_username'] = '%hamqth_username%';
$config['hamqth_password'] = '%hamqth_password%';
/*
|--------------------------------------------------------------------------
@@ -70,11 +70,11 @@ $config['hamqth_password'] = "%hamqth_password%";
*/
$config['use_auth'] = true;
$config['auth_table'] = "users";
$config['auth_mode'] = "3";
$config['auth_table'] = 'users';
$config['auth_mode'] = '3';
$config['auth_level'][3] = "Operator";
$config['auth_level'][99] = "Administrator";
$config['auth_level'][3] = 'Operator';
$config['auth_level'][99] = 'Administrator';
/*
|--------------------------------------------------------------------------
@@ -676,4 +676,4 @@ $config['proxy_ips'] = '';
|
*/
$config['userdata'] = "userdata";
$config['userdata'] = 'userdata';

View File

@@ -117,9 +117,13 @@ class Core
// Open the file
$database_file = file_get_contents($template_path);
// Sanitize DB Password from single quotes
$sanitized_db_pwd = preg_replace("/\\\\/i",'\\\\\\\\',$data['db_password']); // Escape the Escape char ( '\' becomes '\\' )
$sanitized_db_pwd = preg_replace("/\'/i",'\\\\\'',$sanitized_db_pwd); // Escape the ' ( ' becomes \' )
$new = str_replace("%HOSTNAME%", $data['db_hostname'], $database_file);
$new = str_replace("%USERNAME%", $data['db_username'], $new);
$new = str_replace("%PASSWORD%", $data['db_password'], $new);
$new = str_replace("%PASSWORD%", $sanitized_db_pwd, $new);
$new = str_replace("%DATABASE%", $data['db_name'], $new);
// Write the new database.php file

View File

@@ -1462,4 +1462,4 @@ global $wavelog_url;
<?php endif; ?>
</html>
</html>