Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     $this->_validate_user('settings');
     $crumbs = array(lang('section_settings'));
     $this->fuel->admin->set_titlebar($crumbs);
 }
Esempio n. 2
0
 function __construct()
 {
     parent::__construct();
     $this->config->module_load('blog', 'blog');
     $this->_validate_user('blog/settings');
     //$this->view_location = 'blog';
 }
Esempio n. 3
0
 function __construct()
 {
     parent::__construct(FALSE);
     $this->load->module_config(USER_GUIDE_FOLDER, 'user_guide');
     if ($this->config->item('user_guide_authenticate')) {
         $this->_check_login();
     }
 }
Esempio n. 4
0
 function __construct()
 {
     // don't validate yet... we check that you are a super admin later
     parent::__construct(FALSE);
     if (is_environment('production')) {
         exit('Cannot execute in production environment');
     }
 }
 function __construct()
 {
     parent::__construct(FALSE);
     if ($this->fuel->user_guide->config('authenticate')) {
         $this->_validate_user('tools/user_guide');
     }
     $this->fuel->cache->set_cache_path($this->fuel->user_guide->config('cache_path'));
 }
Esempio n. 6
0
 function __construct()
 {
     parent::__construct();
     $this->load->config('validate');
     $this->load->language('validate');
     $this->js_controller_params['module'] = 'tools';
     $this->_validate_user('tools/validate');
 }
Esempio n. 7
0
 function __construct()
 {
     parent::__construct();
     // must load first
     $this->load->library('unit_test');
     $this->load->module_language(TESTER_FOLDER, 'tester');
     $this->_validate_user('tools/tester');
 }
Esempio n. 8
0
 function __construct()
 {
     parent::__construct();
     $this->_validate_user('contact');
     $this->load->module_model(CONTACT_FOLDER, 'contact_manage_model');
     $this->load->helper('ajax');
     $this->load->library('pagination');
     $this->load->library('set_page');
     $this->load->library('comm');
 }
 function __construct()
 {
     parent::__construct();
     $this->config->load('seo');
     $this->js_controller_params['module'] = 'seo';
     $this->load->module_language(SEO_FOLDER, 'seo', $this->config->item('language'));
     if ($this->config->item('dev_password', 'fuel')) {
         add_error(lang('error_seo_dev_password'));
     }
 }
Esempio n. 10
0
 function __construct()
 {
     parent::__construct();
     $this->_validate_user('news/manage');
     $this->load->module_model(NEWS_FOLDER, 'news_manage_model');
     $this->load->module_model(CODEKIND_FOLDER, 'codekind_manage_model');
     $this->load->helper('ajax');
     $this->load->library('pagination');
     $this->load->library('set_page');
     $this->load->library('session');
 }
Esempio n. 11
0
 function __construct()
 {
     parent::__construct();
     $this->_validate_user('event/manage');
     $this->load->module_model(EVENT_FOLDER, 'event_manage_model');
     $this->load->module_model(FUEL_FOLDER, 'fuel_users_model');
     $this->load->helper('ajax');
     $this->load->library('pagination');
     $this->load->library('set_page');
     $this->load->library('session');
     $this->load->library('comm');
 }
Esempio n. 12
0
 public function __construct()
 {
     $validate = (php_sapi_name() == 'cli' or defined('STDIN')) ? FALSE : TRUE;
     parent::__construct($validate);
     // must be in dev mode to install modules
     if (!is_dev_mode()) {
         show_error(lang('error_not_in_dev_mode'));
     }
     // validate user has permission
     if ($validate) {
         $this->_validate_user('installer');
     }
 }
Esempio n. 13
0
 public function __construct()
 {
     // don't validate initially because we need to handle it a little different since we can use web hooks
     parent::__construct(FALSE);
     $remote_ips = $this->fuel->config('webhook_remote_ip');
     $is_web_hook = $this->fuel->auth->check_valid_ip($remote_ips);
     // check if it is CLI or a web hook otherwise we need to validate
     $validate = (php_sapi_name() == 'cli' or defined('STDIN') or $is_web_hook) ? FALSE : TRUE;
     // validate user has permission
     if ($validate) {
         $this->fuel->admin->check_login();
         $this->_validate_user('migrate');
     }
 }
 function __construct()
 {
     parent::__construct();
     $this->load->helper('ajax');
     $this->load->model('Gallery_model');
     $this->load->library('session');
     //require_once(APPPATH.'/libraries/phpfire/FirePHP.class.php');
     //$this->firephp = FirePHP::getInstance(true);
     //$this->firephp->log('FirePHP Loaded');
     $this->page_title = "Gallery Manager - ";
     $this->gallery_path = $this->fuel->gallerymanager->config('path');
     $this->nav_path = $this->fuel->gallerymanager->config('nav_path');
     $this->nav_title = $this->fuel->gallerymanager->config('nav_title');
     $this->vars['nav_selected'] = $this->nav_path;
 }
