diff --git a/application/config/migration.php b/application/config/migration.php index 7bdc9b40..fc454147 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 173; +$config['migration_version'] = 174; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Components.php b/application/controllers/Components.php index 94fdd0f9..63d80718 100644 --- a/application/controllers/Components.php +++ b/application/controllers/Components.php @@ -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); + } } diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index db31db91..25b7b438 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -202,6 +202,8 @@ class Contesting extends CI_Controller { $custom_date_format = $this->session->userdata('user_date_format'); $abstimeb4=date($custom_date_format, strtotime($result->row()->COL_TIME_OFF)).' '.date('H:i',strtotime($result->row()->COL_TIME_OFF)); echo json_encode(array('message' => 'Worked at '.$abstimeb4.' ('.$timeb4.' ago) before')); + } else { + echo json_encode(array('message' => 'OKAY')); } return; } diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index e6df2b75..ef1f4015 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -89,6 +89,64 @@ class Dashboard extends CI_Controller $data['total_countries_confirmed_eqsl'] = $CountriesBreakdown['Countries_Worked_EQSL']; $data['total_countries_confirmed_lotw'] = $CountriesBreakdown['Countries_Worked_LOTW']; + $data['dashboard_upcoming_dx_card'] = false; + $data['dashboard_qslcard_card'] = false; + $data['dashboard_eqslcard_card'] = false; + $data['dashboard_lotw_card'] = false; + $data['dashboard_vuccgrids_card'] = false; + + $dashboard_options = $this->user_options_model->get_options('dashboard')->result(); + + foreach ($dashboard_options as $item) { + $option_name = $item->option_name; + $option_key = $item->option_key; + $option_value = $item->option_value; + + if ($option_name == 'dashboard_upcoming_dx_card' && $option_key == 'enabled') { + if($option_value == 'true') { + $data['dashboard_upcoming_dx_card'] = true; + } else { + $data['dashboard_upcoming_dx_card'] = false; + } + } + + if ($option_name == 'dashboard_qslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_qslcard_card'] = true; + } else { + $data['dashboard_qslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_eqslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_eqslcard_card'] = true; + } else { + $data['dashboard_eqslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_lotw_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_lotw_card'] = true; + } else { + $data['dashboard_lotw_card'] = false; + } + } + + if ($option_name == 'dashboard_vuccgrids_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_vuccgrids_card'] = true; + + $data['vucc'] = $this->vucc->fetchVuccSummary(); + $data['vuccSAT'] = $this->vucc->fetchVuccSummary('SAT'); + } else { + $data['dashboard_vuccgrids_card'] = false; + } + } + } + + $QSLStatsBreakdownArray = $this->logbook_model->get_QSLStats($logbooks_locations_array); $data['total_qsl_sent'] = $QSLStatsBreakdownArray['QSL_Sent']; @@ -115,9 +173,6 @@ class Dashboard extends CI_Controller $data['last_five_qsos'] = $this->logbook_model->get_last_qsos('18', $logbooks_locations_array); - $data['vucc'] = $this->vucc->fetchVuccSummary(); - $data['vuccSAT'] = $this->vucc->fetchVuccSummary('SAT'); - $data['page_title'] = "Dashboard"; $this->load->model('dxcc'); diff --git a/application/controllers/User.php b/application/controllers/User.php index dbff5ef4..2c63e423 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -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,87 @@ class User extends CI_Controller { $data['user_winkey'] = $q->winkey; } + $this->load->model('user_options_model'); + $hamsat_user_object = $this->user_options_model->get_options('hamsat')->result(); + + if($this->input->post('user_hamsat_key', true)) { + $data['user_hamsat_key'] = $this->input->post('user_hamsat_key', true); + } else { + // get $q->hamsat_key if its set if not null + if(isset($hamsat_user_object[0]->option_value)) { + $data['user_hamsat_key'] = $hamsat_user_object[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 { + if(isset($hamsat_user_object[1]->option_value)) { + $data['user_hamsat_workable_only'] = $hamsat_user_object[1]->option_value; + } else { + $data['user_hamsat_workable_only'] = ""; + } + } + + // Get Settings for Dashboard + + // Set defaults + $data['dashboard_upcoming_dx_card'] = false; + $data['dashboard_qslcard_card'] = false; + $data['dashboard_eqslcard_card'] = false; + $data['dashboard_lotw_card'] = false; + $data['dashboard_vuccgrids_card'] = false; + + $dashboard_options = $this->user_options_model->get_options('dashboard')->result(); + + foreach ($dashboard_options as $item) { + $option_name = $item->option_name; + $option_key = $item->option_key; + $option_value = $item->option_value; + + if ($option_name == 'dashboard_upcoming_dx_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_upcoming_dx_card'] = true; + } else { + $data['dashboard_upcoming_dx_card'] = false; + } + } + + if ($option_name == 'dashboard_qslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_qslcard_card'] = true; + } else { + $data['dashboard_qslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_eqslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_eqslcard_card'] = true; + } else { + $data['dashboard_eqslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_lotw_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_lotw_card'] = true; + } else { + $data['dashboard_lotw_card'] = false; + } + } + + if ($option_name == 'dashboard_vuccgrids_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_vuccgrids_card'] = true; + } else { + $data['dashboard_vuccgrids_card'] = false; + } + } + } + // [MAP Custom] GET user options // $this->load->model('user_options_model'); $options_object = $this->user_options_model->get_options('map_custom')->result(); @@ -553,6 +638,36 @@ class User extends CI_Controller { $this->input->set_cookie($cookie); } if($this->session->userdata('user_id') == $this->input->post('id', true)) { + if (isset($_POST['user_dashboard_enable_dxpedition_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_upcoming_dx_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_upcoming_dx_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_qslcards_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_qslcards_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_qslcards_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_eqslcards_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_eqslcards_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_eqslcards_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_lotw_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_lotw_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_lotw_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_vuccgrids_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_vuccgrids_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_vuccgrids_card', array('enabled' => 'false')); + } + // [MAP Custom] ADD to user options // $array_icon = array('station','qso','qsoconfirm'); foreach ($array_icon as $icon) { @@ -580,7 +695,6 @@ class User extends CI_Controller { return; } $data['page_title'] = "Edit User"; - $this->load->view('interface_assets/header', $data); $data['user_name'] = $this->input->post('user_name', true); $data['user_email'] = $this->input->post('user_email', true); @@ -614,6 +728,11 @@ class User extends CI_Controller { $data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter'); $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'); } diff --git a/application/language/bulgarian/account_lang.php b/application/language/bulgarian/account_lang.php index e71da6d1..339c8213 100644 --- a/application/language/bulgarian/account_lang.php +++ b/application/language/bulgarian/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/chinese_simplified/account_lang.php b/application/language/chinese_simplified/account_lang.php index 13a72ea9..ffcf33d3 100644 --- a/application/language/chinese_simplified/account_lang.php +++ b/application/language/chinese_simplified/account_lang.php @@ -127,3 +127,8 @@ $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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/czech/account_lang.php b/application/language/czech/account_lang.php index b524c7f2..2e51f130 100644 --- a/application/language/czech/account_lang.php +++ b/application/language/czech/account_lang.php @@ -127,3 +127,8 @@ $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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/dutch/account_lang.php b/application/language/dutch/account_lang.php index 72491743..7387aef3 100644 --- a/application/language/dutch/account_lang.php +++ b/application/language/dutch/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/english/account_lang.php b/application/language/english/account_lang.php index a461e07e..045160f7 100644 --- a/application/language/english/account_lang.php +++ b/application/language/english/account_lang.php @@ -127,3 +127,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 https://hams.at/users/settings."; +$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."; diff --git a/application/language/finnish/account_lang.php b/application/language/finnish/account_lang.php index 217044f2..0a2e51e2 100644 --- a/application/language/finnish/account_lang.php +++ b/application/language/finnish/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/french/account_lang.php b/application/language/french/account_lang.php index 9f5dd6a3..1b41f785 100644 --- a/application/language/french/account_lang.php +++ b/application/language/french/account_lang.php @@ -124,4 +124,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/german/account_lang.php b/application/language/german/account_lang.php index e9e4cac6..0499cb58 100644 --- a/application/language/german/account_lang.php +++ b/application/language/german/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Zeige nur Überflüge an, die gearbeitet werden können"; diff --git a/application/language/greek/account_lang.php b/application/language/greek/account_lang.php index d832b6cc..1891aba4 100644 --- a/application/language/greek/account_lang.php +++ b/application/language/greek/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/italian/account_lang.php b/application/language/italian/account_lang.php index 439380ef..9b0ad70d 100644 --- a/application/language/italian/account_lang.php +++ b/application/language/italian/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/polish/account_lang.php b/application/language/polish/account_lang.php index b163ed3f..9a7ea542 100644 --- a/application/language/polish/account_lang.php +++ b/application/language/polish/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/russian/account_lang.php b/application/language/russian/account_lang.php index 3022af13..32b2c521 100644 --- a/application/language/russian/account_lang.php +++ b/application/language/russian/account_lang.php @@ -126,4 +126,10 @@ $lang['account_general_information'] = "Основные данные"; $lang['account_qso_logging_options'] = "Настройки записи QSO"; $lang['account_third_party_services'] = "Сторонние сервисы"; $lang['account_default_values'] = "Значения по умолчанию"; -$lang['account_miscellaneous'] = "Разное"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$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."; diff --git a/application/language/spanish/account_lang.php b/application/language/spanish/account_lang.php index c0e4eb2a..cedf07ea 100644 --- a/application/language/spanish/account_lang.php +++ b/application/language/spanish/account_lang.php @@ -127,3 +127,8 @@ $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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/swedish/account_lang.php b/application/language/swedish/account_lang.php index 5cad692a..a63fdbc1 100644 --- a/application/language/swedish/account_lang.php +++ b/application/language/swedish/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/language/turkish/account_lang.php b/application/language/turkish/account_lang.php index 60ba989f..867fa937 100644 --- a/application/language/turkish/account_lang.php +++ b/application/language/turkish/account_lang.php @@ -126,4 +126,9 @@ $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"; \ No newline at end of file +$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 https://hams.at/users/settings."; +$lang['account_hamsat_workable_only'] = "Show Workable Passes Only"; diff --git a/application/migrations/174_tag_2_6_7.php b/application/migrations/174_tag_2_6_7.php new file mode 100644 index 00000000..34eb4441 --- /dev/null +++ b/application/migrations/174_tag_2_6_7.php @@ -0,0 +1,30 @@ +db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.6.7')); + + // 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')); + + } + + public function down() + { + $this->db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.6.6')); + } +} \ No newline at end of file diff --git a/application/models/Qsl_model.php b/application/models/Qsl_model.php index 1fdc317b..d4232a17 100644 --- a/application/models/Qsl_model.php +++ b/application/models/Qsl_model.php @@ -1,25 +1,32 @@ load->model('logbooks_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - $this->db->select('*'); - $this->db->from($this->config->item('table_name')); - $this->db->join('qsl_images', 'qsl_images.qsoid = ' . $this->config->item('table_name') . '.col_primary_key'); - $this->db->where_in('station_id', $logbooks_locations_array); - $this->db->order_by("id", "desc"); + if (is_array($logbooks_locations_array) && !empty($logbooks_locations_array)) { + $this->db->select('*'); + $this->db->from($this->config->item('table_name')); + $this->db->join('qsl_images', 'qsl_images.qsoid = ' . $this->config->item('table_name') . '.col_primary_key'); + $this->db->where_in('station_id', $logbooks_locations_array); + $this->db->order_by("id", "desc"); - return $this->db->get(); + return $this->db->get(); + } else { + return false; + } } - function getQslForQsoId($id) { + function getQslForQsoId($id) + { // Clean ID $clean_id = $this->security->xss_clean($id); // be sure that QSO belongs to user - $CI =& get_instance(); + $CI = &get_instance(); $CI->load->model('logbook_model'); if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) { return; @@ -32,12 +39,13 @@ class Qsl_model extends CI_Model { return $this->db->get()->result(); } - function saveQsl($qsoid, $filename) { + function saveQsl($qsoid, $filename) + { // Clean ID $clean_id = $this->security->xss_clean($qsoid); // be sure that QSO belongs to user - $CI =& get_instance(); + $CI = &get_instance(); $CI->load->model('logbook_model'); if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) { return; @@ -53,12 +61,13 @@ class Qsl_model extends CI_Model { return $this->db->insert_id(); } - function deleteQsl($id) { + function deleteQsl($id) + { // Clean ID $clean_id = $this->security->xss_clean($id); // be sure that QSO belongs to user - $CI =& get_instance(); + $CI = &get_instance(); $CI->load->model('logbook_model'); $this->db->select('qsoid'); $this->db->from('qsl_images'); @@ -72,12 +81,13 @@ class Qsl_model extends CI_Model { $this->db->delete('qsl_images', array('id' => $clean_id)); } - function getFilename($id) { + function getFilename($id) + { // Clean ID $clean_id = $this->security->xss_clean($id); // be sure that QSO belongs to user - $CI =& get_instance(); + $CI = &get_instance(); $CI->load->model('logbook_model'); $this->db->select('qsoid'); $this->db->from('qsl_images'); @@ -94,37 +104,39 @@ class Qsl_model extends CI_Model { return $this->db->get(); } - function searchQsos($callsign) { - $CI =& get_instance(); + function searchQsos($callsign) + { + $CI = &get_instance(); $CI->load->model('logbooks_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - $this->db->select('*'); - $this->db->from($this->config->item('table_name')); - $this->db->where_in('station_id', $logbooks_locations_array); - $this->db->where('col_call', $callsign); + $this->db->select('*'); + $this->db->from($this->config->item('table_name')); + $this->db->where_in('station_id', $logbooks_locations_array); + $this->db->where('col_call', $callsign); - return $this->db->get(); - } + return $this->db->get(); + } - function addQsotoQsl($qsoid, $filename) { - $clean_qsoid = $this->security->xss_clean($qsoid); - $clean_filename = $this->security->xss_clean($filename); + function addQsotoQsl($qsoid, $filename) + { + $clean_qsoid = $this->security->xss_clean($qsoid); + $clean_filename = $this->security->xss_clean($filename); - // be sure that QSO belongs to user - $CI =& get_instance(); - $CI->load->model('logbook_model'); - if (!$CI->logbook_model->check_qso_is_accessible($clean_qsoid)) { - return; - } + // be sure that QSO belongs to user + $CI = &get_instance(); + $CI->load->model('logbook_model'); + if (!$CI->logbook_model->check_qso_is_accessible($clean_qsoid)) { + return; + } - $data = array( - 'qsoid' => $clean_qsoid, - 'filename' => $filename - ); + $data = array( + 'qsoid' => $clean_qsoid, + 'filename' => $filename + ); - $this->db->insert('qsl_images', $data); + $this->db->insert('qsl_images', $data); - return $this->db->insert_id(); - } + return $this->db->insert_id(); + } } diff --git a/application/models/User_model.php b/application/models/User_model.php index 57c97a05..34b499ba 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -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 @@ -202,6 +203,8 @@ class User_Model extends CI_Model { $insert_id = $this->db->insert_id(); $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, pota, sig, sota, uscounties, was, wwff, vucc) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); $this->db->query("insert into paper_types (user_id,paper_name,metric,width,orientation,height) SELECT ".$insert_id.", paper_name, metric, width, orientation,height FROM paper_types where user_id = -1;"); + $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 { return EUSERNAMEEXISTS; @@ -252,6 +255,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']; @@ -308,6 +314,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 { @@ -380,7 +387,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); diff --git a/application/models/User_options_model.php b/application/models/User_options_model.php index f5cff23e..1c4cacd5 100644 --- a/application/models/User_options_model.php +++ b/application/models/User_options_model.php @@ -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)) { diff --git a/application/views/components/hamsat/table.php b/application/views/components/hamsat/table.php index e0b41b29..8238d644 100644 --- a/application/views/components/hamsat/table.php +++ b/application/views/components/hamsat/table.php @@ -1,116 +1,154 @@

Hamsat - Satellite Rovers

-

This data is from https://hams.at/

+

This data is from https://hams.at/. + +

+ +
+ Private feed key empty. Please set the feed key in your profile. +
+
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
DateTimeCallsignCommentSatelliteGridsquare(s)
- 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/cloudlog.php - $custom_date_format = $this->config->item('qso_date_format'); - } - - ?> - - - - - - - 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 "".$rove['callsign'].""; - } else { - echo $rove['callsign']; - } - ?> - - - "> - - - logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT"); - if ($worked != 0) { - echo " " . $grid . ""; + + + + + + + + + + + + + + + + + + + - - - - - - -
DateTimeCallsignCommentSatelliteModeGridsquare(s)Workable
+ session->userdata('user_date_format')) { + // If Logged in and session exists + $custom_date_format = $this->session->userdata('user_date_format'); } else { - echo " " . $grid . ""; + // Get Default date format from /config/wavelog.php + $custom_date_format = $this->config->item('qso_date_format'); } - } - ?> - - - TrackSked
+ + ?> + + + +
+ + + 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 "".$rove['callsign'].""; + } else { + echo $rove['callsign']; + } + ?> + + + "> + + + logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT"); + if ($worked != 0) { + echo " " . $grid . ""; + } else { + echo " " . $grid . ""; + } + } + ?> + + + + No"; + } + } else { + echo "Unknown"; + } + ?> + Track + + Sked + +
+
diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 63b0822a..99b49f88 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -296,8 +296,10 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
-
- + +
+ +
@@ -345,7 +347,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
- + + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_qsl_sent != 0 || $total_qsl_rcvd != 0 || $total_qsl_requested != 0)) { ?> @@ -372,7 +375,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_eqsl_sent != 0 || $total_eqsl_rcvd != 0)) { ?> @@ -393,7 +398,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_lotw_sent != 0 || $total_lotw_rcvd != 0)) { ?> @@ -414,6 +421,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_qrz_sent != 0 || $total_qrz_rcvd != 0)) { ?> @@ -436,6 +444,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE)) { ?> @@ -457,6 +466,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ diff --git a/application/views/qslcard/index.php b/application/views/qslcard/index.php index 38cb3f05..1c9933cc 100644 --- a/application/views/qslcard/index.php +++ b/application/views/qslcard/index.php @@ -18,7 +18,7 @@ $custom_date_format = $this->config->item('qso_date_format'); } - if (is_array($qslarray->result())) { + if ($qslarray !== FALSE && is_array($qslarray->result())) { echo ' @@ -57,6 +57,8 @@ } echo '
'; + } else { + echo ''; } ?> diff --git a/application/views/user/edit.php b/application/views/user/edit.php index 0e8d4923..eddb75ba 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -1,614 +1,876 @@

- ".$user_name.""; - } - ?> - + " . $user_name . ""; + } + ?> +

- session->flashdata('success')) { ?> + session->flashdata('success')) { ?>
- session->flashdata('success'); ?> + session->flashdata('success'); ?>
- session->flashdata('message')) { ?> + session->flashdata('message')) { ?>
- session->flashdata('message'); ?> + session->flashdata('message'); ?>
- -
- x - -
+ +
+ x + +
load->helper('form'); ?>
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - ".$username_error.""; } ?> -
- -
- - - ".$email_error.""; } ?> -
- -
- -
- - -
- ".$password_error.""; } else { ?> - - -
- -
-
- - session->userdata('user_type') == 99) { ?> - - config->item('auth_level'); - echo $l[$user_type]; - }?> -
-
-
-
- - -
-
-
-
-
- - - ".$firstname_error.""; } else { ?> - -
- -
- - - ".$lastname_error.""; } else { ?> - -
-
-
-
- -
-
-
-
-
- - - ".$callsign_error.""; } else { ?> - -
- -
- - - ".$locator_error.""; } else { ?> - -
-
-
-
-
-
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - -
-
- config->item('cl_multilanguage')) { ?> +
+ +
+

+ +

+
+
+
+ +
+
+
+
- - - + + + " . $username_error . ""; + } ?>
- -
- - -
+
+ + + " . $email_error . ""; + } ?> +
-
- - - - -
+
+ +
+ + +
+ " . $password_error . ""; + } else { ?> + + +
-
- - - - +
+
+ + session->userdata('user_type') == 99) { ?> + + config->item('auth_level'); + echo $l[$user_type]; + } ?> +
-
- -
-
-
-
-
- - - -
+ +
+
+
+
+
+ + + " . $firstname_error . ""; + } else { ?> + +
-
- - - -
- -
- - - -
- -
- - - -
- -
- - - +
+ + + " . $lastname_error . ""; + } else { ?> + +
-
+ +
+
+
+
+
+ + + " . $callsign_error . ""; + } else { ?> + +
- -
-
-
-
-
- - - - -
- -
-
- - - - -
- -
-
- - - - -
- -
- - - - -
- -
- - - - -
- -
- - - - +
+ + + " . $locator_error . ""; + } else { ?> + +
- -
- -
-
-
-
-
- - - -
- -
-
- - - - -
- -
- - - - -
-
-
-
- - - session->userdata('user_id') == $this->uri->segment(3)) { ?> -
-
-
lang->line('account_map_params'); ?>
-
-
-
-
-
-
-
-
- -
lang->line('general_word_not_display'),0,10).'.':("")); ?>
-
-
- ".(($val=="0")?$this->lang->line('general_word_not_display'):("")).""; - } ?> -
-
-
-
" data-icon="station" />
-
-
-
- -
-
-
- -
"; ?>
-
-
- "; - } ?> -
-
-
- -
-
-
-
- - -
-
-
- -
lang->line('general_word_no'):("")); ?>
-
-
- ".(($val=="0")?$this->lang->line('general_word_no'):("")).""; - } ?> -
-
-
- " data-icon="qsoconfirm" /> -
-
-
-
- -
-
- + foldername . '" ' . (($user_stylesheet == $theme->foldername) ? 'selected="selected"' : "") . '>' . $theme->name . ''; + } + ?>
-
-
-
-
- -
+
+ config->item('cl_multilanguage')) { ?> +
+ + + +
+ -
- -
-
-
-
-
- - - -
+
+ + +
-
-
-
-
-
-
-
- -
-

- -

-
-
-
- -
-
- -
-
- - - + + +
+ +
+ + + + +
-
- -
- '; ?> - +
+
+ +
+
+
Dashboard Options
+
+
+
+ > + +
+ +
+ > + +
+ +
+ > + +
+ +
+ > + +
+ +
+ > + +
-
- '; ?> - +
+
+
+ +
+ +
+
+
+
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
-
- '; ?> - +
+
+ + +
+
+
+
+
+ + + + +
+ +
+
+ + + + +
+ +
+
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
-
- '; ?> - +
+
+
+ +
+ +
+
+
+
+
+ + + +
+ +
+
+ + + + +
+ +
+ + + + +
+
+
+
+ + + session->userdata('user_id') == $this->uri->segment(3)) { ?> +
+
+
lang->line('account_map_params'); ?>
+
+
+
+
+
+
+
+
+ +
lang->line('general_word_not_display'), 0, 10) . '.' : ("")); ?>
+
+
+ " . (($val == "0") ? $this->lang->line('general_word_not_display') : ("")) . ""; + } ?> +
+
+
+
" data-icon="station" /> +
+
+
+
+ +
+
+
+ +
"; ?>
+
+
+ "; + } ?> +
+
+
+ +
+
+
+
+ + +
+
+
+ +
lang->line('general_word_no') : ("")); ?>
+
+
+ " . (($val == "0") ? $this->lang->line('general_word_no') : ("")) . ""; + } ?> +
+
+
+ " data-icon="qsoconfirm" /> +
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+ + + +
+
@@ -616,159 +878,291 @@
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - ".$userlotwname_error.""; } ?> -
- -
- -
- - + +
+

