diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 31aa5afc4..21eb950fe 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -18,6 +18,12 @@ class eqsl extends CI_Controller { // Default view when loading controller. public function index() { + $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'); + } + $this->load->model('eqsl_images'); $this->load->library('Genfunctions'); $folder_name = $this->eqsl_images->get_imagePath('p'); @@ -208,6 +214,12 @@ class eqsl extends CI_Controller { } function generateResultTable($custom_date_format, $rows) { + $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'); + } + $table = ''; $table .= ""; $table .= ""; @@ -226,6 +238,11 @@ class eqsl extends CI_Controller { } function writeEqslNotSent($qslsnotsent, $custom_date_format) { + $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'); + } $table = '
Date
'; $table .= ""; $table .= ""; @@ -260,6 +277,11 @@ class eqsl extends CI_Controller { } function image($id) { + $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'); + } $this->load->library('electronicqsl'); $this->load->model('Eqsl_images'); @@ -317,6 +339,11 @@ class eqsl extends CI_Controller { } function bulk_download_image($id) { + $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'); + } $this->load->library('electronicqsl'); $this->load->model('Eqsl_images');
Date