Cloudlog/application/controllers/Options.php
Peter Goodhall 8dfaf47c79 [Options] Greates OptionsLib library, sets default theme and others
This commit does a couple of things

- Creates OptionsLib which stores the 'Options' within the CI config system prefixed with "options_"
- Loads the OptionsLib automatically
- Adds function to OptionsLib for selecting the active stylesheet.
- Adds function to get an option_value that isn't automatically loaded.
2020-12-12 22:03:42 +00:00

27 行
无行尾
603 B
PHP

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Handles Displaying of information for station tools.
*/
class Options extends CI_Controller {
function __construct()
{
parent::__construct();
$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'); }
}
function index() {
//echo $this->config->item('option_theme');
echo $this->optionslib->get_option('theme');
}
}