You're not allowed to do that!

This commit is contained in:
HB9HIL
2024-08-16 10:08:44 +02:00
parent 4b0517b9b4
commit 5dee1b9968
52 changed files with 152 additions and 101 deletions

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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()

View File

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

View File

@@ -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()

View File

@@ -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');
}

View File

@@ -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');
}
}
}

View File

@@ -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'); }
}

View File

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

View File

@@ -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() {

View File

@@ -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');
}

View File

@@ -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() {

View File

@@ -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');
}

View File

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

View File

@@ -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()

View File

@@ -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');
}

View File

@@ -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()

View File

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

View File

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

View File

@@ -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');
}

View File

@@ -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 = '<table = style="width:100%" class="table-sm table qsotable table-bordered table-hover table-striped table-condensed text-center">';
@@ -283,7 +283,7 @@ 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!');
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}
$this->load->library('electronicqsl');
@@ -345,7 +345,7 @@ 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!');
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}
$this->load->library('electronicqsl');
@@ -408,7 +408,7 @@ class eqsl extends CI_Controller {
// 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!');
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}
@@ -424,7 +424,7 @@ class eqsl extends CI_Controller {
// 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!');
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}
$errors = 0;
@@ -484,7 +484,7 @@ class eqsl extends CI_Controller {
// 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!');
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
redirect('dashboard');
}

View File

@@ -10,7 +10,7 @@ class Hamsat 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() {

View File

@@ -15,7 +15,7 @@ class Kmlexport 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['worked_bands'] = $this->bands->get_worked_bands(); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select
@@ -30,7 +30,7 @@ class Kmlexport 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'); }
// Load Libraries
if(!$this->load->is_loaded('Qra')) {
$this->load->library('Qra');

View File

@@ -23,7 +23,7 @@ class Labels extends CI_Controller {
$this->load->helper(array('form', 'url', 'psr4_autoloader'));
$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'); }
}

View File

@@ -13,7 +13,7 @@ class Logbookadvanced 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');
}
}

View File

@@ -14,7 +14,7 @@ class Lookup 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()

View File