+ +

+
+
+
+ +
+
+ +
+
+ + + +
+
+ +
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
- ".$lotwpassword_error.""; } else { ?> - - -
-
-
-
- - -
-
-
-
-
- - - ".$eqslusername_error.""; } ?> -
- -
- -
- - -
- ".$eqslpassword_error.""; } else { ?> - - -
-
-
-
- - -
-
-
-
-
- - - - ".$userclublogname_error.""; } ?> -
- -
- -
- - -
- ".$clublogpassword_error.""; } else { ?> - -
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - + +
+

+ +

+
+
+
+ +
+
+
+
+
+ + + " . $userlotwname_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $lotwpassword_error . ""; + } else { ?> + + +
+
-
-
- -
-
-
-
-
- - - + +
+
+
+
+
+ + + " . $eqslusername_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $eqslpassword_error . ""; + } else { ?> + + +
+
-
-
- -
-
-
-
-
- - - - + +
+
+
+
+
+ + + + " . $userclublogname_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $clublogpassword_error . ""; + } else { ?> + + +
+
+ +
+

+ +

+
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+
+ + + + +
+
+
+
+
+ +
+ +
+
+
+
+
+ + + +
+
+ + + + +
+
+
+
+ +
+
+
+
-
-
- - - -
+ + + +
\ No newline at end of file diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index 4942712b..9041a4cd 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -247,11 +247,11 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> \ No newline at end of file diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 0e0acdfe..11f4964e 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -336,6 +336,8 @@ COL_DARC_DOK)) { ?> COL_DARC_DOK; ?> + COL_DARC_DOK)) { ?> + COL_DARC_DOK; ?> COL_DARC_DOK)) { ?> COL_DARC_DOK; ?> diff --git a/assets/css/superhero/overrides.css b/assets/css/superhero/overrides.css index ae46b52b..fd041bc4 100644 --- a/assets/css/superhero/overrides.css +++ b/assets/css/superhero/overrides.css @@ -209,4 +209,8 @@ div.alert-danger { width: 33%; color: #000; box-shadow: none !important; +} + +#upcoming_dxccs_component a { + color: darkblue; } \ No newline at end of file diff --git a/assets/css/superhero_wide/overrides.css b/assets/css/superhero_wide/overrides.css index da0f9f8b..c58401ce 100644 --- a/assets/css/superhero_wide/overrides.css +++ b/assets/css/superhero_wide/overrides.css @@ -263,4 +263,8 @@ div.alert-danger { width: 33%; color: #000; box-shadow: none !important; +} + +#upcoming_dxccs_component a { + color: darkblue; } \ No newline at end of file diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 31ff8fb6..1ce2b5eb 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -103,6 +103,11 @@ $(function () { }); }); +// checked if worked before after blur +$("#callsign").blur(function () { + checkIfWorkedBefore(); +}); + // Here we capture keystrokes to execute functions document.onkeyup = function (e) { // ALT-W wipe @@ -217,8 +222,8 @@ $("#callsign").keyup(function () { highlight(call.toUpperCase()); } }); - - checkIfWorkedBefore(); + // moved to blur + // checkIfWorkedBefore(); var qTable = $('.qsotable').DataTable(); qTable.search(call).draw(); } @@ -242,10 +247,21 @@ function checkIfWorkedBefore() { }, success: function (result) { if (result.message.substr(0, 6) == 'Worked') { + $('#callsign_info').removeClass('text-bg-success'); + $('#callsign_info').addClass('text-bg-danger'); $('#callsign_info').text(result.message); } + else if (result.message == "OKAY") { + $('#callsign_info').removeClass('text-bg-danger'); + $('#callsign_info').addClass('text-bg-success'); + $('#callsign_info').text("Go Work Them!"); + } else { + $('#callsign_info').text(""); + } } }); + } else { + $('#callsign_info').text(""); } }