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 @@
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.
+