diff --git a/application/controllers/Qsl.php b/application/controllers/Qsl.php index 59177e8ad..4c8617e1d 100644 --- a/application/controllers/Qsl.php +++ b/application/controllers/Qsl.php @@ -10,7 +10,7 @@ class Qsl extends CI_Controller { parent::__construct(); $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } - if(($this->config->item('disable_qsl') ?? false)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); exit; } + if(($this->config->item('disable_qsl') ?? false)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); exit; } } // Default view when loading controller. @@ -25,11 +25,38 @@ class Qsl extends CI_Controller { $data['page_title'] = __("QSL Cards"); $data['qslarray'] = $this->qsl_model->getQsoWithQslList(); + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/qsl.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/qsl.js")), + ]; + $this->load->view('interface_assets/header', $data); $this->load->view('qslcard/index'); - $this->load->view('interface_assets/footer'); + $this->load->view('interface_assets/footer', $footerData); } + // View for filtering and showing confirmations on LoTW/QSL/eQSL/QRZ/HRDLog/Clublog + public function confirmations() { + // Render Page + $data['page_title'] = __("Confirmations"); + + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/qsl.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/qsl.js")), + ]; + + $this->load->view('interface_assets/header', $data); + $this->load->view('qslcard/confirmations'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function searchConfirmations() { + $this->load->model('qsl_model'); + $confirmationtype = xss_clean($this->input->post('type')); + $data['result'] = $this->qsl_model->getConfirmations($confirmationtype); + $this->load->view('qslcard/confirmationresult', $data); + } + public function upload() { // Render Page $data['page_title'] = __("Upload QSL Cards");