diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php
index c85a65f2..a05f87c3 100644
--- a/application/controllers/Lotw.php
+++ b/application/controllers/Lotw.php
@@ -111,8 +111,8 @@ class Lotw extends CI_Controller {
// Get credentials for LoTW
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
- $q = $query->row();
- $data['user_lotw_name'] = $q->user_lotw_name;
+ $q = $query->row();
+ $data['user_lotw_name'] = $q->user_lotw_name;
$data['user_lotw_password'] = $q->user_lotw_password;
// Get URL for downloading LoTW
@@ -127,8 +127,17 @@ class Lotw extends CI_Controller {
$this->session->set_flashdata('warning', 'You have not defined your ARRL LoTW credentials!'); redirect('lotw/import');
}
- // Query the logbook to determine when the last LoTW confirmation was
- $lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date()));
+ $customDate = $this->input->post('from');
+
+ if ($customDate != NULL) {
+ $customDate = DateTime::createFromFormat('d/m/Y', $customDate);
+ $customDate = $customDate->format('Y-m-d');
+ $lotw_last_qsl_date = date($customDate);
+ }
+ else {
+ // Query the logbook to determine when the last LoTW confirmation was
+ $lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date()));
+ }
// Build URL for LoTW report file
$lotw_url .= "?";
@@ -139,8 +148,8 @@ class Lotw extends CI_Controller {
//TODO: Option to specifiy whether we download location data from LoTW or not
//$lotw_url .= "&qso_qsldetail=\"yes\";
- $lotw_url .= "&qso_qslsince=";
- $lotw_url .= "$lotw_last_qsl_date";
+ $lotw_url .= "&qso_qslsince=";
+ $lotw_url .= "$lotw_last_qsl_date";
// Only pull back entries that belong to this callsign
$lotw_call = $this->session->userdata('user_callsign');
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php
index b1cd656f..cf5294ba 100644
--- a/application/views/interface_assets/footer.php
+++ b/application/views/interface_assets/footer.php
@@ -1128,5 +1128,17 @@ $(document).ready(function(){
+ uri->segment(2) == "import") { ?>
+
+
+
+
+