2023-10-24 20:53:45 +00:00
|
|
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
|
2023-10-25 05:48:51 +00:00
|
|
|
class SimpleFLE extends CI_Controller {
|
2023-10-24 20:53:45 +00:00
|
|
|
|
|
|
|
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'); }
|
|
|
|
|
2023-10-26 17:59:02 +00:00
|
|
|
|
2023-10-25 13:14:53 +00:00
|
|
|
$this->load->model('stations');
|
2023-10-25 14:32:39 +00:00
|
|
|
$this->load->model('logbook_model');
|
|
|
|
$this->load->model('modes');
|
|
|
|
$this->load->model('bands');
|
2023-10-25 13:14:53 +00:00
|
|
|
|
|
|
|
$data['station_profile'] = $this->stations->all_of_user(); // Used in the view for station location select
|
2023-10-26 17:59:02 +00:00
|
|
|
$data['bands'] = $this->bands->get_all_bands(); // Fetching Bands for FLE
|
2023-10-26 14:10:05 +00:00
|
|
|
$data['active_station_profile'] = $this->stations->find_active(); // Prepopulate active Station in Station Location Selector
|
2023-10-27 22:23:43 +00:00
|
|
|
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
2023-10-26 13:17:17 +00:00
|
|
|
|
2023-10-25 13:14:53 +00:00
|
|
|
|
2023-10-24 20:53:45 +00:00
|
|
|
$data['page_title'] = "Simple Fast Log Entry";
|
2023-10-26 17:59:02 +00:00
|
|
|
|
2023-10-25 08:02:06 +00:00
|
|
|
$footerData = [];
|
|
|
|
$footerData['scripts'] = [
|
|
|
|
'assets/js/moment.min.js',
|
|
|
|
'assets/js/tempusdominus-bootstrap-4.min.js',
|
|
|
|
'assets/js/datetime-moment.js',
|
|
|
|
'assets/js/sections/simplefle.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/simplefle.js"))
|
|
|
|
];
|
2023-10-24 20:53:45 +00:00
|
|
|
|
|
|
|
$this->load->view('interface_assets/header', $data);
|
2023-10-26 13:17:17 +00:00
|
|
|
$this->load->view('simplefle/index', $data);
|
2023-10-25 08:02:06 +00:00
|
|
|
$this->load->view('interface_assets/footer', $footerData);
|
2023-10-24 20:53:45 +00:00
|
|
|
|
|
|
|
}
|
2023-10-26 12:06:54 +00:00
|
|
|
|
|
|
|
public function displaySyntax() {
|
|
|
|
$this->load->view('simplefle/syntax_help');
|
|
|
|
}
|
2023-10-26 17:59:02 +00:00
|
|
|
}
|