From 4235bbb2de84adcb833a0849c2db65093996e220 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 3 Sep 2024 00:03:06 +0200 Subject: [PATCH] Distances worked analytics: filter on mode and power --- .gitignore | 1 + application/controllers/Distances.php | 25 ++++++++-- .../language/bulgarian/general_words_lang.php | 1 + .../language/bulgarian/statistics_lang.php | 7 ++- .../chinese_simplified/general_words_lang.php | 1 + .../chinese_simplified/statistics_lang.php | 3 ++ .../language/czech/general_words_lang.php | 1 + .../language/czech/statistics_lang.php | 7 ++- .../language/dutch/general_words_lang.php | 1 + .../language/english/general_words_lang.php | 1 + .../language/english/statistics_lang.php | 7 ++- .../language/finnish/general_words_lang.php | 1 + .../language/finnish/statistics_lang.php | 7 ++- .../language/french/general_words_lang.php | 19 ++++---- application/language/french/qso_lang.php | 2 +- .../language/french/statistics_lang.php | 7 ++- .../language/german/general_words_lang.php | 1 + .../language/german/statistics_lang.php | 7 ++- .../language/greek/general_words_lang.php | 1 + .../language/greek/statistics_lang.php | 7 ++- .../language/italian/general_words_lang.php | 1 + .../language/italian/statistics_lang.php | 7 ++- .../language/polish/general_words_lang.php | 1 + .../language/polish/statistics_lang.php | 7 ++- .../language/russian/general_words_lang.php | 1 + .../language/russian/statistics_lang.php | 5 +- .../language/spanish/general_words_lang.php | 3 +- .../language/spanish/statistics_lang.php | 7 ++- .../language/swedish/general_words_lang.php | 2 + .../language/swedish/statistics_lang.php | 7 ++- .../language/turkish/general_words_lang.php | 1 + .../language/turkish/statistics_lang.php | 7 ++- application/models/Bands.php | 22 +++++++++ application/models/Distances_model.php | 47 +++++++++++++++---- application/views/distances/index.php | 23 ++++++++- assets/js/sections/distances.js | 6 ++- 36 files changed, 203 insertions(+), 51 deletions(-) diff --git a/.gitignore b/.gitignore index 89394e87..ceb3329c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ sync.sh .env /node_modules /.vs +.vscode/sftp.json diff --git a/application/controllers/Distances.php b/application/controllers/Distances.php index 1854fb5b..9812ada2 100644 --- a/application/controllers/Distances.php +++ b/application/controllers/Distances.php @@ -17,8 +17,12 @@ class Distances extends CI_Controller { $data['page_title'] = "Distances Worked"; $this->load->model('bands'); + $this->load->model('gridmap_model'); + $data['bands_available'] = $this->bands->get_worked_bands_distances(); $data['sats_available'] = $this->bands->get_worked_sats(); + $data['modes'] = $this->gridmap_model->get_worked_modes(); + $data['powers'] = $this->bands->get_worked_powers(); $this->load->view('interface_assets/header', $data); $this->load->view('distances/index'); @@ -72,12 +76,27 @@ class Distances extends CI_Controller { $distance = $this->security->xss_clean($this->input->post('distance')); $band = $this->security->xss_clean($this->input->post('band')); $sat = $this->security->xss_clean($this->input->post('sat')); + $mode = $this->security->xss_clean($this->input->post('mode')); + $power = $this->security->xss_clean($this->input->post('pwr')); - $data['results'] = $this->distances_model->qso_details($distance, $band, $sat); + $data['results'] = $this->distances_model->qso_details($distance, $band, $sat, $mode, $power); + + // Render Page + if (strtolower($band) == 'all') $band = lang('statistics_distances_bands_all'); + (strtolower($mode) == 'all') ? $mode = lang('statistics_distances_modes_all') : $mode = strtoupper($mode); + switch (strtolower($power)) { + case 'all': + $power = lang('statistics_distances_bands_all'); + break; + case '': + $power = lang('general_word_undefined'); + break; + default: + $power .= 'W'; + } - // Render Page $data['page_title'] = "Log View - " . $distance; - $data['filter'] = lang('statistics_distances_qsos_with') . " " . $distance . " " . lang('statistics_distances_and_band'). " " . $band; + $data['filter'] = lang('statistics_distances_qsos_with') . " " . $distance . lang('statistics_distances_and_band') . " " . $band . lang('statistics_distances_and_mode') . $mode . lang('statistics_distances_and_power') . $power; $this->load->view('awards/details', $data); } } diff --git a/application/language/bulgarian/general_words_lang.php b/application/language/bulgarian/general_words_lang.php index abde6b3e..1b5a159a 100644 --- a/application/language/bulgarian/general_words_lang.php +++ b/application/language/bulgarian/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Дата'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/bulgarian/statistics_lang.php b/application/language/bulgarian/statistics_lang.php index 70bb6103..dfae52d2 100644 --- a/application/language/bulgarian/statistics_lang.php +++ b/application/language/bulgarian/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/chinese_simplified/general_words_lang.php b/application/language/chinese_simplified/general_words_lang.php index 193d6428..cf86ac37 100644 --- a/application/language/chinese_simplified/general_words_lang.php +++ b/application/language/chinese_simplified/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "筛选打开"; $lang['general_word_not_display'] = "不显示"; $lang['general_word_icon'] = "图标"; $lang['general_word_never'] = "从不"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = '日期'; $lang['general_word_startdate'] = "开始时间"; diff --git a/application/language/chinese_simplified/statistics_lang.php b/application/language/chinese_simplified/statistics_lang.php index 76c298c3..724c5328 100644 --- a/application/language/chinese_simplified/statistics_lang.php +++ b/application/language/chinese_simplified/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "通联的 QSO 数量"; */ $lang['statistics_distances_bands_all'] = "全部"; +$lang['statistics_distances_modes_all'] = "全部"; $lang['statistics_distances_worked'] = "通联距离"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "次通联
您最远的通联是与"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "在网格"; @@ -35,6 +36,8 @@ $lang['statistics_distances_number_of_qsos'] = "QSO 数量"; $lang['statistics_distances_callsigns_worked'] = "通联的呼号(最多显示5个):"; $lang['statistics_distances_qsos_with'] = "QSO 与"; $lang['statistics_distances_and_band'] = "和波段"; +$lang['statistics_distances_and_mode'] = ", 模式 : "; +$lang['statistics_distances_and_power'] = ", 发射功率 : "; /* * diff --git a/application/language/czech/general_words_lang.php b/application/language/czech/general_words_lang.php index bfb0c5dc..b62c1d83 100644 --- a/application/language/czech/general_words_lang.php +++ b/application/language/czech/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/czech/statistics_lang.php b/application/language/czech/statistics_lang.php index 8ccc495d..806539e8 100644 --- a/application/language/czech/statistics_lang.php +++ b/application/language/czech/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/dutch/general_words_lang.php b/application/language/dutch/general_words_lang.php index 81304b69..ea4c6edf 100644 --- a/application/language/dutch/general_words_lang.php +++ b/application/language/dutch/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index c1a4b2bd..218d05c0 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Date'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/english/statistics_lang.php b/application/language/english/statistics_lang.php index a3576bf2..787f22b9 100644 --- a/application/language/english/statistics_lang.php +++ b/application/language/english/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/finnish/general_words_lang.php b/application/language/finnish/general_words_lang.php index d9d216e3..0d9ba564 100644 --- a/application/language/finnish/general_words_lang.php +++ b/application/language/finnish/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Päivä'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/finnish/statistics_lang.php b/application/language/finnish/statistics_lang.php index c7811d6b..68178728 100644 --- a/application/language/finnish/statistics_lang.php +++ b/application/language/finnish/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/french/general_words_lang.php b/application/language/french/general_words_lang.php index 368263ec..c345247f 100644 --- a/application/language/french/general_words_lang.php +++ b/application/language/french/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtré sur"; $lang['general_word_not_display'] = "Ne pas afficher"; $lang['general_word_icon'] = "Icône"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Indéfini(e)"; $lang['general_word_date'] = "Date"; $lang['general_word_startdate'] = "Date début"; @@ -124,8 +125,8 @@ $lang['gen_hamradio_station'] = "Station"; $lang['gen_hamradio_call'] = "QRZ"; $lang['gen_hamradio_callsign'] = "Indicatif"; -$lang['gen_hamradio_prefix'] = "Préfix"; -$lang['gen_hamradio_suffix'] = "Suffix"; +$lang['gen_hamradio_prefix'] = "Préfixe"; +$lang['gen_hamradio_suffix'] = "Suffixe"; $lang['gen_hamradio_de'] = "De"; $lang['gen_hamradio_dx'] = "Dx"; $lang['gen_hamradio_mode'] = "Mode"; @@ -136,8 +137,8 @@ $lang['gen_hamradio_rst_rcvd'] = "Reçu"; $lang['gen_hamradio_band'] = "Bande"; $lang['gen_hamradio_bandgroup'] = "Groupe de Bandes"; $lang['gen_hamradio_band_rx'] = "Bande (RX)"; -$lang['gen_hamradio_frequency'] = "Frequence"; -$lang['gen_hamradio_frequency_rx'] = "Frequence (RX)"; +$lang['gen_hamradio_frequency'] = "Fréquence"; +$lang['gen_hamradio_frequency_rx'] = "Fréquence (RX)"; $lang['gen_hamradio_radio'] = "Radio"; $lang['gen_hamradio_rsts'] = "RST (S)"; $lang['gen_hamradio_rstr'] = "RST (R)"; @@ -150,11 +151,11 @@ $lang['gen_hamradio_qsltype'] = "QSL Type"; $lang['gen_hamradio_qslvia'] = "QSL via"; $lang['gen_hamradio_qslmsg'] = "QSL Msg"; $lang['gen_hamradio_locator'] = "Locator"; -$lang['gen_hamradio_transmit_power'] = "Puissance Emission (W)"; -$lang['gen_hamradio_propagation_mode'] = "Mode Propagation"; +$lang['gen_hamradio_transmit_power'] = "Puissance d'émission (W)"; +$lang['gen_hamradio_propagation_mode'] = "Mode de propagation"; -$lang['gen_hamradio_satellite_name'] = "Nom du Satellite"; -$lang['gen_hamradio_satellite_mode'] = "Mode du Satellite"; +$lang['gen_hamradio_satellite_name'] = "Nom du satellite"; +$lang['gen_hamradio_satellite_mode'] = "Mode du satellite"; $lang['gen_hamradio_logbook'] = "Journal de trafic"; $lang['gen_hamradio_award'] = "Award"; @@ -166,7 +167,7 @@ $lang['gen_hamradio_dxcc'] = "DXCC"; $lang['gen_hamradio_deleted_dxcc'] = "DXCC Supprimé"; $lang['gen_hamradio_continent'] = "Continent"; $lang['gen_hamradio_usa_state'] = "Etat USA"; -$lang['gen_hamradio_county_reference'] = "Compté USA"; +$lang['gen_hamradio_county_reference'] = "Comté USA"; $lang['gen_hamradio_iota_reference'] = "Référence IOTA"; $lang['gen_hamradio_sota_reference'] = "Référence SOTA"; $lang['gen_hamradio_wwff_reference'] = "Référence WWFF"; diff --git a/application/language/french/qso_lang.php b/application/language/french/qso_lang.php index 567fde91..340e2c2f 100644 --- a/application/language/french/qso_lang.php +++ b/application/language/french/qso_lang.php @@ -14,7 +14,7 @@ $lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown"; $lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign'; // Input Help Text on the /QSO Display -$lang['qso_transmit_power_helptext'] = 'Saisissez la ouissance en Watts en utilisant uniquement des chiffres.'; +$lang['qso_transmit_power_helptext'] = 'Saisissez la puissance en Watts en utilisant uniquement des chiffres.'; $lang['qso_sota_ref_helptext'] = 'Par exemple: GM/NS-001.'; $lang['qso_wwff_ref_helptext'] = 'Par exemple: DLFF-0069.'; diff --git a/application/language/french/statistics_lang.php b/application/language/french/statistics_lang.php index 930bee8a..bf93247e 100644 --- a/application/language/french/statistics_lang.php +++ b/application/language/french/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "QSOs réalisés"; */ $lang['statistics_distances_bands_all'] = "Toutes"; +$lang['statistics_distances_modes_all'] = "Tous"; $lang['statistics_distances_worked'] = "Nombre de QSOs réalisés par plage de distance"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts utilisés pour le graphique.
Le contact le plus lointain réalisé est "; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "avec le locator"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "La distanc $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "La distance moyenne est de"; $lang['statistics_distances_number_of_qsos'] = "Nombre de QSOs"; $lang['statistics_distances_callsigns_worked'] = "Indicatif(s) contacté(s) (liste de 5 max)"; -$lang['statistics_distances_qsos_with'] = "QSOs avec"; -$lang['statistics_distances_and_band'] = "et bandes"; +$lang['statistics_distances_qsos_with'] = "QSOs avec distance : "; +$lang['statistics_distances_and_band'] = ", bande : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", puissance : "; /* * diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index 4e8d2fe5..8beae5f9 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtern auf"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Nie"; +$lang['general_word_undefined'] = "Unbestimmt"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Datum"; diff --git a/application/language/german/statistics_lang.php b/application/language/german/statistics_lang.php index aa0071b1..2cc71c30 100644 --- a/application/language/german/statistics_lang.php +++ b/application/language/german/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# gearbeitete QSOs"; */ $lang['statistics_distances_bands_all'] = "Alle"; +$lang['statistics_distances_modes_all'] = "Alle"; $lang['statistics_distances_worked'] = "Gearbeitete Entfernungen"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "Kontakte wurden dargestellt.
Der weiteste Kontakt war"; // make sure'
' stays there $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "im Planquadrat"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "Die Distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "Die durchschnittliche Distanz ist"; $lang['statistics_distances_number_of_qsos'] = "Anzahl der QSOs"; $lang['statistics_distances_callsigns_worked'] = "Gearbeitete(s) Rufzeichen (max 5 werden gezeigt)"; -$lang['statistics_distances_qsos_with'] = "QSOs mit"; -$lang['statistics_distances_and_band'] = "und Band"; +$lang['statistics_distances_qsos_with'] = "QSOs mit Distanz : "; +$lang['statistics_distances_and_band'] = ", Band : "; +$lang['statistics_distances_and_mode'] = ", Mode : "; +$lang['statistics_distances_and_power'] = ", Sendeleistung : "; /* * diff --git a/application/language/greek/general_words_lang.php b/application/language/greek/general_words_lang.php index 3f1d4fd1..f166f7dd 100644 --- a/application/language/greek/general_words_lang.php +++ b/application/language/greek/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Ημερομηνία'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/greek/statistics_lang.php b/application/language/greek/statistics_lang.php index a3576bf2..787f22b9 100644 --- a/application/language/greek/statistics_lang.php +++ b/application/language/greek/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/italian/general_words_lang.php b/application/language/italian/general_words_lang.php index baaf3700..354998d7 100644 --- a/application/language/italian/general_words_lang.php +++ b/application/language/italian/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtro attivo"; $lang['general_word_not_display'] = "Non visualizzare"; $lang['general_word_icon'] = "Icona"; $lang['general_word_never'] = "Mai"; +$lang['general_word_undefined'] = "Indefinito"; $lang['general_word_date'] = 'Data'; $lang['general_word_startdate'] = "Data di inizio"; diff --git a/application/language/italian/statistics_lang.php b/application/language/italian/statistics_lang.php index 8c412c23..190ce5ff 100644 --- a/application/language/italian/statistics_lang.php +++ b/application/language/italian/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# di QSO effettuati"; */ $lang['statistics_distances_bands_all'] = "Tutte"; +$lang['statistics_distances_modes_all'] = "Tutte"; $lang['statistics_distances_worked'] = "Distanze percorse"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "i contatti sono stati tracciati.
Il tuo contatto più lontano era con"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "nella griglia"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "La distanz $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "La distanza media è"; $lang['statistics_distances_number_of_qsos'] = "Numero di QSO"; $lang['statistics_distances_callsigns_worked'] = "Nominativo(i) funzionante(i max 5 mostrati)"; -$lang['statistics_distances_qsos_with'] = "QSO con"; -$lang['statistics_distances_and_band'] = "e banda"; +$lang['statistics_distances_qsos_with'] = "QSO con distanza : "; +$lang['statistics_distances_and_band'] = ", banda : "; +$lang['statistics_distances_and_mode'] = ", modo : "; +$lang['statistics_distances_and_power'] = ", potenza : "; /* * diff --git a/application/language/polish/general_words_lang.php b/application/language/polish/general_words_lang.php index 49491058..88867f7f 100644 --- a/application/language/polish/general_words_lang.php +++ b/application/language/polish/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; $lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Data'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/polish/statistics_lang.php b/application/language/polish/statistics_lang.php index a3576bf2..787f22b9 100644 --- a/application/language/polish/statistics_lang.php +++ b/application/language/polish/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index f474eaa5..2ee32139 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Отфильтровано по"; $lang['general_word_not_display'] = "Не отображать"; $lang['general_word_icon'] = "Иконка"; $lang['general_word_never'] = "Никогда"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Дата'; $lang['general_word_startdate'] = "Дата начала"; diff --git a/application/language/russian/statistics_lang.php b/application/language/russian/statistics_lang.php index 127d9f17..2c6b1884 100644 --- a/application/language/russian/statistics_lang.php +++ b/application/language/russian/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# QSO проведено"; */ $lang['statistics_distances_bands_all'] = "все"; +$lang['statistics_distances_modes_all'] = "все"; $lang['statistics_distances_worked'] = "Сработанные дистанции"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "контакты отображены.
Наиболее дальний контакт с"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "в квадрате"; @@ -34,7 +35,9 @@ $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "Средн $lang['statistics_distances_number_of_qsos'] = "Количество QSO"; $lang['statistics_distances_callsigns_worked'] = "Сработанные позывные(ной) (максимально 5 показано)"; $lang['statistics_distances_qsos_with'] = "QSOs с"; -$lang['statistics_distances_and_band'] = "и диапазоне"; +$lang['statistics_distances_and_band'] = ", диапазоне : "; +$lang['statistics_distances_and_mode'] = ", Вид модуляции : "; +$lang['statistics_distances_and_power'] = ", Мощность передачи : "; /* * diff --git a/application/language/spanish/general_words_lang.php b/application/language/spanish/general_words_lang.php index 0dabe3c2..cc78f8d1 100644 --- a/application/language/spanish/general_words_lang.php +++ b/application/language/spanish/general_words_lang.php @@ -26,7 +26,8 @@ $lang['general_word_count'] = "Conteo"; $lang['general_word_filtering_on'] = "Filtrado por"; $lang['general_word_not_display'] = "No mostrar"; $lang['general_word_icon'] = "Icono"; - +$lang['general_word_never'] = "Nunca"; +$lang['general_word_undefined'] = "Indefinido"; $lang['general_word_date'] = 'Fecha'; $lang['general_word_startdate'] = "Fecha de inicio"; diff --git a/application/language/spanish/statistics_lang.php b/application/language/spanish/statistics_lang.php index 719734dd..b200ebca 100644 --- a/application/language/spanish/statistics_lang.php +++ b/application/language/spanish/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# de QSOs logradas"; */ $lang['statistics_distances_bands_all'] = "Todas"; +$lang['statistics_distances_modes_all'] = "Todas"; $lang['statistics_distances_worked'] = "Distancias Logradas"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contactos fueron dibujados.
Su contacto más lejano fue con"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "en gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "La distanc $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "La distancia promedio es"; $lang['statistics_distances_number_of_qsos'] = "Número de QSOs"; $lang['statistics_distances_callsigns_worked'] = "Indicativo(s) trabajados (se muestran máximo 5)"; -$lang['statistics_distances_qsos_with'] = "QSOs con"; -$lang['statistics_distances_and_band'] = "y banda"; +$lang['statistics_distances_qsos_with'] = "QSOs con distancia : "; +$lang['statistics_distances_and_band'] = ", banda ; "; +$lang['statistics_distances_and_mode'] = ", modo : "; +$lang['statistics_distances_and_power'] = ", potencia : "; /* * diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index af79b081..b8201b2e 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -17,6 +17,8 @@ $lang['general_word_next'] = 'Next'; $lang['general_word_previous'] = 'Previous'; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_cancel'] = "Cancel"; $lang['general_word_ok'] = "OK"; diff --git a/application/language/swedish/statistics_lang.php b/application/language/swedish/statistics_lang.php index 66b5fc30..1ff46a2c 100644 --- a/application/language/swedish/statistics_lang.php +++ b/application/language/swedish/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "# of QSO's worked"; */ $lang['statistics_distances_bands_all'] = "All"; +$lang['statistics_distances_modes_all'] = "All"; $lang['statistics_distances_worked'] = "Distances Worked"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "contacts were plotted.
Your furthest contact was with"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "in gridsquare"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "The distan $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "The average distance is"; $lang['statistics_distances_number_of_qsos'] = "Number of QSOs"; $lang['statistics_distances_callsigns_worked'] = "Callsign(s) worked (max 5 shown)"; -$lang['statistics_distances_qsos_with'] = "QSOs with"; -$lang['statistics_distances_and_band'] = "and band"; +$lang['statistics_distances_qsos_with'] = "QSOs with distance : "; +$lang['statistics_distances_and_band'] = ", band : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", power : "; /* * diff --git a/application/language/turkish/general_words_lang.php b/application/language/turkish/general_words_lang.php index 49792572..8320c2d1 100644 --- a/application/language/turkish/general_words_lang.php +++ b/application/language/turkish/general_words_lang.php @@ -26,6 +26,7 @@ $lang['general_word_filtering_on'] = "Filtrele"; $lang['general_word_not_display'] = "Gösterme"; $lang['general_word_icon'] = "Ikon"; $lang['general_word_never'] = "Asla"; +$lang['general_word_undefined'] = "Undefined"; $lang['general_word_date'] = 'Tarih'; $lang['general_word_startdate'] = "Başlama Tarihi"; diff --git a/application/language/turkish/statistics_lang.php b/application/language/turkish/statistics_lang.php index 6f068169..34558cc9 100644 --- a/application/language/turkish/statistics_lang.php +++ b/application/language/turkish/statistics_lang.php @@ -26,6 +26,7 @@ $lang['statistics_number_of_qso_worked'] = "Çalışan QSO sayısı"; */ $lang['statistics_distances_bands_all'] = "Tüm"; +$lang['statistics_distances_modes_all'] = "Tüm"; $lang['statistics_distances_worked'] = "Çalışılan Mesafeler"; $lang['statistics_distances_part1_contacts_were_plotted_furthest'] = "kişiler planlandı.
En uzak bağlantınız şununlaydı"; $lang['statistics_distances_part2_contacts_were_plotted_furthest'] = "gridsquare'de"; @@ -33,8 +34,10 @@ $lang['statistics_distances_part3_contacts_were_plotted_furthest'] = "Mesafe şu $lang['statistics_distances_part4_contacts_were_plotted_furthest'] = "Ortalama mesafe"; $lang['statistics_distances_number_of_qsos'] = "QSO sayısı"; $lang['statistics_distances_callsigns_worked'] = "Çağrı işaretleri çalıştı (en fazla 5 tane gösterildi)"; -$lang['statistics_distances_qsos_with'] = "QSO'lar ile"; -$lang['statistics_distances_and_band'] = "ve bant"; +$lang['statistics_distances_qsos_with'] = "mesafeli QSO'lar ile"; +$lang['statistics_distances_and_band'] = ", bant : "; +$lang['statistics_distances_and_mode'] = ", mode : "; +$lang['statistics_distances_and_power'] = ", gücü : "; /* * diff --git a/application/models/Bands.php b/application/models/Bands.php index d3aac99c..4586b8d2 100644 --- a/application/models/Bands.php +++ b/application/models/Bands.php @@ -224,6 +224,28 @@ class Bands extends CI_Model { return $results; } + function get_worked_powers() { + $CI =& get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + if (!$logbooks_locations_array) { + return array(); + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + // get all worked powers from database + $sql = "SELECT distinct col_tx_pwr FROM ".$this->config->item('table_name')." WHERE station_id in (" . $location_list . ") ORDER BY col_tx_pwr"; + + $data = $this->db->query($sql); + + $worked_powers = array(); + foreach($data->result() as $row) array_push($worked_powers, $row->col_tx_pwr); + + return $worked_powers; + } + function activateall() { $data = array( 'active' => '1', diff --git a/application/models/Distances_model.php b/application/models/Distances_model.php index d895a019..e8f84336 100644 --- a/application/models/Distances_model.php +++ b/application/models/Distances_model.php @@ -37,6 +37,19 @@ class Distances_model extends CI_Model $this->db->where('col_band', $postdata['band']); } + if ($postdata['mode'] != 'all') { + $this->db->group_start()->where('col_mode', $postdata['mode'])->or_where('col_submode', $postdata['mode'])->group_end(); + } + + if ($postdata['pwr'] != 'all') { + if ($postdata['pwr']) { + $this->db->where('col_tx_pwr', $postdata['pwr']); + } else { + $this->db->where('col_tx_pwr is NULL'); + } + } + + $this->db->where('station_id', $station_id); $queryresult = $this->db->get($this->config->item('table_name')); @@ -83,6 +96,7 @@ class Distances_model extends CI_Model if(isset($result['qsodata'][$i]['callcount'])) { if ($result['qsodata'][$i]['callcount'] < 5 && $add['qsodata'][$i]['callcount'] > 0) { $calls = explode(',', $add['qsodata'][$i]['calls']); + $calls = array_unique($calls); foreach ($calls as $c) { if ($result['qsodata'][$i]['callcount'] < 5) { if ($result['qsodata'][$i]['callcount'] > 0) { @@ -178,19 +192,21 @@ class Distances_model extends CI_Model $this->db->where('COL_PRIMARY_KEY', $qso['COL_PRIMARY_KEY']); $this->db->update($this->config->item('table_name'), $data); } - $arrayplacement = (int)($bearingdistance / 50); // Resolution is 50, calculates where to put result in array + $arrayplacement = (int)($bearingdistance / 50); // Resolution is 50, calculates where to put result in array if ($bearingdistance > $qrb['Distance']) { // Saves the longest QSO $qrb['Distance'] = $bearingdistance; $qrb['Callsign'] = $qso['callsign']; $qrb['Grid'] = $qso['grid']; } - $dataarray[$arrayplacement]['count']++; // Used for counting total qsos plotted + $dataarray[$arrayplacement]['count']++; // Used for counting total qsos plotted if ($dataarray[$arrayplacement]['callcount'] < 5) { // Used for tooltip in graph, set limit to 5 calls shown - if ($dataarray[$arrayplacement]['callcount'] > 0) { - $dataarray[$arrayplacement]['calls'] .= ', '; + if (strpos($dataarray[$arrayplacement]['calls'], $qso['callsign']) === false) { // Avoids duplicated callsigns + if ($dataarray[$arrayplacement]['callcount'] > 0) { + $dataarray[$arrayplacement]['calls'] .= ', '; + } + $dataarray[$arrayplacement]['calls'] .= $qso['callsign']; + $dataarray[$arrayplacement]['callcount']++; } - $dataarray[$arrayplacement]['calls'] .= $qso['callsign']; - $dataarray[$arrayplacement]['callcount']++; } } @@ -223,7 +239,7 @@ class Distances_model extends CI_Model /* * Used to fetch QSOs from the logbook in the awards */ - public function qso_details($distance, $band, $sat){ + public function qso_details($distance, $band, $sat, $mode, $power){ $distarray = $this->getdistparams($distance); $CI =& get_instance(); $CI->load->model('logbooks_model'); @@ -238,8 +254,8 @@ class Distances_model extends CI_Model $this->db->where_in($this->config->item('table_name').'.station_id', $logbooks_locations_array); - if ($band != 'All') { - if($band != "sat") { + if ($band != 'all') { + if ($band != "sat") { $this->db->where('COL_PROP_MODE !=', 'SAT'); $this->db->where('COL_BAND', $band); } else { @@ -249,6 +265,19 @@ class Distances_model extends CI_Model } } } + + if ($mode != 'all') { + $this->db->group_start()->where('COL_MODE', $mode)->or_where('COL_SUBMODE', $mode)->group_end(); + } + + if ($power != 'all') { + if ($power) { + $this->db->where('COL_TX_PWR', $power); + } else { + $this->db->where('COL_TX_PWR is NULL'); + } + } + $this->db->order_by("COL_TIME_ON", "desc"); return $this->db->get($this->config->item('table_name')); diff --git a/application/views/distances/index.php b/application/views/distances/index.php index 3313c649..f0d6972e 100644 --- a/application/views/distances/index.php +++ b/application/views/distances/index.php @@ -17,7 +17,7 @@
- + - + ' . $sat . ''."\n"; } ?> @@ -38,6 +38,25 @@ + + + +
diff --git a/assets/js/sections/distances.js b/assets/js/sections/distances.js index 961bb6cb..303bb025 100644 --- a/assets/js/sections/distances.js +++ b/assets/js/sections/distances.js @@ -14,7 +14,9 @@ function distPlot(form) { url: base_url+'index.php/distances/get_distances', type: 'post', data: {'band': form.distplot_bands.value, - 'sat': form.distplot_sats.value}, + 'sat': form.distplot_sats.value, + 'mode': form.distplot_modes.value, + 'pwr': form.distplot_powers.value}, success: function(tmp) { if (tmp.ok == 'OK') { if (!($('#information').length > 0)) @@ -142,6 +144,8 @@ function getDistanceQsos(distance) { 'distance': distance, 'band': $("#distplot_bands").val(), 'sat' : $("#distplot_sats").val(), + 'mode': $("#distplot_modes").val(), + 'pwr': $("#distplot_powers").val(), }, success: function (html) { BootstrapDialog.show({