diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index 3864f0be..eb789d6d 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -121,26 +121,6 @@ class adif extends CI_Controller { $this->load->view('adif/mark_lotw', $data); } - public function mark_qrz() { - // Set memory limit to unlimited to allow heavy usage - ini_set('memory_limit', '-1'); - - $station_id = $this->security->xss_clean($this->input->post('station_profile')); - - $this->load->model('adif_data'); - - $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id); - - $this->load->model('logbook_model'); - - foreach ($data['qsos']->result() as $qso) - { - $this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY); - } - - $this->load->view('adif/mark_qrz', $data); - } - public function export_lotw() { // Set memory limit to unlimited to allow heavy usage diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index 29e1e856..c663d6ff 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -108,11 +108,8 @@ class Qrz extends CI_Controller { $data['page_title'] = "QRZ Logbook"; + $data['station_profiles'] = $this->stations->all(); $data['station_profile'] = $this->stations->stations_with_qrz_api_key(); - $active_station_id = $this->stations->find_active(); - $station_profile = $this->stations->profile($active_station_id); - - $data['active_station_info'] = $station_profile->row(); $this->load->view('interface_assets/header', $data); $this->load->view('qrz/export'); @@ -125,6 +122,7 @@ class Qrz extends CI_Controller { public function upload_station() { $this->setOptions(); $this->load->model('stations'); + $postData = $this->input->post(); $this->load->model('logbook_model'); @@ -148,4 +146,26 @@ class Qrz extends CI_Controller { echo json_encode($data); } } -} \ No newline at end of file + + public function mark_qrz() { + // Set memory limit to unlimited to allow heavy usage + ini_set('memory_limit', '-1'); + + $station_id = $this->security->xss_clean($this->input->post('station_profile')); + + $this->load->model('adif_data'); + + $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id); + + $this->load->model('logbook_model'); + + foreach ($data['qsos']->result() as $qso) + { + $this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY); + } + + $this->load->view('interface_assets/header', $data); + $this->load->view('qrz/mark_qrz', $data); + $this->load->view('interface_assets/footer'); + } +} diff --git a/application/views/adif/import.php b/application/views/adif/import.php index 7405abdf..33b97b8e 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -14,9 +14,6 @@ - @@ -186,40 +183,6 @@ - -
- - -
- -

Warning If a date range is not selected then all QSOs will be marked!

-

From date:

-
-
- -
-
-
-
-
-

To date:

-
-
- -
-
-
-
-
-
- -
-
diff --git a/application/views/qrz/export.php b/application/views/qrz/export.php index 7567429c..36ac306c 100644 --- a/application/views/qrz/export.php +++ b/application/views/qrz/export.php @@ -5,15 +5,24 @@
- Upload Logbook + +
- +
+

Here you can see and upload all QSOs which have not been previously uploaded to a QRZ logbook.

You need to set a QRZ Logbook API key in your station profile. Only station profiles with an API Key set are displayed.

WarningThis might take a while as QSO uploads are processed sequentially.

- + result()) { echo ' @@ -39,7 +48,7 @@ echo ''; echo ''; } - echo '
'; + echo ''; } else { @@ -48,5 +57,39 @@ ?>
-
+
+ +
+ +

Warning If a date range is not selected then all QSOs will be marked!

+

From date:

+
+
+ +
+
+
+
+
+

To date:

+
+
+ +
+
+
+
+
+
+ +
+
+
+ + diff --git a/application/views/adif/mark_qrz.php b/application/views/qrz/mark_qrz.php similarity index 100% rename from application/views/adif/mark_qrz.php rename to application/views/qrz/mark_qrz.php