@@ -42,7 +42,7 @@ class Lotw extends CI_Controller {
public function index() {
$this->load->library('Permissions');
$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'); }
// Load required models for page generation
$this->load->model('Lotw_model');
@@ -74,7 +74,7 @@ class Lotw extends CI_Controller {
public function cert_upload() {
$this->load->model('user_model');
$this->load->model('dxcc');
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'); }
// Load DXCC Countrys List
$data['dxcc_list'] = $this->dxcc->list();
@@ -101,7 +101,7 @@ class Lotw extends CI_Controller {
{
$this->load->model('user_model');
$this->load->model('dxcc');
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'); }
// create folder to store certs while processing
if (!file_exists('./uploads/lotw/certs')) {
@@ -375,7 +375,7 @@ class Lotw extends CI_Controller {
*/
public function delete_cert($cert_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'); }
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
$this->load->model('Lotw_model');
@@ -398,7 +398,7 @@ class Lotw extends CI_Controller {
*/
public function decrypt_key($file, $password = "") {
$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'); }
$results = array();
$password = $password; // Only needed if 12 has a password set
@@ -709,7 +709,7 @@ class Lotw extends CI_Controller {
public function import() { // Is only called via frontend. Cron uses "upload". within download the download is called
$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');
exit();
}
@@ -817,7 +817,7 @@ class Lotw extends CI_Controller {
}
}
} else {
$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');
exit();
}
@@ -825,7 +825,7 @@ class Lotw 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'); }
$data['page_title'] = __("LoTW .TQ8 Upload");

View File

@@ -12,7 +12,7 @@ class Mode 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()

View File

@@ -7,7 +7,7 @@ class Notes 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'); }
}

View File

@@ -12,7 +12,7 @@ class Options extends CI_Controller {
$this->load->helper(array('form', 'url'));
$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'); }
}

View File

@@ -11,8 +11,8 @@ class Oqrs extends CI_Controller {
parent::__construct();
// Commented out to get public access
// $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->config->item('disable_oqrs') ?? false)) { $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'); }
if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
}
public function index() {

View File

@@ -10,7 +10,7 @@ class Qrbcalc 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() {

View File

@@ -248,7 +248,7 @@ class Qrz extends CI_Controller {
public function import_qrz() {
$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'); }
$data['page_title'] = __("QRZ QSL Import");

View File

@@ -9,8 +9,8 @@ class Qsl extends CI_Controller {
function __construct() {
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->config->item('disable_qsl') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); exit; }
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; }
}
// Default view when loading controller.
@@ -41,7 +41,7 @@ class Qsl extends CI_Controller {
// Deletes QSL Card
public function delete() {
$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'); }
$id = $this->input->post('id');
$this->load->model('Qsl_model');
$this->Qsl_model->deleteQsl($id);
@@ -49,7 +49,7 @@ class Qsl extends CI_Controller {
public function uploadqsl() {
$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'); }
$qsoid = $this->input->post('qsoid');

View File

@@ -144,7 +144,7 @@ class QSLPrint extends CI_Controller {
$this->load->model('qslprint_model');
$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'); }
// Update Logbook to Mark Paper Card Sent

View File

@@ -6,7 +6,7 @@ class QSO 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() {
@@ -16,7 +16,7 @@ class QSO extends CI_Controller {
$this->load->model('user_model');
$this->load->model('modes');
$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'); }
// Getting the live/post mode from GET command
// 0 = live
@@ -173,7 +173,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
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'); }
$query = $this->logbook_model->qso_info($this->uri->segment(3));
$this->load->library('form_validation');
@@ -276,7 +276,7 @@ class QSO extends CI_Controller {
$this->load->library('form_validation');
if(!$this->user_model->authorize(2)) {
$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');
}
$id = str_replace('"', "", $this->input->post("id", TRUE));
@@ -296,7 +296,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model');
$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->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard');
}
$this->logbook_model->edit();
@@ -305,7 +305,7 @@ class QSO extends CI_Controller {
function qsl_rcvd($id, $method) {
$this->load->model('logbook_model');
$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'); }
// Update Logbook to Mark Paper Card Received
@@ -600,7 +600,7 @@ class QSO extends CI_Controller {
// Return Previous QSOs Made in the active logbook
public function component_past_contacts() {
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');
session_write_close();

View File

@@ -256,7 +256,7 @@ class Radio extends CI_Controller {
// Check Auth
$this->load->model('user_model');
if (!$this->user_model->authorize(3)) {
$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');
}
@@ -282,7 +282,7 @@ class Radio extends CI_Controller {
// Check Auth
$this->load->model('user_model');
if (!$this->user_model->authorize(3)) {
$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');
}
@@ -298,7 +298,7 @@ class Radio extends CI_Controller {
// Check Auth
$this->load->model('user_model');
if (!$this->user_model->authorize(3)) {
$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');
}

View File

@@ -12,7 +12,7 @@ class Satellite extends CI_Controller {
$this->load->helper(array('form', 'url'));
$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'); }
}
public function index()

View File

@@ -6,7 +6,7 @@ class Sattimers 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() {

View File

@@ -10,7 +10,7 @@ class Search extends CI_Controller {
$this->load->helper(array('form', 'url'));
if($this->optionslib->get_option('global_search') != "true") {
$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'); }
}
}

View File

@@ -4,7 +4,7 @@ class SimpleFLE 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('stations');

View File

@@ -14,7 +14,7 @@ class Station 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');
}
}

View File

@@ -12,7 +12,7 @@ class Stationsetup 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() {

View File

@@ -14,7 +14,7 @@ class Themes 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()

View File

@@ -8,7 +8,7 @@ class Timeline 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()

View File

@@ -8,7 +8,7 @@ class Timeplotter 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()

View File

@@ -21,7 +21,7 @@ class Update 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'); }
$data['page_title'] = __("Updates");
$this->load->view('interface_assets/header', $data);
@@ -270,7 +270,7 @@ class Update extends CI_Controller {
public function check_missing_dxcc($all = false){
$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');
}
@@ -281,7 +281,7 @@ class Update extends CI_Controller {
public function check_missing_continent() {
$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');
}
@@ -292,7 +292,7 @@ class Update extends CI_Controller {
public function update_distances() {
$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');
}
@@ -303,7 +303,7 @@ class Update extends CI_Controller {
public function check_missing_grid($all = false){
$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');
}

View File

@@ -5,7 +5,7 @@ class User 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['results'] = $this->user_model->users();
@@ -18,7 +18,7 @@ class User extends CI_Controller {
function add() {
$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['existing_languages'] = $this->config->item('languages');
@@ -203,8 +203,8 @@ class User extends CI_Controller {
function edit() {
$this->load->model('user_model');
if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
if ( $this->config->item('special_callsign') && $this->session->userdata('user_type') != '99' && $this->config->item('sc_hide_usermenu') ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
if ( $this->config->item('special_callsign') && $this->session->userdata('user_type') != '99' && $this->config->item('sc_hide_usermenu') ) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
$query = $this->user_model->get_by_id($this->uri->segment(3));
$data['existing_languages'] = $this->config->item('languages');
@@ -716,7 +716,7 @@ class User extends CI_Controller {
function profile() {
$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'); }
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
$q = $query->row();
$data['page_title'] = __("Profile");
@@ -735,7 +735,7 @@ class User extends CI_Controller {
function delete() {
$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'); }
$query = $this->user_model->get_by_id($this->uri->segment(3));
$this->load->library('form_validation');
@@ -1018,7 +1018,7 @@ class User 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!'); redirect('dashboard'); }
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
$query = $this->user_model->get_by_id($this->input->post('user_id'));

View File

@@ -6,7 +6,7 @@ class User_Options extends CI_Controller {
parent::__construct();
$this->load->model('user_model');
$this->load->model('user_options_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 add_edit_fav() {

View File

@@ -0,0 +1,51 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_impersonators extends CI_Migration {
// This migration is to add the impersonators table to the database
// This table is used to authorize a user to impersonate another user (special callsigns or club stations)
public function up() {
if (!$this->db->table_exists('impersonators')) {
$this->dbforge->add_field(array(
'id' => array(
'type' => 'INT',
'constraint' => 6,
'unsigned' => TRUE,
'auto_increment' => TRUE,
'null' => FALSE
),
'user_id' => array(
'type' => 'BIGINT',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE,
'null' => FALSE
),
'impersonate_id' => array(
'type' => 'BIGINT',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE,
'null' => FALSE
)
));
$this->dbforge->add_key('id', TRUE);
$this->dbforge->create_table('impersonators');
}
}
public function down() {
$this->dbforge->drop_table('impersonators');
}
}