Skip to content

Commit

Permalink
Merge Dev into Master for Cloudlog 2.3.2
Browse files Browse the repository at this point in the history
Merge Dev into Master for Cloudlog 2.3.2
  • Loading branch information
magicbug authored Jan 25, 2023
2 parents 227c6f5 + f56d193 commit 53dff31
Show file tree
Hide file tree
Showing 36 changed files with 1,464 additions and 670 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cloudlog

> Important: Only accepting PRs on the "dev" branch.
Cloudlog is a self-hosted PHP application that allows you to log your amateur radio contacts anywhere. All you need is a web browser and active internet connection.

Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
Expand Down
101 changes: 84 additions & 17 deletions application/controllers/Awards.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,63 @@ public function index()

public function dok ()
{

$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));

$this->load->model('dok');
$this->load->model('bands');
$this->load->model('modes');

if($this->input->method() === 'post') {
$postdata['doks'] = $this->input->post('doks');
} else {
$postdata['doks'] = 'both';
}
$data['doks'] = $this->dok->show_stats($postdata);

$data['worked_bands'] = $this->bands->get_worked_bands_dok(); // Used in the view for band select
$data['worked_bands'] = $this->bands->get_worked_bands('dok');
$data['modes'] = $this->modes->active();

if ($this->input->post('band') != NULL) {
if ($this->input->post('band') == 'All') {
$bands = $data['worked_bands'];
} else {
$bands[] = $this->input->post('band');
}
} else {
$bands = $data['worked_bands'];
}

$data['bands'] = $bands;

if($this->input->method() === 'post') {
$postdata['qsl'] = $this->input->post('qsl');
$postdata['lotw'] = $this->input->post('lotw');
$postdata['eqsl'] = $this->input->post('eqsl');
$postdata['worked'] = $this->input->post('worked');
$postdata['confirmed'] = $this->input->post('confirmed');
$postdata['band'] = $this->input->post('band');
$postdata['mode'] = $this->input->post('mode');
} else {
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}

if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['dok_array'] = $this->dok->get_dok_array($bands, $postdata, $location_list);
$data['dok_summary'] = $this->dok->get_dok_summary($bands, $postdata, $location_list);
} else {
$location_list = null;
$data['dok_array'] = null;
$data['dok_summary'] = null;
}

