public function __construct($request, $response) { ignore_user_abort(TRUE); parent::__construct($request, $response); self::$db_prefix = Database::instance('default')->table_prefix(); self::$db_charset = Core::config('database.default.charset'); }
public function before($template = NULL) { parent::before(); Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Stats'))->set_url(Route::url('oc-panel', array('controller' => 'stats')) . '?' . http_build_query(['rel' => ''] + Request::current()->query()))); $this->template->styles = array('css/datepicker.css' => 'screen'); $this->template->scripts['footer'] = array('js/bootstrap-datepicker.js', 'js/chart.min.js', 'js/chart.js-php.js', 'js/oc-panel/stats/dashboard.js'); }
public function __construct() { parent::__construct(); $this->userrepository = new UserRepository(); $this->generaluserrepository = new GeneralUserRepository(); $this->adminrepository = new AdminRepository(); }
public function __construct() { parent::__construct(); $this->fundrepository = new FundRepository(); $this->payrepository = new PayRepository(); $this->adminrepository = new AdminRepository(); }
function __construct() { parent::__construct(); if ($this->ion_auth->is_admin() === FALSE) { redirect('/'); } }
public function __construct() { parent::__construct(); $this->userrepository = new UserRepository(); $this->adminrepository = new AdminRepository(); $this->organizationrepository = new OrganizationRepository(); }
function __construct() { parent::__construct(); if (!$this->User_model->has_relation_access(element('loginname', $this->session->userdata('user')))) { redirect(site_url('proj'), 'refresh'); } }
public function __construct() { parent::__construct(); $this->userrepository = new UserRepository(); $this->welfarerepository = new WelfareRepository(); $this->adminrepository = new AdminRepository(); }
function __construct() { parent::__construct(); if (!$this->ion_auth->in_group('admin')) { $this->postal->add('You are not allowed to visit the Users page', 'error'); redirect('dashboard'); } }
public function before($template = NULL) { parent::before(); Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Settings'))->set_url(Route::url('oc-panel', array('controller' => 'settings', 'action' => 'general')))); $this->template->styles = array('css/pnotify.custom.min.css' => 'screen'); $this->template->scripts['footer'][] = 'js/jquery.validate.min.js'; $this->template->scripts['footer'][] = 'js/pnotify.custom.min.js'; $this->template->scripts['footer'][] = '/js/oc-panel/settings.js'; }
function __construct() { parent::__construct(); $this->load->model('opportunity_source_model'); if (!$this->ion_auth->in_group('admin')) { $this->postal->add('You are not allowed to visit the opportunity sources page', 'error'); redirect('dashboard'); } }
function __construct() { parent::__construct(); $this->load->model('contact_type_model'); if (!$this->ion_auth->in_group('admin')) { $this->postal->add('You are not allowed to visit the contact types page', 'error'); redirect('dashboard'); } }
public function __construct() { parent::__construct(); $this->load->library('parser'); $this->parser->set_theme('default'); $this->data = array(); $this->data['title'] = ''; $this->data['keyword'] = ''; $this->data['description'] = ''; }
function __construct() { parent::__construct(false); if ($this->login->is_login() === true) { $redurl = $this->input->get('redurl', true); if ($redurl != '') { redirect($redurl, 'refresh'); } redirect(site_url('tsmain'), 'refresh'); } }
function __construct() { parent::__construct(); if (!$this->ion_auth->in_group('admin')) { $this->postal->add('You are not allowed to visit the MASTER page', 'error'); redirect('admin'); } $this->load->model('website_model'); $this->load->library('form_validation'); $this->load->helper('form'); }
public function __construct() { // Parent __construct parent::__construct(); // Load Settings $this->settings_model->load('blog'); // Load Model $this->load->model('backend/bloger_model'); // Load Helper $this->load->helper('text'); $this->load->helper('pagination'); }
function __construct() { parent::__construct(); $this->load->model('opportunity_model'); $this->load->model('conversation_model'); $this->load->model('contact_model'); /* if(!$this->ion_auth->in_group('admin')) { $this->postal->add('You are not allowed to visit the Users page','error'); redirect('dashboard'); }*/ }
/** * * Contruct that checks you are loged in before nothing else happens! */ function __construct(Request $request, Response $response) { parent::__construct($request, $response); //we check if that action can be done, if not redirected to the index if (!$this->allowed_crud_action()) { $url = Route::get('oc-panel')->uri(array('controller' => $this->request->controller(), 'action' => 'index')); $this->request->redirect($url); } //url used in the breadcrumb $url_bread = Route::url('oc-panel', array('controller' => $this->request->controller())); Breadcrumbs::add(Breadcrumb::factory()->set_title(ucfirst(__($this->_orm_model)))->set_url($url_bread)); //action Breadcrumbs::add(Breadcrumb::factory()->set_title(ucfirst(__($this->request->action())))); }
/** * * Contruct that checks you are loged in before nothing else happens! */ function __construct(Request $request, Response $response) { parent::__construct($request, $response); //we check if that action can be done, if not redirected to the index if (!$this->allowed_crud_action()) { $url = Route::get('oc-panel')->uri(array('controller' => $this->request->controller(), 'action' => 'index')); $this->redirect($url); } $element = ORM::Factory($this->_orm_model); //in case we did not specify what to show if (empty($this->_index_fields)) { $this->_index_fields = array_keys($element->list_columns()); } //we need the PK always to work on the grid... if (!in_array($element->primary_key(), $this->_index_fields)) { array_unshift($this->_index_fields, $element->primary_key()); } //url used in the breadcrumb $url_bread = Route::url('oc-panel', array('controller' => $this->request->controller())); Breadcrumbs::add(Breadcrumb::factory()->set_title(Text::ucfirst(__($this->_orm_model)))->set_url($url_bread)); //action Breadcrumbs::add(Breadcrumb::factory()->set_title(Text::ucfirst(__($this->request->action())))); }
function __construct() { parent::Auth_Controller(); }
/** * Actually delete an account. */ public function action_deleteaccount2() { global $user_info, $context, $cur_profile, $user_profile, $modSettings; // Try get more time... @set_time_limit(600); // @todo Add a way to delete pms as well? if (!$context['user']['is_owner']) { isAllowedTo('profile_remove_any'); } elseif (!allowedTo('profile_remove_any')) { isAllowedTo('profile_remove_own'); } checkSession(); $memID = currentMemberID(); // Check we got here as we should have! if ($cur_profile != $user_profile[$memID]) { fatal_lang_error('no_access', false); } $old_profile =& $cur_profile; // This file is needed for our utility functions. require_once SUBSDIR . '/Members.subs.php'; // Too often, people remove/delete their own only administrative account. if (in_array(1, explode(',', $old_profile['additional_groups'])) || $old_profile['id_group'] == 1) { // Are you allowed to administrate the forum, as they are? isAllowedTo('admin_forum'); $another = isAnotherAdmin($memID); if (empty($another)) { fatal_lang_error('at_least_one_admin', 'critical'); } } // Do you have permission to delete others profiles, or is that your profile you wanna delete? if ($memID != $user_info['id']) { isAllowedTo('profile_remove_any'); // Now, have you been naughty and need your posts deleting? // @todo Should this check board permissions? if ($_POST['remove_type'] != 'none' && allowedTo('moderate_forum')) { // Include subs/Topic.subs.php - essential for this type of work! require_once SUBSDIR . '/Topic.subs.php'; require_once SUBSDIR . '/Messages.subs.php'; // First off we delete any topics the member has started - if they wanted topics being done. if ($_POST['remove_type'] == 'topics') { // Fetch all topics started by this user. $topicIDs = topicsStartedBy($memID); // Actually remove the topics. // @todo This needs to check permissions, but we'll let it slide for now because of moderate_forum already being had. removeTopics($topicIDs); } // Now delete the remaining messages. removeNonTopicMessages($memID); } // Only delete this poor member's account if they are actually being booted out of camp. if (isset($_POST['deleteAccount'])) { deleteMembers($memID); } } elseif (!empty($modSettings['approveAccountDeletion']) && !allowedTo('moderate_forum')) { // Setup their account for deletion ;) updateMemberData($memID, array('is_activated' => 4)); // Another account needs approval... updateSettings(array('unapprovedMembers' => true), true); } else { deleteMembers($memID); require_once CONTROLLERDIR . '/Auth.controller.php'; $controller = new Auth_Controller(); $controller->action_logout(true); redirectexit(); } }
/** * Class constructor */ public function __construct() { parent::__construct(); }
function __construct() { parent::__construct(); //users_model,载入之后,可用使用$this->users_model来操作 $this->load->model('users_model'); }
// Load BadBehavior functions loadBadBehavior(); // Load the current or SSI theme. (just use $ssi_theme = id_theme;) loadTheme(isset($ssi_theme) ? (int) $ssi_theme : 0); // @todo: probably not the best place, but somewhere it should be set... if (!headers_sent()) { header('Content-Type: text/html; charset=UTF-8'); } // Take care of any banning that needs to be done. if (isset($_REQUEST['ssi_ban']) || isset($ssi_ban) && $ssi_ban === true) { is_not_banned(); } // Do we allow guests in here? if (empty($ssi_guest_access) && empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && basename($_SERVER['PHP_SELF']) != 'SSI.php') { require_once CONTROLLERDIR . '/Auth.controller.php'; $controller = new Auth_Controller(); $controller->action_kickguest(); obExit(null, true); } // Load the stuff like the menu bar, etc. if (isset($ssi_layers)) { $template_layers = Template_Layers::getInstance(); $template_layers->removeAll(); foreach ($ssi_layers as $layer) { $template_layers->addBegin($layer); } template_header(); } else { setupThemeContext(); } // We need to set up user agent, and make more checks on the request
function __construct() { parent::__construct(); $this->load->model('devices_model'); }
function __construct() { parent::__construct(); $this->load->model(array('users/m_groups')); }
public function __construct($request, $response) { parent::__construct($request, $response); Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Tools'))); }
public function __construct($request, $response) { parent::__construct($request, $response); Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Settings'))->set_url(Route::url('oc-panel', array('controller' => 'settings', 'action' => 'general')))); }
public function __construct($request, $response) { parent::__construct($request, $response); Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Custom Fields'))->set_url(Route::url('oc-panel', array('controller' => 'fields')))); }
function __construct() { parent::__construct(); $this->load->model(array('users/m_controller')); }