Added controller changes

This commit is contained in:
Andreas Kristiansen
2025-07-05 13:34:06 +02:00
parent e0ac1f46e8
commit b390dfc84e

View File

@@ -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");