// Render Page
$data['page_title'] = "Awards - DOK";
Expand All @@ -66,9 +112,6 @@ public function dok_details_ajax(){
$arguments["order"] = '';
$arguments["join_station_profile"] = true;

// print_r($arguments);
// return;

// Load the API and Logbook models
$this->load->model('api_model');
$this->load->model('logbook_model');
Expand All @@ -81,7 +124,7 @@ public function dok_details_ajax(){

// Render Page
$data['page_title'] = "Log View - DOK";
$data['filter'] = str_replace("(and)", ", ", $q);//implode(", ", array_keys($a));
$data['filter'] = str_replace("(and)", ", ", $q);
$this->load->view('awards/details', $data);
}

Expand All @@ -108,8 +151,9 @@ public function dxcc () {
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view

if($this->input->method() === 'post') {
$postdata['lotw'] = $this->input->post('lotw');
$postdata['qsl'] = $this->input->post('qsl');
$postdata['lotw'] = $this->input->post('lotw');
$postdata['eqsl'] = $this->input->post('eqsl');
$postdata['worked'] = $this->input->post('worked');
$postdata['confirmed'] = $this->input->post('confirmed');
$postdata['notworked'] = $this->input->post('notworked');
Expand All @@ -125,8 +169,9 @@ public function dxcc () {
$postdata['mode'] = $this->input->post('mode');
}
else { // Setting default values at first load of page
$postdata['lotw'] = 1;
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
Expand Down Expand Up @@ -206,8 +251,9 @@ public function qso_details_ajax(){
$band = str_replace('"', "", $this->input->post("Band"));
$mode = str_replace('"', "", $this->input->post("Mode"));
$type = $this->input->post('Type');
$qsl = $this->input->post('QSL') == null ? '' : $this->input->post('QSL');

$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type);
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl);

// This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC.
// We replace the values to make it look a bit nicer
Expand All @@ -217,9 +263,23 @@ public function qso_details_ajax(){
$searchphrase = $dxccname['name'];
}

$qsltype = [];
if (strpos($qsl, "Q") !== false) {
$qsltype[] = "QSL";
}
if (strpos($qsl, "L") !== false) {
$qsltype[] = "LotW";
}
if (strpos($qsl, "E") !== false) {
$qsltype[] = "eQSL";
}

// Render Page
$data['page_title'] = "Log View - " . $type;
$data['filter'] = $type . " " . $searchphrase . " and band ".$band . " and mode ".$mode;
if (!empty($qsltype)) {
$data['filter'] .= " and ".implode('/', $qsltype);
}
$this->load->view('awards/details', $data);
}

Expand Down Expand Up @@ -301,17 +361,19 @@ public function cq() {
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view

if($this->input->method() === 'post') {
$postdata['lotw'] = $this->input->post('lotw');
$postdata['qsl'] = $this->input->post('qsl');
$postdata['lotw'] = $this->input->post('lotw');
$postdata['eqsl'] = $this->input->post('eqsl');
$postdata['worked'] = $this->input->post('worked');
$postdata['confirmed'] = $this->input->post('confirmed');
$postdata['notworked'] = $this->input->post('notworked');
$postdata['band'] = $this->input->post('band');
$postdata['mode'] = $this->input->post('mode');
}
else { // Setting default values at first load of page
$postdata['lotw'] = 1;
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
Expand Down Expand Up @@ -359,17 +421,19 @@ public function was() {
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view

if($this->input->method() === 'post') {
$postdata['lotw'] = $this->input->post('lotw');
$postdata['qsl'] = $this->input->post('qsl');
$postdata['lotw'] = $this->input->post('lotw');
$postdata['eqsl'] = $this->input->post('eqsl');
$postdata['worked'] = $this->input->post('worked');
$postdata['confirmed'] = $this->input->post('confirmed');
$postdata['notworked'] = $this->input->post('notworked');
$postdata['band'] = $this->input->post('band');
$postdata['mode'] = $this->input->post('mode');
}
else { // Setting default values at first load of page
$postdata['lotw'] = 1;
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
Expand Down Expand Up @@ -553,8 +617,9 @@ public function was_map($band_type, $mode_type) {

$bands[] = $band_type;

$postdata['lotw'] = 1;
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
Expand All @@ -581,8 +646,9 @@ public function cq_map() {

$bands[] = $this->input->post('band');

$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
Expand Down Expand Up @@ -630,8 +696,9 @@ public function dxcc_map() {

$bands[] = $this->input->post('band');

$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
Expand Down Expand Up @@ -733,4 +800,4 @@ function returnStatus($string) {
}
}
}
}
}
16 changes: 16 additions & 0 deletions application/language/chinese_simplified/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,24 @@
$lang['general_word_sent'] = '已发送';
$lang['general_word_received'] = '已收到';
$lang['general_word_requested'] = '已请求';
$lang['general_word_queued'] = '已排队';
$lang['general_word_invalid_ignore'] = '无效(忽略)';
$lang['general_word_qslcard'] = 'QSL 卡片';
$lang['general_word_qslcard_management'] = 'QSL 管理';
$lang['general_word_qslcards'] = 'QSL 卡片';
$lang['general_word_qslcard_direct'] = '直邮';
$lang['general_word_qslcard_bureau'] = '卡片局';
$lang['general_word_qslcard_electronic'] = '电子';
$lang['general_word_qslcard_manager'] = '管理员';
$lang['general_word_qslcard_via'] = '通过';
$lang['general_word_eqslcards'] = 'eQSL 卡片';
$lang['general_word_lotw'] = 'Logbook of the World';

$lang['general_edit_qso'] = '编辑 QSO';
$lang['general_mark_qsl_rx_bureau'] = '标记 已收到的QSL (卡片局)';
$lang['general_mark_qsl_rx_direct'] = '标记 已收到的QSL (直邮)';
$lang['general_mark_qsl_tx_bureau'] = '标记 已发送的QSL (卡片局)';
$lang['general_mark_qsl_tx_direct'] = '标记 已发送的QSL (直邮)';

$lang['general_delete_qso'] = '删除 QSO';

Expand Down Expand Up @@ -91,11 +99,15 @@
$lang['gen_hamradio_iota_reference'] = 'IOTA 参考';
$lang['gen_hamradio_sota_reference'] = 'SOTA 参考';
$lang['gen_hamradio_wwff_reference'] = 'WWFF 参考';
$lang['gen_hamradio_pota_reference'] = 'POTA 参考';
$lang['gen_hamradio_dok'] = 'DOK';
$lang['gen_hamradio_state'] = '';
$lang['gen_hamradio_iota'] = 'IOTA';
$lang['gen_hamradio_sota'] = 'SOTA';
$lang['gen_hamradio_wwff'] = 'WWFF';
$lang['gen_hamradio_pota'] = 'POTA';
$lang['gen_hamradio_gridsquare'] = '网格';
$lang['gen_hamradio_operator'] = '操作员';

$lang['gen_hamradio_sig'] = 'Sig';
$lang['gen_hamradio_sig_info'] = 'Sig 属性';
Expand All @@ -109,3 +121,7 @@
$lang['gen_from_date'] = '起始日期';

$lang['gen_this_qso_was_confirmed_on'] = '该 QSO 确认于';

$lang['error_no_logbook_found'] = '没有找到日志本。 您需要在台站日志下添加一个日志本! 在这里添加:';

$lang['copy_to_clipboard'] = '复制到剪贴板';
2 changes: 2 additions & 0 deletions application/language/chinese_simplified/lotw_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

$lang['lotw_date_created'] = '创建日期';
$lang['lotw_date_expires'] = '过期日期';
$lang['lotw_qso_start_date'] = 'QSO 起始日期';
$lang['lotw_qso_end_date'] = 'QSO 结束日期';
$lang['lotw_status'] = '状态';
$lang['lotw_options'] = '选项';
$lang['lotw_valid'] = '有效';
Expand Down
5 changes: 5 additions & 0 deletions application/language/chinese_simplified/qslcard_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
$lang['qslcard_string_disk_space'] = '的磁盘空间保存 QSL 卡片资源';

$lang['qslcard_info'] = 'QSL 信息';
$lang['qslcard_sent'] = 'QSL 卡片已经发出';
$lang['qslcard_sent_bureau'] = 'QSL 卡片已由卡片局发出';
$lang['qslcard_sent_direct'] = 'QSL 卡片已直邮发出';
$lang['qslcard_sent_electronic'] = 'QSL 卡片已经发送电子版';
$lang['qslcard_sent_manager'] = 'QSL 卡片已经由卡片管理员发出';
$lang['qslcard_rcvd_bureau'] = 'QSL 卡片已由卡片局接收';
$lang['qslcard_rcvd_direct'] = 'QSL 卡片已直邮接收';
$lang['qslcard_rcvd_electronic'] = 'QSL 卡片已经接收电子版';
$lang['qslcard_rcvd_manager'] = 'QSL 卡片已经由卡片管理员接收';

$lang['qslcard_upload_front'] = '上传 QSL 卡片正面图像';
$lang['qslcard_upload_back'] = '上传 QSL 卡片背面图像';
Expand Down
4 changes: 4 additions & 0 deletions application/language/chinese_simplified/qso_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
$lang['qso_title_qso_map'] = 'QSO 地图';
$lang['qso_title_suggestions'] = '建议';
$lang['qso_title_previous_contacts'] = '先前通联';
$lang['qso_title_image'] = '操作员照片';

// Input Help Text on the /QSO Display
$lang['qso_transmit_power_helptext'] = '以瓦特为单位设置功率值。在输入中仅填写数值。';

$lang['qso_sota_ref_helptext'] = '例如: GM/NS-001.';
$lang['qso_wwff_ref_helptext'] = '例如: DLFF-0069.';
$lang['qso_pota_ref_helptext'] = '例如: PA-0150.';

$lang['qso_sig_helptext'] = '例如: GMA';
$lang['qso_sig_info_helptext'] = '例如: DA/NW-357';

$lang['qso_dok_helptext'] = '例如: Q03';

$lang['qso_notes_helptext'] = '仅在 Cloudlog 使用而不上传到其他的服务的笔记。';
$lang['qsl_notes_helptext'] = '此笔记内容被导出到QSL服务,如 eqsl.cc。';

// Button Text on /qso Display

Expand Down
10 changes: 10 additions & 0 deletions application/language/greek/account_lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

$lang['account_logbook_fields'] = 'Πεδίο αρχείου';
$lang['account_column1_text'] = 'Επιλογή στήλης 1';
$lang['account_column2_text'] = 'Επιλογή στήλης 2';
$lang['account_column3_text'] = 'Επιλογή στήλης 3';
$lang['account_column4_text'] = 'Επιλογή στήλης 4';
$lang['account_column5_text'] = 'Επιλογή στήλης 5 (Μόνο για αρχείο)';
18 changes: 18 additions & 0 deletions application/language/greek/contesting_lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

$lang['contesting_page_title'] = 'Αρχείο διαγωνισμού';
$lang['contesting_button_reset_contest_session'] = 'Επαναφορά Session διαγωνισμού';

$lang['contesting_exchange_type'] = 'Είδος Ανταλλαγής';
$lang['contesting_exchange_type_serial'] = 'Serial';
$lang['contesting_exchange_type_other'] = 'Αλλα';

$lang['contesting_contest_name'] = 'Ονομα Διαγωνισμού';

$lang['contesting_btn_reset_qso'] = 'Επαναφορά QSO';
$lang['contesting_btn_save_qso'] = 'Aποθήκευση QSO';

$lang['contesting_title_callsign_suggestions'] = 'Προτάσεις διακριτικού';
$lang['contesting_title_contest_logbook'] = 'Αρχείο διαγωνισμού';
Loading

0 comments on commit 53dff31

Please sign in to comment.