From 03529db78ba59c10602c12a3b3cba7e93a064a47 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 2 Nov 2020 17:23:41 +0000 Subject: [PATCH 1/4] [QSL Management] Added notification on the max file size you can upload --- application/controllers/Logbook.php | 2 +- application/views/view_log/qso.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index ac8b85ef..d7a78199 100755 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -413,7 +413,7 @@ class Logbook extends CI_Controller { $this->load->model('Qsl_model'); $data['qslimages'] = $this->Qsl_model->getQslForQsoId($id); - + $data['max_upload'] = ini_get('upload_max_filesize'); $this->load->view('interface_assets/mini_header', $data); $this->load->view('view_log/qso'); $this->load->view('interface_assets/footer'); diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 2440de91..6239d9c2 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -317,6 +317,9 @@ echo ''; } ?> + +

+
From f6c8a03c5d174fed38698f80d062903d142b52d9 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 3 Nov 2020 13:52:14 +0000 Subject: [PATCH 2/4] [QSL Card] When selecting file to upload offer file browser or camera. --- application/views/view_log/qso.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 6239d9c2..65ea2f32 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -325,12 +325,12 @@
- +
- +
From 5aeab442acf95b2702d0da4733ad7346ade3e0e4 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 3 Nov 2020 15:37:37 +0000 Subject: [PATCH 3/4] Added a robots.txt file to block indexing of /assets /images and json map output --- robots.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 robots.txt diff --git a/robots.txt b/robots.txt new file mode 100644 index 00000000..6f1af743 --- /dev/null +++ b/robots.txt @@ -0,0 +1,4 @@ +User-Agent: * +Disallow: /assets +Disallow: /images +Disallow: /index.php/logbook/qso_map \ No newline at end of file From 254f7f3f2a245d18f480eb87cbf518ca8a58f848 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 3 Nov 2020 16:06:35 +0000 Subject: [PATCH 4/4] [eQSL] Added Tools this allows you to mark all QSOs as sent to eQSL if manually uploaded Thanks to M0TAZ for requesting this option, if you have lots of QSOs on a fresh install, use this function to mark all QSOs as uploaded to eQSL when you manually upload ADIF to eQSL. --- application/controllers/Eqsl.php | 29 ++++++++++++++++++++++++ application/models/Eqslmethods_model.php | 21 +++++++++++++++++ application/views/eqsl/analysis.php | 3 +++ application/views/eqsl/export.php | 3 +++ application/views/eqsl/import.php | 4 ++++ application/views/eqsl/tools.php | 28 +++++++++++++++++++++++ application/views/layout/messages.php | 10 ++++---- 7 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 application/models/Eqslmethods_model.php create mode 100644 application/views/eqsl/tools.php diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 3be8507e..34dca96d 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -628,5 +628,34 @@ class eqsl extends CI_Controller { } } + + public function tools() { + + // Check logged in + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + $data['page_title'] = "eQSL Tools"; + + // Load frontend + $this->load->view('interface_assets/header', $data); + $this->load->view('eqsl/tools'); + $this->load->view('interface_assets/footer'); + } + + public function mark_all_sent() { + + // Check logged in + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + // mark all eqsls as sent + $this->load->model('eqslmethods_model'); + $this->eqslmethods_model->mark_all_as_sent(); + + $this->session->set_flashdata('success', 'All eQSLs Marked as Uploaded'); + + redirect('eqsl/tools'); + } } // end class diff --git a/application/models/Eqslmethods_model.php b/application/models/Eqslmethods_model.php new file mode 100644 index 00000000..539be9e3 --- /dev/null +++ b/application/models/Eqslmethods_model.php @@ -0,0 +1,21 @@ + 'Y', + 'COL_EQSL_QSLSDATE' => date('Y-m-d')." 00:00:00", + ); + + $this->db->replace($this->config->item('table_name'), $data); + } + +} + +?> \ No newline at end of file diff --git a/application/views/eqsl/analysis.php b/application/views/eqsl/analysis.php index 83ac0503..0e53941f 100644 --- a/application/views/eqsl/analysis.php +++ b/application/views/eqsl/analysis.php @@ -10,6 +10,9 @@ + diff --git a/application/views/eqsl/export.php b/application/views/eqsl/export.php index 93bcc624..ec64a190 100644 --- a/application/views/eqsl/export.php +++ b/application/views/eqsl/export.php @@ -10,6 +10,9 @@ + diff --git a/application/views/eqsl/import.php b/application/views/eqsl/import.php index 17986308..f566c243 100644 --- a/application/views/eqsl/import.php +++ b/application/views/eqsl/import.php @@ -9,6 +9,10 @@ + + diff --git a/application/views/eqsl/tools.php b/application/views/eqsl/tools.php new file mode 100644 index 00000000..fa6e0948 --- /dev/null +++ b/application/views/eqsl/tools.php @@ -0,0 +1,28 @@ +
+

+
+
+
eQSL Tools
+ +
+ +
+ load->view('layout/messages'); ?> + +

Mark All QSOs as Sent to eQSL use this if you have lots of QSOs to upload to eQSL it will save the server timing out.

+
+
+ +
diff --git a/application/views/layout/messages.php b/application/views/layout/messages.php index ee15402a..141cef52 100644 --- a/application/views/layout/messages.php +++ b/application/views/layout/messages.php @@ -1,34 +1,34 @@ session->flashdata('success') != '') { ?> -
+ session->flashdata('notice') != '') { ?> -
+ session->flashdata('warning') != '') { ?> -
+ session->flashdata('error') != '') { ?> -
+ -
+ \ No newline at end of file