예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->_validate_user('settings');
     $crumbs = array(lang('section_settings'));
     $this->fuel->admin->set_titlebar($crumbs);
 }
예제 #2
0
파일: settings.php 프로젝트: pwhsueh/voting
 function __construct()
 {
     parent::__construct();
     $this->config->module_load('blog', 'blog');
     $this->_validate_user('blog/settings');
     //$this->view_location = 'blog';
 }
예제 #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();
     }
 }
예제 #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'));
 }
예제 #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');
 }
예제 #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');
 }
예제 #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'));
     }
 }
예제 #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');
 }
예제 #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');
 }
예제 #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');
     }
 }
예제 #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;
 }
예제 #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');
 }
예제 #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;
         }
     }
 }
예제 #17
0
 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');
 }
예제 #18
0
 public function __construct()
 {
     parent::__construct();
     $this->js_controller = 'fuel.controller.DashboardController';
 }
예제 #19
0
파일: manage.php 프로젝트: pwhsueh/voting
 public function __construct()
 {
     parent::__construct(FALSE);
     $this->js_controller = 'fuel.controller.ManageController';
 }
예제 #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);
     }
 }
예제 #21
0
 public function __construct()
 {
     parent::__construct();
 }
예제 #22
0
 function __construct()
 {
     parent::__construct();
     $this->load->library('fuel_auth');
 }
예제 #23
0
 function __construct()
 {
     parent::__construct();
     $this->js_controller = 'DashboardController';
 }
예제 #24
0
 public function __construct()
 {
     parent::__construct();
     $this->_validate_user('site_docs');
 }
예제 #25
0
 function __construct()
 {
     parent::__construct();
     $this->load->module_model(FUEL_FOLDER, 'users_model');
 }
예제 #26
0
 function __construct()
 {
     parent::__construct();
     $this->config->load('backup');
     $this->load->language('backup');
 }
예제 #27
0
 function __construct()
 {
     parent::__construct();
     $this->load->module_language(TESTER_FOLDER, 'tester');
     $this->_validate_user('tools/tester');
 }
예제 #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);
     }
 }
예제 #29
0
 function __construct()
 {
     parent::__construct();
     $this->js_controller = 'ManageController';
 }
예제 #30
0
 function __construct()
 {
     parent::__construct();
     $this->config->module_load('blog', 'blog');
     $this->view_location = 'blog';
 }