diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 01cb8f7d..a8726557 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -538,7 +538,19 @@ class Lotw extends CI_Controller { $cnty = ""; } - $lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $iota, $cnty); + if (isset($record['cqz'])) { + $cqz = $record['cqz']; + } else { + $cqz = ""; + } + + if (isset($record['ituz'])) { + $ituz = $record['ituz']; + } else { + $ituz = ""; + } + + $lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz); } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index bc794378..db8771de 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2484,7 +2484,7 @@ class Logbook_model extends CI_Model { } } - function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty) { + function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz) { $data = array( 'COL_LOTW_QSLRDATE' => $qsl_date, @@ -2502,6 +2502,14 @@ class Logbook_model extends CI_Model { $data['COL_CNTY'] = $cnty; } + if($cqz != "") { + $data['COL_CQZ'] = $cqz; + } + + if($ituz != "") { + $data['COL_ITUZ'] = $ituz; + } + $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);