From bc17566e49e96d3b4c15cd0e5a22f96368a4238a Mon Sep 17 00:00:00 2001 From: Corby Krick Date: Mon, 4 Mar 2013 22:59:33 -0600 Subject: [PATCH] Added a view for uploading TQ8 (LoTW signed files). Working on the controller for functionality yet. --- application/controllers/lotw.php | 39 +++++++++++++++++++++++++++++ application/views/layout/header.php | 1 + application/views/lotw/export.php | 24 ++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 application/views/lotw/export.php 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 @@
  • Data Export
  • API
  • LoTW Import
  • +
  • LoTW Export
  • diff --git a/application/views/lotw/export.php b/application/views/lotw/export.php new file mode 100644 index 00000000..32bb708c --- /dev/null +++ b/application/views/lotw/export.php @@ -0,0 +1,24 @@ +
    +

    + + +

    Step 1

    + Export an ADIF file of QSOs that have not been uploaded to LoTW. + +

    Step 2

    +

    Use Trusted QSL to sign the exported file.

    + +

    Step 3

    +

    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.

    + + + + + +