Esempio n. 15
0
 public function __construct()
 {
     $validate = (php_sapi_name() == 'cli' or defined('STDIN')) ? FALSE : TRUE;
     parent::__construct($validate);
     // must be in dev mode to generate
     if (!is_dev_mode()) {
         show_error(lang('error_not_in_dev_mode'));
     }
     // validate user has permission
     if ($validate) {
         $this->_validate_user('generate');
     }
     $this->load->helper('file');
     $this->load->library('parser');
 }
Esempio n. 16
0
 function __construct()
 {
     parent::__construct();
     $this->load->config('validate');
     $this->load->language('validate');
     $this->js_controller_params['module'] = 'tools';
     // get localized js
     $js_localized = json_lang('validate/validate_js', FALSE);
     $this->_load_js_localized($js_localized);
     $this->_validate_user('tools/validate');
     // set pages input to blank if it is default value
     if (!empty($_POST['pages_input'])) {
         if ($_POST['pages_input'] == lang('validate_pages_input')) {
             $_POST['pages_input'] = FALSE;
         }
     }
 }
 function __construct()
 {
     parent::__construct();
     $this->config->module_load('newsletter', 'newsletter');
     $this->load->module_model(NEWSLETTER_FOLDER, 'newsletter_send_model');
     if (isset($_POST['cancel'])) {
         $this->_cancel();
     }
     if (!empty($_POST['select_draft'])) {
         $this->_data_sess = array('draft' => $_POST['select_draft']['draft'], 'previous_step' => $_POST['select_draft']['previous_step']);
         $this->session->set_userdata('newsletter_send', $this->_data_sess);
     } elseif (!empty($_POST['preview'])) {
         $this->_data_sess = $this->session->userdata('newsletter_send');
         if (isset($_POST[lang('module_newsletter_send')])) {
             $this->_send();
         }
     }
     $this->_data_sess = $this->session->userdata('newsletter_send');
 }
Esempio n. 18
0
 public function __construct()
 {
     parent::__construct();
     $this->js_controller = 'fuel.controller.DashboardController';
 }
Esempio n. 19
0
 public function __construct()
 {
     parent::__construct(FALSE);
     $this->js_controller = 'fuel.controller.ManageController';
 }
Esempio n. 20
0
 function __construct($validate = TRUE)
 {
     parent::__construct($validate);
     $this->load->module_model(FUEL_FOLDER, 'fuel_archives_model');
     if (empty($this->module)) {
         $this->module = fuel_uri_segment(1);
     }
     if (empty($this->module)) {
         show_error(lang('cannot_determine_module'));
     }
     $params = array();
     if ($this->fuel->modules->exists($this->module, FALSE)) {
         $this->module_obj = $this->fuel->modules->get($this->module, FALSE);
         $params = $this->module_obj->info();
     } else {
         if ($this->fuel->modules->exists($this->module . '_' . fuel_uri_segment(2), FALSE)) {
             // if it is a module with multiple controllers, then we'll check first and second FUEL segment with an underscore'
             $this->module = $this->module . '_' . fuel_uri_segment(2);
             if ($this->fuel->modules->exists($this->module, FALSE)) {
                 $this->module_obj = $this->fuel->modules->get($this->module, FALSE);
                 $params = $this->module_obj->info();
             }
         } else {
             if ($this->fuel->modules->exists(fuel_uri_segment(2), FALSE)) {
                 $this->module = fuel_uri_segment(2);
                 $this->module_obj = $this->fuel->modules->get($this->module, FALSE);
                 if ($this->module and $this->module_obj) {
                     $mod_name = $this->module_obj->name();
                 }
                 if (empty($mod_name)) {
                     show_error(lang('error_missing_module', fuel_uri_segment(1)));
                 }
                 unset($mod_name);
                 $params = $this->module_obj->info();
             }
         }
     }
     // stop here if the module is disabled
     if (empty($params) or $params['disabled'] === TRUE) {
         show_404();
     }
     foreach ($params as $key => $val) {
         $this->{$key} = $val;
     }
     // load any configuration
     if (!empty($this->configuration)) {
         if (is_array($this->configuration)) {
             $config_module = key($this->configuration);
             $config_file = current($this->configuration);
             $this->config->module_load($config_module, $config_file);
         } else {
             $this->config->load($this->configuration);
         }
     }
     // load any language
     if (!empty($this->language)) {
         if (is_array($this->language)) {
             $lang_module = key($this->language);
             $lang_file = current($this->language);
             // now check to see if we need to load the language file or not...
             // we load the main language file automatically with the Fuel_base_controller.php
             $this->load->module_language($lang_module, $lang_file, $this->fuel->auth->user_lang());
         } else {
             $this->load->language($this->language);
         }
     }
     // load the model
     if (!empty($this->model_location)) {
         $this->load->module_model($this->model_location, $this->model_name);
     } else {
         $this->load->model($this->model_name);
     }
     // get the model name
     $model_parts = explode('/', $this->model_name);
     $model = end($model_parts);
     // set the module_uri
     if (empty($this->module_uri)) {
         $this->module_uri = $this->module;
     }
     $this->js_controller_params['module'] = $this->module_uri;
     if (!empty($model)) {
         $this->model =& $this->{$model};
     } else {
         show_error(lang('incorrect_route_to_module'));
     }
     // global variables
     $vars = array();
     if (!empty($params['js'])) {
         if (is_string($params['js'])) {
             $params['js'] = preg_split("/,\\s*/", $params['js']);
         }
         $vars['js'] = $params['js'];
     }
     if (!empty($this->nav_selected)) {
         $vars['nav_selected'] = $this->nav_selected;
     }
     $this->load->vars($vars);
     $this->fuel->admin->load_js_localized($params['js_localized']);
     if (!empty($this->permission) and $validate) {
         $this->_validate_user($this->permission);
     }
 }
