From 162a47a19fe05424c3e73487404b23936e7e22ba Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 May 2023 19:24:53 +0200 Subject: [PATCH] Add eQSL to QSO display --- .../language/english/general_words_lang.php | 1 + .../language/german/general_words_lang.php | 1 + application/models/Logbook_model.php | 5 +++-- application/views/view_log/qso.php | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index a93002c7..03f911d1 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -48,6 +48,7 @@ $lang['general_word_qslcard_bureau'] = 'Bureau'; $lang['general_word_qslcard_electronic'] = 'Electronic'; $lang['general_word_qslcard_manager'] = 'Manager'; $lang['general_word_qslcard_via'] = 'Via'; +$lang['general_word_eqslcard'] = 'eQSL Card'; $lang['general_word_eqslcards'] = 'eQSL Cards'; $lang['general_word_lotw'] = 'Logbook of the World'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index f7dbeb42..9b58e4fa 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -47,6 +47,7 @@ $lang['general_word_qslcard_direct'] = 'Direkt'; $lang['general_word_qslcard_bureau'] = 'Büro'; $lang['general_word_qslcard_electronic'] = 'Elektronisch'; $lang['general_word_qslcard_via'] = 'Via'; +$lang['general_word_eqslcard'] = 'eQSL Karte'; $lang['general_word_eqslcards'] = 'eQSL Karten'; $lang['general_word_lotw'] = 'Logbook of the World'; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 692803aa..bfed414a 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1296,11 +1296,12 @@ 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'); + $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->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->where('COL_PRIMARY_KEY', $id); return $this->db->get(); @@ -3794,4 +3795,4 @@ function validateADIFDate($date, $format = 'Ymd') $d = DateTime::createFromFormat($format, $date); return $d && $d->format($format) == $date; } -?> \ No newline at end of file +?> diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index f607d740..a2791b79 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -31,6 +31,19 @@ } ?> + config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { + + echo '
  • eqsl_image_file == null) { + echo 'hidden '; + } + echo 'class="eqslcardtab nav-item"> + '. $this->lang->line('general_word_eqslcard') .' +
  • '; + } + + ?> @@ -553,6 +566,11 @@ +
    + eqsl_image_file .'" alt="QSL picture #'. $i++.'">'; + ?> +