diff --git a/application/controllers/lotw.php b/application/controllers/lotw.php index b9eefd75..0fb745fc 100644 --- a/application/controllers/lotw.php +++ b/application/controllers/lotw.php @@ -167,4 +167,43 @@ class Lotw extends CI_Controller { } } } // end function + + public function export() { + $data['page_title'] = "LoTW .TQ8 Upload"; + + $config['upload_path'] = './uploads/'; + $config['allowed_types'] = 'tq8|TQ8'; + + $this->load->library('upload', $config); + + if ( ! $this->upload->do_upload()) + { + $data['error'] = $this->upload->display_errors(); + + $this->load->view('layout/header', $data); + $this->load->view('lotw/export'); + $this->load->view('layout/footer'); + } + else + { + + $data = array('upload_data' => $this->upload->data()); + + // Curl stuff goes here + + //unlink('./uploads/'.$data['upload_data']['file_name']); + + $data['page_title'] = "LoTW .TQ8 Sent"; + $this->load->view('layout/header', $data); + + //Perhaps return some sort of success page + $this->load->view('lotw/analysis'); + $this->load->view('layout/footer'); + + + } + + + } + } // end class \ No newline at end of file diff --git a/application/views/layout/header.php b/application/views/layout/header.php index 170c7b30..d2e0fc56 100644 --- a/application/views/layout/header.php +++ b/application/views/layout/header.php @@ -81,6 +81,7 @@
Use Trusted QSL to sign the exported file.
+ +Select the signed file and click "Upload". It will be sent to LoTW for processing.
+ + +Important Log files must have the file type .tq8
+ + +Cloudlog will use the LoTW username an password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since your last LoTW confirmation, up until now.
+ + + + + +