diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 2a464193..57de9e80 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -253,6 +253,8 @@ class Lotw extends CI_Controller { echo "Upload Successful - ".$filename_for_saving; + $this->LotwCert->last_upload($data['lotw_cert_info']->lotw_cert_id); + // Mark QSOs as Sent foreach ($qso_id_array as $qso_number) { $this->Logbook_model->mark_lotw_sent($qso_number); diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php index c43b7f83..6cb1c2a1 100644 --- a/application/models/LotwCert.php +++ b/application/models/LotwCert.php @@ -73,6 +73,20 @@ class LotwCert extends CI_Model { $this->db->where('user_id', $user_id); $this->db->delete('lotw_certs'); } + + function last_upload($certID) { + + $data = array( + 'last_upload' => date("Y-m-d H:i:s"), + ); + + + $this->db->where('lotw_cert_id', $certID); + + $this->db->update('lotw_certs', $data); + + return "Updated"; + } function empty_table($table) { $this->db->empty_table($table);