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