From 9b9f62e3e965d1258b3228fdd4cff59b26d41303 Mon Sep 17 00:00:00 2001 From: int2001 Date: Mon, 7 Aug 2023 08:34:40 +0000 Subject: [PATCH] Mark QRZ for reupload if LotW-Confirmation was received after qrz.com upload --- application/models/Logbook_model.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3c27aff0..e0b9005a 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2699,6 +2699,14 @@ class Logbook_model extends CI_Model { $data['COL_ITUZ'] = $ituz; } + // Check if QRZ is already uploaded. If so, set qso to reupload to qrz.com (M) + $qsql = "select COL_QRZCOM_QSO_UPLOAD_STATUS as QRZ_STATE from ".$this->config->item('table_name')." where COL_BAND=? and COL_CALL=? and COL_STATION_CALLSIGN=? and date_format(COL_TIME_ON, '%Y-%m-%d %H:%i') = ?"; + $query = $this->db->query($qsql, array($band, $callsign,$station_callsign,$datetime)); + $row = $query->row(); + if ($row->QRZ_STATE == 'Y') { + $data['COL_QRZCOM_QSO_UPLOAD_STATUS'] = 'M'; + } + $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); $this->db->where('COL_CALL', $callsign); $this->db->where('COL_BAND', $band);