Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76f55f7

Browse files
committed
Add Most Worked Callsigns feature
Introduces a new 'Most Worked Callsigns' page, controller, model, and view to display callsigns worked multiple times from the active logbook. Adds language support for this feature in multiple languages and updates the navigation menu to include a link to the new page. Also includes DataTables integration and filter options for bands, modes, satellites, date range, and minimum QSOs.
1 parent a89b049 commit 76f55f7

37 files changed

+630
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2+
3+
class Mostworked extends CI_Controller {
4+
5+
function __construct()
6+
{
7+
parent::__construct();
8+
9+
$this->load->model('user_model');
10+
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
11+
12+
// Load language files
13+
$this->lang->load('most_worked');
14+
}
15+
16+
public function index()
17+
{
18+
// Check if users logged in
19+
if ($this->user_model->validate_session() == 0) {
20+
// user is not logged in
21+
redirect('user/login');
22+
}
23+
24+
$this->load->model('mostworked_model');
25+
$this->load->model('logbooks_model');
26+
27+
// Get filter parameters
28+
$filters = array(
29+
'band' => $this->input->post('band') ?: 'all',
30+
'mode' => $this->input->post('mode') ?: 'all',
31+
'satellite' => $this->input->post('satellite') ?: 'all',
32+
'fromdate' => $this->input->post('fromdate') ?: '',
33+
'todate' => $this->input->post('todate') ?: '',
34+
'min_qsos' => $this->input->post('min_qsos') ?: 5
35+
);
36+
37+
// Get active station logbook
38+
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
39+
40+
if (!$logbooks_locations_array) {
41+
$data['mostworked_callsigns'] = array();
42+
} else {
43+
$data['mostworked_callsigns'] = $this->mostworked_model->get_most_worked_callsigns($filters);
44+
}
45+
46+
// Get filter dropdown data
47+
$data['bands'] = $this->mostworked_model->get_bands();
48+
$data['modes'] = $this->mostworked_model->get_modes();
49+
$data['satellites'] = $this->mostworked_model->get_satellites();
50+
$data['filters'] = $filters;
51+
52+
$data['page_title'] = "Most Worked Callsigns";
53+
54+
$this->load->view('interface_assets/header', $data);
55+
$this->load->view('mostworked/index', $data);
56+
$this->load->view('interface_assets/footer');
57+
}
58+
}

application/language/bulgarian/menu_lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$lang['menu_timeline'] = 'Timeline';
3333
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
3434
$lang['menu_timeplotter'] = 'Timeplotter';
35+
$lang['menu_most_worked'] = 'Най-Работени';
3536
$lang['menu_custom_maps'] = 'Custom Maps';
3637
$lang['menu_continents'] = 'Continents';
3738

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$lang['most_worked_title'] = 'Най-Работени Позивни';
4+
$lang['most_worked_description'] = 'Тази страница показва позивните, с които сте работили най-често от вашия активен дневник.';
5+
$lang['most_worked_rank'] = 'Ранг';
6+
$lang['most_worked_callsign'] = 'Позивен';
7+
$lang['most_worked_contacts'] = 'Контакти';
8+
$lang['most_worked_first_qso'] = 'Първо QSO';
9+
$lang['most_worked_last_qso'] = 'Последно QSO';
10+
$lang['most_worked_bands'] = 'Ленти';
11+
$lang['most_worked_modes'] = 'Режими';
12+
$lang['most_worked_no_data'] = 'Няма намерени QSO! Уверете се, че имате избран активен дневник и записани QSO.';

application/language/chinese_simplified/menu_lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$lang['menu_timeline'] = '时间线';
3333
$lang['menu_accumulated_statistics'] = '累积统计';
3434
$lang['menu_timeplotter'] = '时间图';
35+
$lang['menu_most_worked'] = '最常工作';
3536
$lang['menu_custom_maps'] = '自定义地图';
3637
$lang['menu_continents'] = '大陆';
3738

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$lang['most_worked_title'] = '最常工作的呼号';
4+
$lang['most_worked_description'] = '此页面显示您从活动日志簿中最频繁工作的呼号。';
5+
$lang['most_worked_rank'] = '排名';
6+
$lang['most_worked_callsign'] = '呼号';
7+
$lang['most_worked_contacts'] = '联系';
8+
$lang['most_worked_first_qso'] = '首次QSO';
9+
$lang['most_worked_last_qso'] = '最后QSO';
10+
$lang['most_worked_bands'] = '频段';
11+
$lang['most_worked_modes'] = '模式';
12+
$lang['most_worked_no_data'] = '未找到QSO!请确保您已选择活动日志簿并记录了QSO。';

application/language/czech/menu_lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$lang['menu_timeline'] = 'Časová osa';
3333
$lang['menu_accumulated_statistics'] = 'Kumulativní statistiky';
3434
$lang['menu_timeplotter'] = 'Graf času';
35+
$lang['menu_most_worked'] = 'Nejvíce Pracované';
3536
$lang['menu_custom_maps'] = 'Vlastní mapy';
3637
$lang['menu_continents'] = 'Kontinenty';
3738

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$lang['most_worked_title'] = 'Nejvíce Pracované Značky';
4+
$lang['most_worked_description'] = 'Tato stránka zobrazuje značky, se kterými jste pracovali nejčastěji z vašeho aktivního deníku.';
5+
$lang['most_worked_rank'] = 'Pořadí';
6+
$lang['most_worked_callsign'] = 'Značka';
7+
$lang['most_worked_contacts'] = 'Kontakty';
8+
$lang['most_worked_first_qso'] = 'První QSO';
9+
$lang['most_worked_last_qso'] = 'Poslední QSO';
10+
$lang['most_worked_bands'] = 'Pásma';
11+
$lang['most_worked_modes'] = 'Režimy';
12+
$lang['most_worked_no_data'] = 'Nebyly nalezeny žádné QSO! Ujistěte se, že máte vybraný aktivní deník a zaznamenané QSO.';

application/language/dutch/menu_lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$lang['menu_timeline'] = 'Timeline';
3333
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
3434
$lang['menu_timeplotter'] = 'Timeplotter';
35+
$lang['menu_most_worked'] = 'Meest Gewerkt';
3536
$lang['menu_custom_maps'] = 'Custom Maps';
3637
$lang['menu_continents'] = 'Continents';
3738

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$lang['most_worked_title'] = 'Meest Gewerkte Roepletters';
4+
$lang['most_worked_description'] = 'Deze pagina toont de roepletters waarmee u het vaakst heeft gewerkt vanuit uw actieve logboek.';
5+
$lang['most_worked_rank'] = 'Rang';
6+
$lang['most_worked_callsign'] = 'Roepletter';
7+
$lang['most_worked_contacts'] = 'Contacten';
8+
$lang['most_worked_first_qso'] = 'Eerste QSO';
9+
$lang['most_worked_last_qso'] = 'Laatste QSO';
10+
$lang['most_worked_bands'] = 'Banden';
11+
$lang['most_worked_modes'] = 'Modi';
12+
$lang['most_worked_no_data'] = 'Geen QSO\'s gevonden! Zorg ervoor dat u een actief logboek hebt geselecteerd en QSO\'s hebt gelogd.';

application/language/english/menu_lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$lang['menu_timeline'] = 'Timeline';
3333
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
3434
$lang['menu_timeplotter'] = 'Timeplotter';
35+
$lang['menu_most_worked'] = 'Most Worked';
3536
$lang['menu_custom_maps'] = 'Custom Maps';
3637
$lang['menu_continents'] = 'Continents';
3738

0 commit comments

Comments
 (0)