From 93c5937da451e0c559896637b676301d182a9b8e Mon Sep 17 00:00:00 2001
From: Andreas <6977712+AndreasK79@users.noreply.github.com>
Date: Sat, 27 May 2023 10:06:30 +0200
Subject: [PATCH] [QSO Display] Added Lotw info in popup
---
application/language/english/lotw_lang.php | 3 +++
application/language/german/lotw_lang.php | 3 +++
application/models/Logbook_model.php | 4 ++--
application/views/view_log/qso.php | 3 +++
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/application/language/english/lotw_lang.php b/application/language/english/lotw_lang.php
index dd062ab7..26f942b0 100644
--- a/application/language/english/lotw_lang.php
+++ b/application/language/english/lotw_lang.php
@@ -57,3 +57,6 @@ $lang['lotw_confirmed'] = 'This QSO is confirmed on LoTW';
// LoTW Expiry
$lang['lotw_cert_expiring'] = 'At least one of your LoTW certificates is about to expire!';
$lang['lotw_cert_expired'] = 'At least one of your LoTW certificates is expired!';
+
+// Lotw User
+$lang['lotw_user'] = 'This station uses LoTW. The last upload was';
diff --git a/application/language/german/lotw_lang.php b/application/language/german/lotw_lang.php
index 2a2a7f58..2e01e3b0 100644
--- a/application/language/german/lotw_lang.php
+++ b/application/language/german/lotw_lang.php
@@ -57,3 +57,6 @@ $lang['lotw_confirmed'] = 'Dieses QSO wurde via LoTW bestätigt am';
// LoTW Expiry
$lang['lotw_cert_expiring'] = 'Mindestens eines deiner LoTW Zertifikate läuft bald ab!';
$lang['lotw_cert_expired'] = 'Mindestens eines deiner LoTW Zertifikate ist abgelaufen!';
+
+// Lotw User
+$lang['lotw_user'] = 'Diese Station nutzt LoTW. Der letzte Upload war am';
\ No newline at end of file
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index bfed414a..bc794378 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -1295,13 +1295,13 @@ class Logbook_model extends CI_Model {
}
function get_qso($id) {
- $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, dxcc_entities_2.name as station_country, dxcc_entities_2.end as station_end');
- $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file');
+ $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
$this->db->from($this->config->item('table_name'));
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left');
$this->db->join('dxcc_entities as dxcc_entities_2', 'station_profile.station_dxcc = dxcc_entities_2.adif', 'left outer');
$this->db->join('eQSL_images', $this->config->item('table_name').'.COL_PRIMARY_KEY = eQSL_images.qso_id', 'left outer');
+ $this->db->join('lotw_users', $this->config->item('table_name').'.COL_CALL = lotw_users.callsign', 'left outer');
$this->db->where('COL_PRIMARY_KEY', $id);
return $this->db->get();
diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php
index 3a255063..e7475cbf 100644
--- a/application/views/view_log/qso.php
+++ b/application/views/view_log/qso.php
@@ -353,6 +353,9 @@
+ lotwuser != null) { ?>
+
lastupload); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->lastupload); echo " at ".date('H:i', $timestamp);?> UTC.
+ COL_LOTW_QSL_RCVD == "Y") { ?>