Esempio n. 21
0
 public function __construct()
 {
     parent::__construct();
 }
Esempio n. 22
0
 function __construct()
 {
     parent::__construct();
     $this->load->library('fuel_auth');
 }
Esempio n. 23
0
 function __construct()
 {
     parent::__construct();
     $this->js_controller = 'DashboardController';
 }
Esempio n. 24
0
 public function __construct()
 {
     parent::__construct();
     $this->_validate_user('site_docs');
 }
Esempio n. 25
0
 function __construct()
 {
     parent::__construct();
     $this->load->module_model(FUEL_FOLDER, 'users_model');
 }
Esempio n. 26
0
 function __construct()
 {
     parent::__construct();
     $this->config->load('backup');
     $this->load->language('backup');
 }
Esempio n. 27
0
 function __construct()
 {
     parent::__construct();
     $this->load->module_language(TESTER_FOLDER, 'tester');
     $this->_validate_user('tools/tester');
 }
Esempio n. 28
0
 function __construct()
 {
     parent::__construct();
     $this->load->module_model(FUEL_FOLDER, 'archives_model');
     $this->module = fuel_uri_segment(1);
     if (empty($this->module)) {
         show_error(lang('cannot_determine_module'));
     }
     $params = $this->fuel_modules->info($this->module);
     if (empty($params)) {
         // if it is a module with multiple controllers, then we'll check first and second FUEL segment with a hyphen'
         $this->module = $this->module . '_' . fuel_uri_segment(2);
         $params = $this->fuel_modules->info($this->module);
         if ($params === FALSE) {
             $params = array();
         }
     }
     foreach ($params as $key => $val) {
         $this->{$key} = $val;
     }
     // load any configuration
     if (!empty($this->configuration)) {
         if (is_array($this->configuration)) {
             $config_module = key($this->configuration);
             $config_file = current($this->configuration);
             $this->config->module_load($config_module, $config_file);
         } else {
             $this->config->load($this->configuration);
         }
     }
     // load any language
     if (!empty($this->language)) {
         if (is_array($this->language)) {
             $lang_module = key($this->language);
             $lang_file = current($this->language);
             $this->load->module_language($lang_module, $lang_file);
         } else {
             $this->config->load($this->language);
         }
     }
     // load the model
     if (!empty($this->model_location)) {
         $this->load->module_model($this->model_location, $this->model_name);
     } else {
         $this->load->model($this->model_name);
     }
     if (empty($this->display_field)) {
         $model = $this->model_name;
         $fields = $this->{$model}->fields();
         // loop through the fields and find the first column that doesn't have id or _id at the end of it
         for ($i = 1; $i < count($fields); $i++) {
             if (substr($fields[$i], -3) != '_id') {
                 $this->display_field = $fields[$i];
                 break;
             }
         }
         if (empty($this->display_field)) {
             $this->display_field = $fields[1];
         }
         // usually the second field is the display_field... first is the id
     }
     // set the module_uri
     if (empty($this->module_uri)) {
         $this->module_uri = $this->module;
     }
     $this->js_controller_params['module'] = $this->module_uri;
     //
     $model = $this->model_name;
     if (!empty($model)) {
         $this->model =& $this->{$model};
     } else {
         show_error(lang('incorrect_route_to_module'));
     }
     // global variables
     $vars = array();
     if (!empty($params['js'])) {
         $vars['js'] = $params['js'];
     }
     if (!empty($this->nav_selected)) {
         $vars['nav_selected'] = $this->nav_selected;
     }
     $this->load->vars($vars);
     if (!empty($this->permission)) {
         $this->_validate_user($this->permission);
     }
 }
Esempio n. 29
0
 function __construct()
 {
     parent::__construct();
     $this->js_controller = 'ManageController';
 }
Esempio n. 30
0
 function __construct()
 {
     parent::__construct();
     $this->config->module_load('blog', 'blog');
     $this->view_location = 'blog';
 }