diff --git a/application/controllers/Accumulated.php b/application/controllers/Accumulated.php index 183329f73..f8616fb4b 100644 --- a/application/controllers/Accumulated.php +++ b/application/controllers/Accumulated.php @@ -10,7 +10,7 @@ class Accumulated extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Activators.php b/application/controllers/Activators.php index eb5667f6c..652833dc6 100644 --- a/application/controllers/Activators.php +++ b/application/controllers/Activators.php @@ -10,7 +10,7 @@ class Activators extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Activatorsmap.php b/application/controllers/Activatorsmap.php index 1399f4d0f..288527c7c 100644 --- a/application/controllers/Activatorsmap.php +++ b/application/controllers/Activatorsmap.php @@ -10,7 +10,7 @@ class Activatorsmap extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index e6ff7355d..023940aa6 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -10,7 +10,7 @@ class adif extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function test() { diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 754fceda5..675ff5990 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -13,7 +13,7 @@ class Awards extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() @@ -451,7 +451,7 @@ class Awards extends CI_Controller { // Render Page $data['page_title'] = __("Log View")." - " . $type; - $data['filter'] = $type." ".$searchphrase." and band ".$band; + $data['filter'] = $type." ".$searchphrase.__(" and band ").$band; if ($band == 'SAT') { if ($sat != 'All' && $sat != null) { $data['filter'] .= __(" and sat ").$sat; @@ -783,6 +783,15 @@ class Awards extends CI_Controller { $this->load->model('iota'); $this->load->model('modes'); $this->load->model('bands'); + $this->load->model('logbooks_model'); + + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + if (!$logbooks_locations_array) { + return null; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band select @@ -839,9 +848,9 @@ class Awards extends CI_Controller { $postdata['mode'] = 'All'; } - $iotalist = $this->iota->fetchIota($postdata); - $data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata); - $data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata); + $iotalist = $this->iota->fetchIota($postdata, $location_list); + $data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata, $location_list); + $data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata, $location_list); // Render Page $data['page_title'] = sprintf(__("Awards - %s"), __("IOTA (Island On The Air)")); @@ -948,17 +957,20 @@ class Awards extends CI_Controller { $footerData = []; $footerData['scripts']= [ - 'assets/js/leaflet/geocoding.js', - 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', - 'assets/js/sections/ffma.js' + 'assets/js/leaflet/geocoding.js', + 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', + 'assets/js/sections/ffma.js' ]; $this->load->view('interface_assets/header',$data); $this->load->view('awards/ffma/index'); $this->load->view('interface_assets/footer',$footerData); - } + } public function getFfmaGridsjs() { + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $this->load->model('ffma_model'); $array_grid_4char = array(); @@ -968,7 +980,7 @@ class Awards extends CI_Controller { $grid_4char = ""; $grid_4char_lotw = ""; - $query = $this->ffma_model->get_lotw(); + $query = $this->ffma_model->get_lotw($location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -978,7 +990,7 @@ class Awards extends CI_Controller { } } - $query = $this->ffma_model->get_paper(); + $query = $this->ffma_model->get_paper($location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -988,7 +1000,7 @@ class Awards extends CI_Controller { } } - $query = $this->ffma_model->get_worked(); + $query = $this->ffma_model->get_worked($location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_four = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -998,7 +1010,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->ffma_model->get_vucc_lotw(); + $vucc_grids = $this->ffma_model->get_vucc_lotw($location_list); foreach($vucc_grids as $key) { $grid_four_lotw = strtoupper(substr($key,0,4)); if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){ @@ -1006,7 +1018,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->ffma_model->get_vucc_paper(); + $vucc_grids = $this->ffma_model->get_vucc_paper($location_list); foreach($vucc_grids as $key) { $grid_four_paper = strtoupper(substr($key,0,4)); if(!in_array($grid_four_paper, $array_grid_4char_paper)){ @@ -1014,7 +1026,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->ffma_model->get_vucc_worked(); + $vucc_grids = $this->ffma_model->get_vucc_worked($location_list); foreach($vucc_grids as $key) { $grid_four = strtoupper(substr($key,0,4)); if(!in_array($grid_four, $array_grid_4char)){ @@ -1033,6 +1045,9 @@ class Awards extends CI_Controller { } public function getGridmasterGridsjs($dxcc) { + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $this->load->model('gridmaster_model'); $dxcc = $this->security->xss_clean($dxcc); @@ -1044,7 +1059,7 @@ class Awards extends CI_Controller { $grid_4char = ""; $grid_4char_lotw = ""; - $query = $this->gridmaster_model->get_lotw($dxcc); + $query = $this->gridmaster_model->get_lotw($dxcc, $location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -1054,7 +1069,7 @@ class Awards extends CI_Controller { } } - $query = $this->gridmaster_model->get_paper($dxcc); + $query = $this->gridmaster_model->get_paper($dxcc, $location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -1064,7 +1079,7 @@ class Awards extends CI_Controller { } } - $query = $this->gridmaster_model->get_worked($dxcc); + $query = $this->gridmaster_model->get_worked($dxcc, $location_list); if ($query && $query->num_rows() > 0) { foreach ($query->result() as $row) { $grid_four = strtoupper(substr($row->GRID_SQUARES,0,4)); @@ -1074,7 +1089,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->gridmaster_model->get_vucc_lotw($dxcc); + $vucc_grids = $this->gridmaster_model->get_vucc_lotw($dxcc, $location_list); foreach($vucc_grids as $key) { $grid_four_lotw = strtoupper(substr($key,0,4)); if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){ @@ -1082,7 +1097,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->gridmaster_model->get_vucc_paper($dxcc); + $vucc_grids = $this->gridmaster_model->get_vucc_paper($dxcc, $location_list); foreach($vucc_grids as $key) { $grid_four_paper = strtoupper(substr($key,0,4)); if(!in_array($grid_four_paper, $array_grid_4char_paper)){ @@ -1090,7 +1105,7 @@ class Awards extends CI_Controller { } } - $vucc_grids = $this->gridmaster_model->get_vucc_worked($dxcc); + $vucc_grids = $this->gridmaster_model->get_vucc_worked($dxcc, $location_list); foreach($vucc_grids as $key) { $grid_four = strtoupper(substr($key,0,4)); if(!in_array($grid_four, $array_grid_4char)){ @@ -1534,6 +1549,15 @@ class Awards extends CI_Controller { public function iota_map() { $this->load->model('iota'); $this->load->model('bands'); + $this->load->model('logbooks_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + if (!$logbooks_locations_array) { + return null; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + $bands[] = $this->security->xss_clean($this->input->post('band')); @@ -1553,9 +1577,9 @@ class Awards extends CI_Controller { $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1; $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1; - $iotalist = $this->iota->fetchIota($postdata); + $iotalist = $this->iota->fetchIota($postdata, $location_list); - $iota_array = $this->iota->get_iota_array($iotalist, $bands, $postdata); + $iota_array = $this->iota->get_iota_array($iotalist, $bands, $postdata, $location_list); $i = 0; diff --git a/application/controllers/Backup.php b/application/controllers/Backup.php index 44bf3bace..5c65e2028 100644 --- a/application/controllers/Backup.php +++ b/application/controllers/Backup.php @@ -10,7 +10,7 @@ class Backup extends CI_Controller { public function index() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("Backup"); @@ -23,7 +23,7 @@ class Backup extends CI_Controller { public function adif($key = null){ if ($key == null) { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } $clean_key = $this->security->xss_clean($key); @@ -60,7 +60,7 @@ class Backup extends CI_Controller { public function notes($key = null) { if ($key == null) { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } $clean_key = $this->security->xss_clean($key); diff --git a/application/controllers/Band.php b/application/controllers/Band.php index 052114aab..121c10803 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -12,7 +12,7 @@ class Band extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Bandmap.php b/application/controllers/Bandmap.php index 55c7fef4c..8145030ca 100644 --- a/application/controllers/Bandmap.php +++ b/application/controllers/Bandmap.php @@ -6,7 +6,7 @@ class Bandmap extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('bands'); } diff --git a/application/controllers/Cabrillo.php b/application/controllers/Cabrillo.php index a8b77cf88..062c079ee 100644 --- a/application/controllers/Cabrillo.php +++ b/application/controllers/Cabrillo.php @@ -13,7 +13,7 @@ class Cabrillo extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { @@ -50,7 +50,7 @@ class Cabrillo extends CI_Controller { header('Content-Type: application/json'); echo json_encode($result); } else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } @@ -77,7 +77,7 @@ class Cabrillo extends CI_Controller { header('Content-Type: application/json'); echo json_encode($result); } else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } @@ -132,7 +132,7 @@ class Cabrillo extends CI_Controller { $this->load->view('cabrillo/export', $data); }else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } } diff --git a/application/controllers/Calltester.php b/application/controllers/Calltester.php index 84afaa8b3..f5baad08e 100644 --- a/application/controllers/Calltester.php +++ b/application/controllers/Calltester.php @@ -8,7 +8,7 @@ class Calltester extends CI_Controller { parent::__construct(); $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Cfdexport.php b/application/controllers/Cfdexport.php index 9e40c792d..4d15bff2b 100644 --- a/application/controllers/Cfdexport.php +++ b/application/controllers/Cfdexport.php @@ -15,7 +15,7 @@ class Cfdexport extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('bands'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("CFD Export"); @@ -26,7 +26,7 @@ class Cfdexport extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('logbook_model'); $this->load->model('dxcc'); diff --git a/application/controllers/Components.php b/application/controllers/Components.php index 63d807188..283700e03 100644 --- a/application/controllers/Components.php +++ b/application/controllers/Components.php @@ -10,7 +10,7 @@ class Components extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Contestcalendar.php b/application/controllers/Contestcalendar.php index 421b42dab..a6e80a5e9 100644 --- a/application/controllers/Contestcalendar.php +++ b/application/controllers/Contestcalendar.php @@ -12,7 +12,7 @@ class Contestcalendar extends CI_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!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index b0dac9839..7aef397c9 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -11,7 +11,7 @@ class Contesting extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Cron.php b/application/controllers/Cron.php index a122876c1..7e31fbb7e 100644 --- a/application/controllers/Cron.php +++ b/application/controllers/Cron.php @@ -23,7 +23,7 @@ class cron extends CI_Controller { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -142,7 +142,7 @@ class cron extends CI_Controller { public function edit() { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Csv.php b/application/controllers/Csv.php index 9b7c4b7dd..037de83cb 100644 --- a/application/controllers/Csv.php +++ b/application/controllers/Csv.php @@ -5,7 +5,7 @@ class Csv extends CI_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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -28,7 +28,7 @@ class Csv extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('csv_model'); // Parameters diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index a7231554d..8741cbf01 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -43,6 +43,9 @@ class Dashboard extends CI_Controller $data['qra'] = "none"; } + // We need the form_helper for the layout/messages + $this->load->helper('form'); + $this->load->model('stations'); $this->load->model('setup_model'); diff --git a/application/controllers/Dayswithqso.php b/application/controllers/Dayswithqso.php index 9e1bb0862..c82567b55 100644 --- a/application/controllers/Dayswithqso.php +++ b/application/controllers/Dayswithqso.php @@ -8,7 +8,7 @@ class Dayswithqso extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index e9af0827a..c2c377e41 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -7,7 +7,7 @@ class Debug extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Distances.php b/application/controllers/Distances.php index f68287ca1..5c65831fa 100644 --- a/application/controllers/Distances.php +++ b/application/controllers/Distances.php @@ -8,7 +8,7 @@ class Distances extends CI_Controller { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Dxatlas.php b/application/controllers/Dxatlas.php index 48cbf81bf..dc10fa4f9 100644 --- a/application/controllers/Dxatlas.php +++ b/application/controllers/Dxatlas.php @@ -4,7 +4,7 @@ class Dxatlas extends CI_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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -26,7 +26,7 @@ class Dxatlas extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('dxatlas_model'); @@ -48,7 +48,7 @@ class Dxatlas extends CI_Controller { function generateFiles($wkdArray, $cfmArray, $band) { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $gridCfmArray = []; $gridWkdArray = []; @@ -105,7 +105,7 @@ class Dxatlas extends CI_Controller { function makeZip($gridWkdString, $gridCfmString, $band) { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $zipFileName = 'dxatlas_gridsquares_'. $band . '.zip'; // Prepare File $file = tempnam(".", "zip"); diff --git a/application/controllers/Dxcalendar.php b/application/controllers/Dxcalendar.php index 9a4029702..a9281c925 100644 --- a/application/controllers/Dxcalendar.php +++ b/application/controllers/Dxcalendar.php @@ -5,7 +5,7 @@ class Dxcalendar extends CI_Controller { public function index() { $this->load->model('user_model'); $this->load->model('logbook_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("DX Calendar"); diff --git a/application/controllers/Dxcluster.php b/application/controllers/Dxcluster.php index 3a642256c..4414873f5 100644 --- a/application/controllers/Dxcluster.php +++ b/application/controllers/Dxcluster.php @@ -6,7 +6,7 @@ class Dxcluster extends CI_Controller { { parent::__construct(); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('dxcluster_model'); } diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 6c70c9eee..6126a2a59 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -20,7 +20,7 @@ class eqsl extends CI_Controller { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -44,7 +44,7 @@ class eqsl extends CI_Controller { public function import() { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -141,7 +141,7 @@ class eqsl extends CI_Controller { public function export() { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -220,7 +220,7 @@ 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!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -244,7 +244,7 @@ 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!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $table = '