public function __construct() { parent::__construct(); $this->load->library('settings'); $this->load->library('email'); $this->load->library('registry'); }
public function __construct() { parent::__construct(); $this->class = 'user'; $this->load->model('user_model', 'user'); $this->load->model('role_model', 'role'); }
public function __construct() { parent::__construct(); $this->load->model('visual_themes')->library('template'); // Determine the current visual theme. if ($this->input->get('theme') != '' && $this->input->method() == 'get' && !$this->input->is_ajax_request()) { $theme = (string) $this->input->get('theme'); $this->visual_themes->set_current($theme); parse_str(parse_url(CURRENT_URL, PHP_URL_QUERY), $query); unset($query['theme']); redirect(http_build_url(current_url(), array('query' => http_build_query($query)))); } $this->template->set_theme($this->visual_themes->get_current()); $default_title = config_item('default_title'); $default_description = config_item('default_description'); $default_keywords = config_item('default_keywords'); if ($default_title != '') { $this->template->title($default_title); } if ($default_description != '') { $this->template->set_metadata('description', $default_description); } if ($default_keywords != '') { $this->template->set_metadata('keywords', $default_keywords); } $this->template->set_breadcrumb('<i class="fa fa-home"></i> ' . $this->lang->line('ui_home'), site_url()); }
public function __construct() { parent::__construct(); $this->load->library('settings')->helper('language')->helper('url')->helper('asset')->helper('html')->helper('array')->parser()->language('mailer')->language('contact')->library('kcaptcha', null, 'captcha')->library('form_validation')->helper('email'); $this->lang->load('captcha', '', FALSE, TRUE, '', 'captcha'); $this->config->load('contact_page', FALSE, TRUE); }
public function init() { $this->oAuth = new Module_Auth(); if ($iSessionTimeout = $this->oLithium->getConfig('General.Session_timeout')) { $this->oAuth->setTimeout($iSessionTimeout); } // load xajax lib Loader::loadClass('Library_Xajax', 'LXajax'); $this->oXajax = new LXajax(); $this->oXajax->registerXajaxFunctions($this); // if xajax call end executing rest of code if ($this->isAjaxCall()) { parent::init(); return; } // sprawdzanie czy uzytkownik niezalogowany if (!$this->isUserAllowed() && $this->getName() != "Login") { $this->redirect('/login'); return; } parent::init(); $this->mTemplate->headers = $this->oXajax->getJavascript(); $this->mTemplate->menu = $this->getMenu(); $this->mTemplate->aResources = []; }
/** * Constructor. */ public function __construct() { parent::__construct(); // Enable profiler by definition if (defined('DEBUGAPP') && DEBUGAPP) { $this->output->enable_profiler(true);
/** * 与前端node实现模板html,代替view功能(正常页面) */ public function viewRender($data, $view, $style = null, $subSite = null, $name = null) { $navInfo = array("className" => 'icon-nav-mp', "title" => '蓝莓说'); $style = $style ? $style : 'blue'; $subSite = $subSite ? $subSite : 'mp'; $view = $style . "/{$subSite}" . $view; parent::ViewRender($data, $view, $navInfo); }
public function __construct() { if (NORMAL_MVC_EXECUTION) { echo 'Access to the dummy controller is not allowed on normal MVC execution.'; exit(EXIT_ERROR); } parent::__construct(); }
public function __construct() { parent::__construct(); $this->load->helper('language'); $this->load->language('welcome'); // Load profiler logger $this->load->helper('profiler_log'); }
public function __construct() { // Disabled in production if (IN_PRODUCTION === TRUE) { Core::error_404(); } parent::__construct(); }
public function __construct() { parent::__construct(); $this->template->page_title = __('Dashboard'); $clients = $this->cache->get('client') ? $this->cache->get('client') : ORM::factory('client')->find_all_as_array(); foreach ($clients as $client) { $client_list[$client['id']] = $client['company']; } $this->template->sidebar = array('hooks/sidebar/newinvoices' => array('clients' => $client_list), 'hooks/sidebar/standard' => ''); }
public function __construct() { parent::__construct(); if (!IS_CLI) { show_404(); } $this->config->load('less_compile', false, true); $this->items = !empty($this->config->config['less_compile']) && is_array($this->config->config['less_compile']) ? $this->config->config['less_compile'] : array(); $this->load->parser('less'); $this->load->helper('file'); }
public function __construct() { if (!$this->input->is_ajax_request()) { exit(EXIT_ERROR); } parent::__construct(); $this->load->helper('asset'); // Code for the real authentication system. //$this->load // ->model('current_user') //; }
/** * Inicjalizacja kontrolera */ public function init() { $this->setLayoutDir('mint'); $this->setTemplate('master'); // Inicjalizacja moduły autentykacji $this->oAuth = $this->getModule('auth'); // Ustawianie danych w widoku $oView = $this->getTemplate(); $oView->sPageTitle = 'blog chodorowski.co'; $oView->oMenu = $this->getMenuView(); parent::init(); }
public function __construct() { parent::__construct(); $this->load->model('current_user'); $this->load->library('template'); $this->template->set_layout('auth', config_item('current_theme_path')); $default_title = config_item('default_title'); if ($default_title != '') { $this->template->title($default_title); } $this->template->set_metadata('robots', 'noindex,nofollow,noarchive'); $this->template->prepend_title('Auth Manager'); }
public function preDispatch() { parent::preDispatch(); $aQueries = $this->oLithium->getDatabase()->getQueryHistory(); if (!IN_PRODUCTION && !empty($aQueries)) { foreach ($aQueries as $sQuery) { error_log($sQuery); } if (!empty($this->mTemplate)) { $this->mTemplate->debugInfo = '<pre>' . implode("\n", $aQueries) . '</pre>'; } } }
public function __construct() { parent::__construct(); $this->load->config('custom_user_photo'); $this->base_path = (string) $this->config->item('custom_user_photo_base_path'); if ($this->base_path == '') { $this->base_path = PLATFORM_UPLOAD_PATH . 'userphotos/'; } $this->default_file = 'default-person.png'; $this->default_base_path = DEFAULTFCPATH . 'assets/img/lib/'; $this->blank_file = 'blank.png'; $this->blank_base_path = DEFAULTFCPATH . 'assets/img/lib/'; }
protected function postDispatch() { $cache_flag = Model_Numista_Logger::CACHE_NOT; if ($this->data->isForceCache()) { $cache_flag = Model_Numista_Logger::CACHE_FORCE; } else { if ($this->data->isDataFromCache()) { $cache_flag = Model_Numista_Logger::CACHE_YES; } } Model_Numista_Logger::logMethodCall($this->is_error, $cache_flag); parent::postDispatch(); }
public function __construct() { parent::__construct(); $this->load->model('current_user'); $this->load->library('template'); $this->template->set_layout('admin', config_item('current_theme_path')); $default_title = config_item('default_title'); $default_title = 'Application Starter 4 Public Edition'; // if ($default_title != '') { $this->template->title($default_title); } $this->template->set_metadata('robots', 'noindex,nofollow,noarchive'); $this->template->prepend_title('Site Administrator'); }
public function __construct() { parent::__construct(); $this->load->library('template'); $this->template->set_layout('site_example'); //$default_title = config_item('default_title'); $default_title = 'Application Starter 4 Public Edition'; // $default_description = config_item('default_description'); $default_keywords = config_item('default_keywords'); if ($default_title != '') { $this->template->title($default_title); } if ($default_description != '') { $this->template->set_metadata('description', $default_description); } if ($default_keywords != '') { $this->template->set_metadata('keywords', $default_keywords); } }
public function __construct() { parent::__construct(); $this->load->model('current_user'); $this->load->library('template'); $this->template->set_layout('site'); //$default_title = config_item('default_title'); $default_title = 'curatigo'; // $default_description = config_item('default_description'); $default_keywords = config_item('default_keywords'); if ($default_title != '') { $this->template->title($default_title); } if ($default_description != '') { $this->template->set_metadata('description', $default_description); } if ($default_keywords != '') { $this->template->set_metadata('keywords', $default_keywords); } }
public function __construct() { parent::__construct(); $this->load->library('settings')->helper('language')->helper('url')->helper('asset')->language('ui')->language('contact')->language('mailer')->library('kcaptcha', null, 'captcha')->language('captcha'); $this->config->load('contact_page', FALSE, TRUE); }
public function __construct() { parent::__construct(); $this->class = 'home'; $this->check_session(); }
public function __construct() { parent::__construct(); $this->load->library('kcaptcha', null, 'captcha'); }
/** * Constructor for the REST API * * @access public * * @param string $config Configuration filename minus the file extension * e.g: my_rest.php is passed as 'my_rest' */ public function __construct($config = 'rest') { parent::__construct(); // Disable XML Entity (security vulnerability) libxml_disable_entity_loader(TRUE); // Removed by Ivan Tcholakov, 28-JUN-2015. // Check to see if PHP is equal to or greater than 5.4.x //if (is_php('5.4') === FALSE) //{ // // CodeIgniter 3 is recommended for v5.4 or above // exit('Using PHP v' . PHP_VERSION . ', though PHP v5.4 or greater is required'); //} // // Check to see if this is CI 3.x // Modified by Ivan Tcholakov, 30-MAY-2015. //if (explode('.', CI_VERSION, 2)[0] < 3) if ((int) CI_VERSION < 3) { exit('REST Server requires CodeIgniter 3.x'); } // Set the default value of global xss filtering. Same approach as CodeIgniter 3 $this->_enable_xss = config_item('global_xss_filtering') === TRUE; // Start the timer for how long the request takes $this->_start_rtime = microtime(TRUE); // Load the rest.php configuration file $this->load->config($config); // At present the library is bundled with REST_Controller 2.5+, but will eventually be part of CodeIgniter (no citation) $this->load->library('format'); // Initialise the response, request and rest objects $this->request = new stdClass(); $this->response = new stdClass(); $this->rest = new stdClass(); $this->_zlib_oc = @ini_get('zlib.output_compression'); // Check to see if the current IP address is blacklisted if ($this->config->item('rest_ip_blacklist_enabled') === TRUE) { $this->_check_blacklist_auth(); } // Determine whether the connection is HTTPS $this->request->ssl = is_https(); // How is this request being made? GET, POST, PATCH, DELETE, INSERT, PUT, HEAD or OPTIONS $this->request->method = $this->_detect_method(); // Create an argument container if it doesn't exist e.g. _get_args if (!isset($this->{'_' . $this->request->method . '_args'})) { $this->{'_' . $this->request->method . '_args'} = array(); } // Set up the GET variables $this->_get_args = array_merge($this->_get_args, $this->uri->ruri_to_assoc()); // Try to find a format for the request (means we have a request body) $this->request->format = $this->_detect_input_format(); // Not all methods have a body attached with them $this->request->body = NULL; $this->{'_parse_' . $this->request->method}(); // Now we know all about our request, let's try and parse the body if it exists if ($this->request->format && $this->request->body) { $this->request->body = $this->format->factory($this->request->body, $this->request->format)->to_array(); // Assign payload arguments to proper method container $this->{'_' . $this->request->method . '_args'} = $this->request->body; } // Merge both for one mega-args variable $this->_args = array_merge($this->_get_args, $this->_options_args, $this->_patch_args, $this->_head_args, $this->_put_args, $this->_post_args, $this->_delete_args, $this->{'_' . $this->request->method . '_args'}); // Which format should the data be returned in? $this->response->format = $this->_detect_output_format(); // Which format should the data be returned in? $this->response->lang = $this->_detect_lang(); // Extend this function to apply additional checking early on in the process $this->early_checks(); // Load DB if its enabled if (config_item('rest_database_group') && (config_item('rest_enable_keys') || config_item('rest_enable_logging'))) { $this->rest->db = $this->load->database(config_item('rest_database_group'), TRUE); } elseif (property_exists($this, 'db')) { $this->rest->db = $this->db; } // Check if there is a specific auth type for the current class/method // _auth_override_check could exit so we need $this->rest->db initialized before $this->auth_override = $this->_auth_override_check(); // Checking for keys? GET TO WorK! // Skip keys test for $config['auth_override_class_method']['class'['method'] = 'none' if (config_item('rest_enable_keys') && $this->auth_override !== TRUE) { $this->_allow = $this->_detect_api_key(); } // Only allow ajax requests if ($this->input->is_ajax_request() === FALSE && config_item('rest_ajax_only')) { // Display an error response $this->response(array(config_item('rest_status_field_name') => FALSE, config_item('rest_message_field_name') => 'Only AJAX requests are acceptable'), 406); // Set status to 406 NOT ACCEPTABLE } // When there is no specific override for the current class/method, use the default auth value set in the config if ($this->auth_override === FALSE && !(config_item('rest_enable_keys') && $this->_allow === TRUE)) { $rest_auth = strtolower($this->config->item('rest_auth')); switch ($rest_auth) { case 'basic': $this->_prepare_basic_auth(); break; case 'digest': $this->_prepare_digest_auth(); break; case 'session': $this->_check_php_session(); break; } if ($this->config->item('rest_ip_whitelist_enabled') === TRUE) { $this->_check_whitelist_auth(); } } }
public function __construct() { parent::__construct(); $this->template->page_title = __('Settings'); }
public function __construct() { parent::__construct(); $this->load->helper('file'); }
public function init() { parent::init(); $this->mTemplate->aResources = []; }
public function __construct() { parent::__construct(); $this->load->library('settings')->helper('language')->helper('url')->helper('asset')->language('contact'); }
public function __construct() { parent::__construct(); $this->load->library('settings')->helper('email')->language('mailer'); }