From 256dddc1f63f81dbf61508f6646af1a50aa08c51 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sat, 21 Nov 2020 22:06:25 +0100 Subject: [PATCH] [QRZ Logbook] Added mark QSOs as uploaded. --- application/controllers/Adif.php | 20 ++++++- application/views/adif/import.php | 88 +++++++++++++++++++++-------- application/views/adif/mark_qrz.php | 22 ++++++++ assets/js/sections/adif.js | 10 ++++ 4 files changed, 113 insertions(+), 27 deletions(-) create mode 100644 application/views/adif/mark_qrz.php diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index 600654fd..e5fd4820 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -110,8 +110,6 @@ class adif extends CI_Controller { $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to')); - //$this->load->view('adif/import', $data); - foreach ($data['qsos']->result() as $qso) { $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY); @@ -120,6 +118,24 @@ 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'); + + $this->load->model('adif_data'); + + $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to')); + + $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/views/adif/import.php b/application/views/adif/import.php index 7f56d40e..0a2302af 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -119,31 +119,7 @@

-
Logbook of The World
-

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

-
-

From date:

-
-
- -
-
-
-
-
-

To date:

-
-
- -
-
-
-
-
-
- -
-

+
Export Satellite-Only QSOs

Export All Satellite QSOs

@@ -152,6 +128,68 @@ +
+
+
+ Logbook Of The World +
+
+

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

+
+

From date:

+
+
+ +
+
+
+
+
+

To date:

+
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+ QRZ Logbook +
+
+

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/adif/mark_qrz.php new file mode 100644 index 00000000..ac0b5ff1 --- /dev/null +++ b/application/views/adif/mark_qrz.php @@ -0,0 +1,22 @@ +
+
+ session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ + +
+
+ QSOs marked +
+
+

Yay, it's done!

+

The QSOs are marked as exported to QRZ Logbook.

+
+
+ + +
+ diff --git a/assets/js/sections/adif.js b/assets/js/sections/adif.js index 0ddb3b95..4b3d7ec6 100644 --- a/assets/js/sections/adif.js +++ b/assets/js/sections/adif.js @@ -20,4 +20,14 @@ $(function () { $('#datetimepicker4').datetimepicker({ format: 'DD/MM/YYYY', }); +}); +$(function () { + $('#datetimepicker5').datetimepicker({ + format: 'DD/MM/YYYY', + }); +}); +$(function () { + $('#datetimepicker6').datetimepicker({ + format: 'DD/MM/YYYY', + }); }); \ No newline at end of file