From c1fc9ea2d6614e65b81c1ad283fc18f33309d2cc Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 28 Sep 2025 11:09:10 +0200 Subject: [PATCH] Added column to adif import/export --- application/libraries/AdifHelper.php | 1 + application/models/Logbook_model.php | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/application/libraries/AdifHelper.php b/application/libraries/AdifHelper.php index 392122608..f2d48447e 100644 --- a/application/libraries/AdifHelper.php +++ b/application/libraries/AdifHelper.php @@ -37,6 +37,7 @@ class AdifHelper { 'EQSL_QSL_RCVD', 'EQSL_QSL_SENT', 'EQSL_STATUS', + 'EQSL_AG', 'FISTS', 'FISTS_CC', 'FORCE_INIT', diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 8e591de0c..ef9d9bd97 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -938,7 +938,7 @@ class Logbook_model extends CI_Model { * Function checks if a HRDLog Code and Username exists in the table with the given station id */ function exists_hrdlog_credentials($station_id) { - + //checks only disabled state $sql = 'select hrdlog_username, hrdlog_code, hrdlogrealtime from station_profile where station_id = ? and hrdlogrealtime >= 0;'; @@ -4592,6 +4592,7 @@ class Logbook_model extends CI_Model { 'COL_EQSL_QSLRDATE' => (!empty($record['eqsl_qslrdate'])) ? $record['eqsl_qslrdate'] : null, 'COL_EQSL_QSLSDATE' => $input_eqsl_qso_upload_date, 'COL_EQSL_STATUS' => (!empty($record['eqsl_status'])) ? $record['eqsl_status'] : '', + 'COL_EQSL_AG' => (!empty($record['eqsl_ag'])) ? $record['eqsl_ag'] : '', 'COL_FISTS' => (!empty($record['fists'])) ? $record['fists'] : null, 'COL_FISTS_CC' => (!empty($record['fists_cc'])) ? $record['fists_cc'] : null, 'COL_FORCE_INIT' => (!empty($record['force_init'])) ? $record['force_init'] : null, @@ -4834,13 +4835,13 @@ class Logbook_model extends CI_Model { if ($darc_dok != '') { $bindings=[]; - $sql="select COL_PRIMARY_KEY, COL_DARC_DOK, COL_DCL_QSL_RCVD from ".$this->config->item('table_name')." - where col_call=? and col_band=? and col_mode=? and station_id in ? + $sql="select COL_PRIMARY_KEY, COL_DARC_DOK, COL_DCL_QSL_RCVD from ".$this->config->item('table_name')." + where col_call=? and col_band=? and col_mode=? and station_id in ? AND COL_TIME_ON >= DATE_ADD(DATE_FORMAT(?, '%Y-%m-%d %H:%i' ), INTERVAL -15 MINUTE) AND COL_TIME_ON <= DATE_ADD(DATE_FORMAT(?, '%Y-%m-%d %H:%i' ), INTERVAL +15 MINUTE)"; - $bindings[]=$call; - $bindings[]=$band; - $bindings[]=$mode; - $bindings[]=$logbooks_locations_array; + $bindings[]=$call; + $bindings[]=$band; + $bindings[]=$mode; + $bindings[]=$logbooks_locations_array; $bindings[]=$time_on; $bindings[]=$time_on; $check = $this->db->query($sql,$bindings);