From 7705cc8dcc0555fa52f800d80c3f141837f83190 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 14 May 2023 20:25:03 +0200
Subject: [PATCH 01/17] Add bulk download function for eqsl cards
---
application/controllers/Eqsl.php | 88 ++++++++++++++++++++++++-----
application/views/eqsl/download.php | 14 +++++
2 files changed, 89 insertions(+), 13 deletions(-)
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 5f9715cb..1b3f7b15 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -182,16 +182,16 @@ class eqsl extends CI_Controller {
$status = "";
// begin script
- $ch = curl_init();
+ $ch = curl_init();
// basic curl options for all requests
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
// use the URL we built
curl_setopt($ch, CURLOPT_URL, $adif);
- $result = curl_exec($ch);
+ $result = curl_exec($ch);
$chi = curl_getinfo($ch);
curl_close($ch);
@@ -507,8 +507,8 @@ class eqsl extends CI_Controller {
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true);
- $dom = new domDocument;
- $dom->loadHTML($file);
+ $dom = new domDocument;
+ $dom->loadHTML($file);
$dom->preserveWhiteSpace = false;
$images = $dom->getElementsByTagName('img');
@@ -517,7 +517,7 @@ class eqsl extends CI_Controller {
exit;
}
- foreach ($images as $image)
+ foreach ($images as $image)
{
header('Content-Type: image/jpg');
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
@@ -539,6 +539,57 @@ class eqsl extends CI_Controller {
}
+ function bulk_download_image($id) {
+ $this->load->model('Eqsl_images');
+
+ $this->load->model('logbook_model');
+ $this->load->model('user_model');
+ $qso_query = $this->logbook_model->get_qso($id);
+ $qso = $qso_query->row();
+ $qso_timestamp = strtotime($qso->COL_TIME_ON);
+ $callsign = $qso->COL_CALL;
+ $band = $qso->COL_BAND;
+ $mode = $qso->COL_MODE;
+ $year = date('Y', $qso_timestamp);
+ $month = date('m', $qso_timestamp);
+ $day = date('d', $qso_timestamp);
+ $hour = date('H', $qso_timestamp);
+ $minute = date('i', $qso_timestamp);
+
+ $query = $this->user_model->get_by_id($this->session->userdata('user_id'));
+ $q = $query->row();
+ $username = $q->user_eqsl_name;
+ $password = $q->user_eqsl_password;
+
+ $image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
+ $file = file_get_contents($image_url, true);
+
+ $dom = new domDocument;
+ $dom->loadHTML($file);
+ $dom->preserveWhiteSpace = false;
+ $images = $dom->getElementsByTagName('img');
+
+ if(!isset($images) || count($images) == 0) {
+ echo "Rate Limited";
+ exit;
+ }
+
+ foreach ($images as $image)
+ {
+ $content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
+ if ($content === false) {
+ echo "No response";
+ exit;
+ }
+ $filename = uniqid().'.jpg';
+ if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
+ $this->Eqsl_images->save_image($id, $filename);
+ }
+ }
+ print "Image saved (QSO ID: ".$id."). ";
+
+ }
+
public function tools() {
// Check logged in
$this->load->model('user_model');
@@ -557,15 +608,26 @@ class eqsl extends CI_Controller {
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
- $data['page_title'] = "eQSL Card Image Download";
- $this->load->model('eqslmethods_model');
+ if ($this->input->post('eqsldownload') == 'download') {
+ $this->load->model('eqslmethods_model');
+ $qslsnotdownloaded = $this->eqslmethods_model->eqsl_not_yet_downloaded();
+ foreach ($qslsnotdownloaded->result_array() as $qsl) {
+ //var_dump($qsl);
+ $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
+ //print "--------------------------------- ";
+ }
+ } else {
- $data['custom_date_format'] = $this->session->userdata('user_date_format');
- $data['qslsnotdownloaded'] = $this->eqslmethods_model->eqsl_not_yet_downloaded();
+ $data['page_title'] = "eQSL Card Image Download";
+ $this->load->model('eqslmethods_model');
- $this->load->view('interface_assets/header', $data);
- $this->load->view('eqsl/download');
- $this->load->view('interface_assets/footer');
+ $data['custom_date_format'] = $this->session->userdata('user_date_format');
+ $data['qslsnotdownloaded'] = $this->eqslmethods_model->eqsl_not_yet_downloaded();
+
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('eqsl/download');
+ $this->load->view('interface_assets/footer');
+ }
}
public function mark_all_sent() {
diff --git a/application/views/eqsl/download.php b/application/views/eqsl/download.php
index 6da35457..f0e53f28 100644
--- a/application/views/eqsl/download.php
+++ b/application/views/eqsl/download.php
@@ -65,6 +65,20 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) {
}
?>
+
+ load->view('layout/messages'); ?>
+
+
+
+
+
+
+
+
+
From 8d3a404a91e7ac61f24af0426758d528ef62bec8 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 14 May 2023 20:33:15 +0200
Subject: [PATCH 02/17] Accidentially removed needed lib
---
application/controllers/Eqsl.php | 1 +
images/eqsl_card_images/readme.txt | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 images/eqsl_card_images/readme.txt
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 1b3f7b15..d8c81b3d 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -540,6 +540,7 @@ class eqsl extends CI_Controller {
}
function bulk_download_image($id) {
+ $this->load->library('electronicqsl');
$this->load->model('Eqsl_images');
$this->load->model('logbook_model');
diff --git a/images/eqsl_card_images/readme.txt b/images/eqsl_card_images/readme.txt
deleted file mode 100644
index d53bdb81..00000000
--- a/images/eqsl_card_images/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This folders used to store downloaded eqsl card images.
\ No newline at end of file
From ee9408c7b7a928bf3fa668c6c27bcd75a9323e28 Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 15 May 2023 11:32:05 +0200
Subject: [PATCH 03/17] Add download delay and error handling
---
application/controllers/Eqsl.php | 21 +++++++++++++--------
application/models/Eqslmethods_model.php | 1 +
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index d8c81b3d..5343bcd5 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -564,6 +564,7 @@ class eqsl extends CI_Controller {
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true);
+ $error = '';
$dom = new domDocument;
$dom->loadHTML($file);
@@ -571,23 +572,24 @@ class eqsl extends CI_Controller {
$images = $dom->getElementsByTagName('img');
if(!isset($images) || count($images) == 0) {
- echo "Rate Limited";
- exit;
+ $error = "Rate Limited";
+ return $error;
}
foreach ($images as $image)
{
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
if ($content === false) {
- echo "No response";
- exit;
+ $error = "No response";
+ return $error;
}
$filename = uniqid().'.jpg';
if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
$this->Eqsl_images->save_image($id, $filename);
+ print "Image saved (QSO ID: ".$id."). ";
}
}
- print "Image saved (QSO ID: ".$id."). ";
+ return $error;
}
@@ -613,9 +615,12 @@ class eqsl extends CI_Controller {
$this->load->model('eqslmethods_model');
$qslsnotdownloaded = $this->eqslmethods_model->eqsl_not_yet_downloaded();
foreach ($qslsnotdownloaded->result_array() as $qsl) {
- //var_dump($qsl);
- $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
- //print "--------------------------------- ";
+ $error = $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
+ if ($error != '') {
+ print "Error: ".$error;
+ break;
+ }
+ sleep(15);
}
} else {
diff --git a/application/models/Eqslmethods_model.php b/application/models/Eqslmethods_model.php
index ff83f5bd..369a4117 100644
--- a/application/models/Eqslmethods_model.php
+++ b/application/models/Eqslmethods_model.php
@@ -90,6 +90,7 @@ class Eqslmethods_model extends CI_Model {
$this->db->where($this->config->item('table_name').'.COL_EQSL_QSL_RCVD', 'Y');
$this->db->where('qso_id', NULL);
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
+ $this->db->order_by("COL_TIME_ON", "desc");
return $this->db->get();
}
From b412c7c8cf4e73f41547e16dfd3797802386c802 Mon Sep 17 00:00:00 2001
From: phl0
Date: Thu, 18 May 2023 21:25:12 +0200
Subject: [PATCH 04/17] Only break on rate limit (otherwise coninue)
---
application/controllers/Eqsl.php | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 5343bcd5..6a41e850 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -561,10 +561,14 @@ class eqsl extends CI_Controller {
$q = $query->row();
$username = $q->user_eqsl_name;
$password = $q->user_eqsl_password;
+ $error = '';
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true);
- $error = '';
+ if (str_contains($file, 'Error')) {
+ $error = preg_replace('/^\s*Error: /', '', $file);
+ return $error.' (QSO ID: '.$id.')';
+ }
$dom = new domDocument;
$dom->loadHTML($file);
@@ -617,8 +621,12 @@ class eqsl extends CI_Controller {
foreach ($qslsnotdownloaded->result_array() as $qsl) {
$error = $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
if ($error != '') {
- print "Error: ".$error;
- break;
+ if ($error == 'Rate Limited') {
+ break;
+ } else {
+ print "Error: ".$error." ";
+ continue;
+ }
}
sleep(15);
}
From 81a8ecc3b324281973aade1af23c866710ca32da Mon Sep 17 00:00:00 2001
From: phl0
Date: Sat, 20 May 2023 16:16:24 +0200
Subject: [PATCH 05/17] Add mode to CAT banner
---
application/views/interface_assets/footer.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php
index 6b723293..e44ce2f4 100644
--- a/application/views/interface_assets/footer.php
+++ b/application/views/interface_assets/footer.php
@@ -1256,8 +1256,11 @@ $(document).on('keypress',function(e) {
} else {
$(".radio_timeout_error" ).remove();
text = 'TX: '+(Math.round(parseInt(data.frequency)/1000)/1000).toFixed(3)+' MHz';
+ if(data.mode != null) {
+ text = text+' '+data.mode;
+ }
if(data.power != null && data.power != 0) {
- text = text+' '+data.power+'W';
+ text = text+' '+data.power+' W';
}
if(data.prop_mode != null && data.prop_mode != '') {
text = text+' ('+data.prop_mode;
From 828c7391ec363a93d0bb1009c53bc5f0ae55acf0 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 21 May 2023 18:18:58 +0200
Subject: [PATCH 06/17] We need to update QSO dates on cert update as well
---
application/controllers/Lotw.php | 2 +-
application/models/LotwCert.php | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php
index 1c415fe9..01cb8f7d 100644
--- a/application/controllers/Lotw.php
+++ b/application/controllers/Lotw.php
@@ -156,7 +156,7 @@ class Lotw extends CI_Controller {
} else {
// Certificate is in the system time to update
- $this->LotwCert->update_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $info['dxcc-id'], $info['validFrom'], $info['validTo_Date'], $info['pem_key'], $info['general_cert']);
+ $this->LotwCert->update_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $info['dxcc-id'], $info['validFrom'], $info['validTo_Date'], $info['qso-first-date'], $info['qso-end-date'], $info['pem_key'], $info['general_cert']);
// Cert success flash message
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certificate Updated.');
diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php
index 228ea6d1..1d1fd03d 100644
--- a/application/models/LotwCert.php
+++ b/application/models/LotwCert.php
@@ -54,11 +54,13 @@ class LotwCert extends CI_Model {
$this->db->insert('lotw_certs', $data);
}
- function update_certificate($user_id, $callsign, $dxcc, $date_created, $date_expires, $cert_key, $general_cert) {
+ function update_certificate($user_id, $callsign, $dxcc, $date_created, $date_expires, $qso_start_date, $qso_end_date, $cert_key, $general_cert) {
$data = array(
'cert_dxcc_id' => $dxcc,
'date_created' => $date_created,
'date_expires' => $date_expires,
+ 'qso_start_date' => $qso_start_date,
+ 'qso_end_date' => $qso_end_date,
'cert_key' => $cert_key,
'cert' => $general_cert
);
From 20db38ba4a200ebae181a340e407c763741672b7 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 21 May 2023 18:34:54 +0200
Subject: [PATCH 07/17] Fix typos
---
application/language/english/account_lang.php | 2 +-
application/language/russian/account_lang.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/language/english/account_lang.php b/application/language/english/account_lang.php
index f73f79bb..a5172c94 100644
--- a/application/language/english/account_lang.php
+++ b/application/language/english/account_lang.php
@@ -23,7 +23,7 @@ $lang['account_user_role'] = 'User Role';
$lang['account_theme'] = 'Theme';
$lang['account_stylesheet'] = 'Stylesheet';
-$lang['account_personal_iformation'] = 'Personal Information';
+$lang['account_personal_information'] = 'Personal Information';
$lang['account_first_name'] = 'First Name';
$lang['account_last_name'] = 'Last Name';
$lang['account_callsign'] = 'Callsign';
diff --git a/application/language/russian/account_lang.php b/application/language/russian/account_lang.php
index 0b2091b8..c4e676a4 100644
--- a/application/language/russian/account_lang.php
+++ b/application/language/russian/account_lang.php
@@ -23,7 +23,7 @@ $lang['account_user_role'] = 'Роль пользователя';
$lang['account_theme'] = 'Тема оформления';
$lang['account_stylesheet'] = 'Шаблон';
-$lang['account_personal_iformation'] = 'Персональная информация';
+$lang['account_personal_information'] = 'Персональная информация';
$lang['account_first_name'] = 'Имя';
$lang['account_last_name'] = 'Фамилия';
$lang['account_callsign'] = 'Позывной';
From 803d19f33b5d4b17e252c0a792d86ae4e1be2f79 Mon Sep 17 00:00:00 2001
From: m0urs
Date: Sun, 21 May 2023 20:45:40 +0200
Subject: [PATCH 08/17] Fix https://github.com/m0urs/Cloudlog/issues/147
---
application/views/interface_assets/footer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php
index e44ce2f4..e7936563 100644
--- a/application/views/interface_assets/footer.php
+++ b/application/views/interface_assets/footer.php
@@ -1255,7 +1255,7 @@ $(document).on('keypress',function(e) {
}
} else {
$(".radio_timeout_error" ).remove();
- text = 'TX: '+(Math.round(parseInt(data.frequency)/1000)/1000).toFixed(3)+' MHz';
+ text = 'TX: '+(Math.round(parseInt(data.frequency)/100)/10000).toFixed(4)+' MHz';
if(data.mode != null) {
text = text+' '+data.mode;
}
From 97f9da515a5d70ee7b353e5fd815a1ad41855b34 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 21 May 2023 21:24:45 +0200
Subject: [PATCH 09/17] Add German translations for lately added lang stuff
---
application/language/german/account_lang.php | 50 ++++++++++++++++
application/language/german/admin_lang.php | 18 ++++++
.../language/german/general_words_lang.php | 2 +
.../language/german/gridsquares_lang.php | 13 +++++
application/language/german/menu_lang.php | 2 +
application/language/german/options_lang.php | 57 +++++++++++++++++++
.../language/german/statistics_lang.php | 17 ++++++
7 files changed, 159 insertions(+)
create mode 100644 application/language/german/admin_lang.php
create mode 100644 application/language/german/gridsquares_lang.php
create mode 100644 application/language/german/options_lang.php
create mode 100644 application/language/german/statistics_lang.php
diff --git a/application/language/german/account_lang.php b/application/language/german/account_lang.php
index df1878b9..7fc9477e 100644
--- a/application/language/german/account_lang.php
+++ b/application/language/german/account_lang.php
@@ -8,3 +8,53 @@ $lang['account_column2_text'] = 'Wähle Spalte 2';
$lang['account_column3_text'] = 'Wähle Spalte 3';
$lang['account_column4_text'] = 'Wähle Spalte 4';
$lang['account_column5_text'] = 'Wähle Spalte 5 (nur für Logbuch)';
+
+$lang['account_create_user_account'] = 'Benutzerkonto anlegen';
+$lang['account_edit_account'] = 'Benutzerkonto editieren';
+
+$lang['account_account_information'] = 'Bnutzerkonto Informationen';
+$lang['account_username'] = 'Benutzername';
+$lang['account_email_address'] = 'Emailadresse';
+$lang['account_password'] = 'Passwort';
+
+$lang['account_roles'] = 'Rollen';
+$lang['account_user_role'] = 'Benutzerrolle';
+
+$lang['account_theme'] = 'Thema';
+$lang['account_stylesheet'] = 'Stylesheet';
+
+$lang['account_personal_information'] = 'Informationen';
+$lang['account_first_name'] = 'Vorname';
+$lang['account_last_name'] = 'Nachname';
+$lang['account_callsign'] = 'Rufzeichen';
+$lang['account_gridsquare'] = 'Planquadrat';
+
+$lang['account_cloudlog_preferences'] = 'Cloudlog Einstellungen';
+$lang['account_timezone'] = 'Zeitzone';
+$lang['account_date_format'] = 'Datumsformat';
+$lang['account_measurement_preference'] = 'Entfernungsformat';
+$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Wähle, wie Datumsfelder angezeigt werden sollen, wenn du eingeloggt bist.';
+$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Wähle, in welcher Einheit Entfernungen angezeigt werden sollen.';
+
+$lang['account_main_menu'] = 'Hauptmenü';
+$lang['account_show_notes_in_the_main_menu'] = 'Zeige Notizen im Hauptmenü';
+
+$lang['account_gridsquare_and_location_autocomplete'] = 'Vervollständigung von Planquadrat und Lokation';
+$lang['account_location_auto_lookup'] = 'Automatische Ermittlung der Lokation.';
+$lang['account_if_set_gridsquare_is_fetched_based_on_location_name'] = 'Wenn aktiviert, wird das Planquadrat basierend auf der Lokation ermittelt.';
+$lang['account_sota_auto_lookup_gridsquare_and_name_for_summit'] = 'Automatische Ermittlung von Planquadrat und Lokation anhand des SOTA Gipfels.';
+$lang['account_wwff_auto_lookup_gridsquare_and_name_for_reference'] = 'Automatische Ermittlung von Planquadrat und Lokation andhand der WWFF Referenz.';
+$lang['account_pota_auto_lookup_gridsquare_and_name_for_park'] = 'Automatische Ermuttlung des Parknamens anhand der POTA Referenz.';
+$lang['account_if_set_name_and_gridsquare_is_fetched_from_the_api_and_filled_in_location_and_locator'] = 'Wenn aktiviert, werden Name und Planquadrat über die API ermittelt und gesetzt.';
+
+$lang['account_previous_qsl_type'] = 'QSL Typ der vorherigen QSOs';
+$lang['account_select_the_type_of_qsl_to_show_in_the_previous_qsos_section'] = 'Wähle den QSL-Typ für die Anzeige der bereits getätigten QSOs.';
+
+$lang['account_qrzcom_hamqthcom_images'] = 'qrz.com/hamqth.com Bilder';
+$lang['account_show_profile_picture_of_qso_partner_from_qrzcom_hamqthcom_profile_in_the_log_qso_section'] = 'Zeige das Profilbild des QSO-Partners aus seinem qrz.com/hamqth.com Profil in der QSO Loggen Sektion.';
+$lang['account_please_set_your_qrzcom_hamqthcom_credentials_in_the_general_config_file'] = 'Bitte qrz.com/hamqth.com Zugangsdaten in der Basiskonfigurationsdatei ablegen.';
+
+$lang['account_amsat_status_upload'] = 'AMSAT Status Upload';
+$lang['account_upload_status_of_sat_qsos_to'] = 'Status von SAT QSOs hochladen auf';
+
+$lang['account_logbook_of_the_world'] = 'Logbook of the World';
diff --git a/application/language/german/admin_lang.php b/application/language/german/admin_lang.php
new file mode 100644
index 00000000..ece3d85b
--- /dev/null
+++ b/application/language/german/admin_lang.php
@@ -0,0 +1,18 @@
+
Date: Sun, 21 May 2023 21:36:04 +0200
Subject: [PATCH 10/17] Add missing lang tags
---
application/language/german/account_lang.php | 31 +++++++++++++++++++
.../language/german/general_words_lang.php | 3 ++
2 files changed, 34 insertions(+)
diff --git a/application/language/german/account_lang.php b/application/language/german/account_lang.php
index 7fc9477e..d0400d8e 100644
--- a/application/language/german/account_lang.php
+++ b/application/language/german/account_lang.php
@@ -58,3 +58,34 @@ $lang['account_amsat_status_upload'] = 'AMSAT Status Upload';
$lang['account_upload_status_of_sat_qsos_to'] = 'Status von SAT QSOs hochladen auf';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
+$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Benutzername';
+$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Passwort';
+$lang['account_leave_blank_to_keep_existing_password'] = 'Leer lassen um das existierende Passwort zu übernehmen';
+
+$lang['account_clublog'] = 'Club Log';
+$lang['account_clublog_email_callsign'] = 'Club Log Email/Rufzeichen';
+$lang['account_clublog_password'] = 'Club Log Passwort';
+$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = 'Die Emailadresse oder Rufzeichen, das für den Club Log Login verwendet wird';
+
+$lang['account_eqsl'] = 'eQSL';
+$lang['account_eqsl_username'] = 'eQSL.cc Benutzername';
+$lang['account_eqsl_password'] = 'eQSL.cc Passwort';
+
+$lang['account_save_account_changes'] = 'Speichere Kontoänderungen';
+$lang['account_create_account'] = 'Konto anlegen';
+
+$lang['account_delete_user_account'] = 'Benutzerkonto löschen';
+$lang['account_are_you_sure_you_want_to_delete_the_user_account'] = 'Bist du sicher, dass du das Benutzerkonto löschen willst';
+$lang['account_yes_delete_this_user'] = 'Ja, Benutzerkonto löschen';
+$lang['account_no_do_not_delete_this_user'] = 'Nein, Benutzerkonto nicht löschen';
+
+$lang['account_forgot_password'] = 'Passwort vergessen?';
+$lang['account_you_can_reset_your_password_here'] = 'Du kannst dein Passwort hier zurücksetzen.';
+$lang['account_reset_password'] = 'Passwort zurücksetzen';
+$lang['account_the_email_field_is_required'] = 'Die Emailadresse ist erforderlich';
+$lang['account_confirm_password'] = 'Bestätige Passwort';
+
+$lang['account_forgot_your_password'] = 'Passwort vergessen?';
+
+$lang['account_login_to_cloudlog'] = 'Anmeldung bei Cloudlog';
+$lang['account_login'] = 'Anmeldung';
diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php
index 0657b19e..9318be83 100644
--- a/application/language/german/general_words_lang.php
+++ b/application/language/german/general_words_lang.php
@@ -46,6 +46,7 @@ $lang['general_word_qslcards'] = 'QSL Karten';
$lang['general_word_qslcard_direct'] = 'Direkt';
$lang['general_word_qslcard_bureau'] = 'Büro';
$lang['general_word_qslcard_electronic'] = 'Elektronisch';
+$lang['general_word_qslcard_manager'] = 'Manager';
$lang['general_word_qslcard_via'] = 'Via';
$lang['general_word_eqslcard'] = 'eQSL Karte';
$lang['general_word_eqslcards'] = 'eQSL Karten';
@@ -126,6 +127,8 @@ $lang['gen_from_date'] = 'Ab Datum';
$lang['gen_this_qso_was_confirmed_on'] = 'Dieses QSO wurde bestätigt am';
+$lang['error_no_logbook_found'] = 'Keine Logbücher gefunden. Du muss ein Stationslogbuch anlegen! Mach es hier:';
+
$lang['copy_to_clipboard'] = 'In die Zwischenablage kopieren';
$lang['africa'] = 'Afrika';
From bda839b0b2a20a3b48b1669680fb5d2379af2d77 Mon Sep 17 00:00:00 2001
From: phl0
Date: Sun, 21 May 2023 22:50:30 +0200
Subject: [PATCH 11/17] Show big banner re eQSL rate limit
---
application/views/eqsl/analysis.php | 2 +-
application/views/eqsl/download.php | 3 ++-
application/views/eqsl/export.php | 2 +-
application/views/eqsl/import.php | 2 +-
application/views/eqsl/tools.php | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/application/views/eqsl/analysis.php b/application/views/eqsl/analysis.php
index ab3246e4..fb802483 100644
--- a/application/views/eqsl/analysis.php
+++ b/application/views/eqsl/analysis.php
@@ -17,7 +17,7 @@ $custom_date_format = $this->session->userdata('user_date_format');
Tools
- Download eQSL Images
+ Download eQSL cards
diff --git a/application/views/eqsl/download.php b/application/views/eqsl/download.php
index f0e53f28..ec011de3 100644
--- a/application/views/eqsl/download.php
+++ b/application/views/eqsl/download.php
@@ -15,7 +15,7 @@
Tools
- Download eQSL Images
+ Download eQSL cards
@@ -74,6 +74,7 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) {
Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations.
+
Due to a rate limit of approximately 10 seconds per eQSL picture download calling this function will take a long time to complete! Thus may have to call this function several times depending on the amount of outstanding cards.
diff --git a/application/views/eqsl/export.php b/application/views/eqsl/export.php
index 4a094a22..6be59f85 100644
--- a/application/views/eqsl/export.php
+++ b/application/views/eqsl/export.php
@@ -15,7 +15,7 @@
Tools
- Download eQSL Images
+ Download eQSL cards
diff --git a/application/views/eqsl/import.php b/application/views/eqsl/import.php
index d745e1b4..1808f11e 100644
--- a/application/views/eqsl/import.php
+++ b/application/views/eqsl/import.php
@@ -15,7 +15,7 @@
Tools
- Download eQSL Images
+ Download eQSL cards
diff --git a/application/views/eqsl/tools.php b/application/views/eqsl/tools.php
index d099525c..7982aaa1 100644
--- a/application/views/eqsl/tools.php
+++ b/application/views/eqsl/tools.php
@@ -17,7 +17,7 @@
- Download eQSL Images
+ Download eQSL cards
From b02c9c34110a785d6e7e1c525bbd0de51d52b1ce Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 00:10:56 +0200
Subject: [PATCH 12/17] Nicely format result table showing errors
---
application/controllers/Eqsl.php | 32 ++++++++++++++----
application/views/eqsl/result.php | 55 +++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 7 deletions(-)
create mode 100644 application/views/eqsl/result.php
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 6a41e850..e1e9507d 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -566,8 +566,8 @@ class eqsl extends CI_Controller {
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true);
if (str_contains($file, 'Error')) {
- $error = preg_replace('/^\s*Error: /', '', $file);
- return $error.' (QSO ID: '.$id.')';
+ $error = rtrim(preg_replace('/^\s*Error: /', '', $file));
+ return $error;
}
$dom = new domDocument;
@@ -590,7 +590,6 @@ class eqsl extends CI_Controller {
$filename = uniqid().'.jpg';
if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
$this->Eqsl_images->save_image($id, $filename);
- print "Image saved (QSO ID: ".$id."). ";
}
}
return $error;
@@ -616,20 +615,39 @@ class eqsl extends CI_Controller {
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
if ($this->input->post('eqsldownload') == 'download') {
+ $i = 0;
$this->load->model('eqslmethods_model');
$qslsnotdownloaded = $this->eqslmethods_model->eqsl_not_yet_downloaded();
+ $eqsl_results = array();
foreach ($qslsnotdownloaded->result_array() as $qsl) {
- $error = $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
- if ($error != '') {
- if ($error == 'Rate Limited') {
+ $result = $this->bulk_download_image($qsl['COL_PRIMARY_KEY']);
+ if ($result != '') {
+ $errors++;
+ if ($result == 'Rate Limited') {
break;
} else {
- print "Error: ".$error." ";
+ $eqsl_results[] = array(
+ 'date' => $qsl['COL_TIME_ON'],
+ 'call' => $qsl['COL_CALL'],
+ 'mode' => $qsl['COL_MODE'],
+ 'submode' => $qsl['COL_SUBMODE'],
+ 'status' => $result,
+ 'qsoid' => $qsl['COL_PRIMARY_KEY']
+ );
continue;
}
+ } else {
+ $i++;
}
sleep(15);
}
+ $data['eqsl_results'] = $eqsl_results;
+ $data['eqsl_stats'] = "Successfully downloaded: ".$i." / Errors: ".count($eqsl_results);
+ $data['page_title'] = "eQSL Download Information";
+
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('eqsl/result');
+ $this->load->view('interface_assets/footer');
} else {
$data['page_title'] = "eQSL Card Image Download";
diff --git a/application/views/eqsl/result.php b/application/views/eqsl/result.php
new file mode 100644
index 00000000..9f7bb2bc
--- /dev/null
+++ b/application/views/eqsl/result.php
@@ -0,0 +1,55 @@
+
+session->userdata('user_date_format');
+?>
+
+
+
+
+
+ load->view('layout/messages'); ?>
+
+
+
+
+
+
+ Date
+ Time
+ Call
+ Mode
+ Submode
+ eQSL Status
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 34e7afbc910993e6611d39b0e34621926427f4b3 Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 08:07:30 +0200
Subject: [PATCH 13/17] Correct typo and add timeout info
---
application/views/eqsl/download.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/views/eqsl/download.php b/application/views/eqsl/download.php
index ec011de3..2fb8bb10 100644
--- a/application/views/eqsl/download.php
+++ b/application/views/eqsl/download.php
@@ -74,7 +74,7 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) {
Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations.
-
Due to a rate limit of approximately 10 seconds per eQSL picture download calling this function will take a long time to complete! Thus may have to call this function several times depending on the amount of outstanding cards.
+
Due to a rate limit of approximately 10 seconds per eQSL picture download calling this function will take a long time to complete! Thus you may have to call this function several times depending on the amount of outstanding cards. This may run into a script timeout depending on the PHP configuration.
From 08a814f6290500f2b4e024b8841a29d9fc3974f5 Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 10:26:45 +0200
Subject: [PATCH 14/17] Only show download function if result is not empty
---
application/views/eqsl/download.php | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/application/views/eqsl/download.php b/application/views/eqsl/download.php
index 2fb8bb10..d4c2319b 100644
--- a/application/views/eqsl/download.php
+++ b/application/views/eqsl/download.php
@@ -58,16 +58,7 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) {
echo "";
?>
-
-There are no QSOs whose eQSL card images have not yet been downloaded. Go log some more QSOs!";
- }
-?>
-
-
- load->view('layout/messages'); ?>
-
+
@@ -79,7 +70,13 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) {
-
+
+There are no QSOs whose eQSL card images have not yet been downloaded. Go log some more QSOs!";
+ }
+?>
+
From 6690a6553b4928345b30145578866a6117af127f Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 10:32:58 +0200
Subject: [PATCH 15/17] Revert "Accidentially removed needed lib"
This reverts commit 8d3a404a91e7ac61f24af0426758d528ef62bec8.
---
application/controllers/Eqsl.php | 1 -
images/eqsl_card_images/readme.txt | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 images/eqsl_card_images/readme.txt
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index e1e9507d..6deedd12 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -540,7 +540,6 @@ class eqsl extends CI_Controller {
}
function bulk_download_image($id) {
- $this->load->library('electronicqsl');
$this->load->model('Eqsl_images');
$this->load->model('logbook_model');
diff --git a/images/eqsl_card_images/readme.txt b/images/eqsl_card_images/readme.txt
new file mode 100644
index 00000000..d53bdb81
--- /dev/null
+++ b/images/eqsl_card_images/readme.txt
@@ -0,0 +1 @@
+This folders used to store downloaded eqsl card images.
\ No newline at end of file
From c139b5b7d282da780399cbd32dddc5876b5a0736 Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 10:34:13 +0200
Subject: [PATCH 16/17] Re-add accidentially deleted lib
---
application/controllers/Eqsl.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 6deedd12..e1e9507d 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -540,6 +540,7 @@ class eqsl extends CI_Controller {
}
function bulk_download_image($id) {
+ $this->load->library('electronicqsl');
$this->load->model('Eqsl_images');
$this->load->model('logbook_model');
From 791d3597876e9191ffc8d7ee67cf99c1b870c5cc Mon Sep 17 00:00:00 2001
From: phl0
Date: Mon, 22 May 2023 12:58:03 +0200
Subject: [PATCH 17/17] Make eQSL buld download fucntion backwards compatible
---
application/controllers/Eqsl.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index e1e9507d..05d70fbf 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -565,7 +565,7 @@ class eqsl extends CI_Controller {
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true);
- if (str_contains($file, 'Error')) {
+ if (strpos($file, 'Error') !== false) {
$error = rtrim(preg_replace('/^\s*Error: /', '', $file));
return $error;
}
@@ -639,7 +639,9 @@ class eqsl extends CI_Controller {
} else {
$i++;
}
- sleep(15);
+ if ($i > 0) {
+ sleep(15);
+ }
}
$data['eqsl_results'] = $eqsl_results;
$data['eqsl_stats'] = "Successfully downloaded: ".$i." / Errors: ".count($eqsl_results);