function __construct() { parent::__construct(); if (config_item('disable_api')) { die("The API has been disabled\n"); } }
public function __construct() { parent::__construct(); /*BEGIN ADMIN FUNCTIONS CODE*/ //ADMIN LOGOUT if (isset($_POST['submit_login'])) { $this->AdminLogin(); } //CHECK ADMIN LOGIN if (@basename($_SERVER['PHP_SELF']) != "login.php") { $this->CheckAdminLogin(); } //ADMIN LOGOUT if (isset($_GET['action']) && $_GET['action'] == "logout") { $this->AdminLogOut(); } //ADMIN FORGOT PASSWORD if (isset($_POST['submit_forgetpassword'])) { $this->AdminForgotPassword(); } //ADMIN PROFILE UPDATE if ($this->pagefilename == "admin.php") { $info_array = array("where" => "user_type='1' and user_id='1'"); $this->data = $this->GetSingleRecord("user_master", $info_array); } if (isset($_POST['submit_profile'])) { $this->AdminProfile(); } /*END ADMIN FUNCTIONS CODE*/ /*BEGIN SITE SETTING FUNCTION ASSIGN */ if (isset($_POST['submit_settings'])) { $this->UpdateSiteSettings(); } /*CODE SITE SETTING FUNCTION ASSIGN */ }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend $this->_setMainPage($this->main_page); }
public function __construct() { parent::__construct(); if (!$this->login_model->role("user")) { redirect(base_url("login")); } else { } }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend $this->load->model('md_ourteam'); $this->_setMainPage($this->main_page); }
public function __construct() { parent::__construct(); $this->setTable('EDB_SEMESTRES'); $this->setTableLang('EDB_SEMESTRES_LANG'); $this->setPk('SEM_NUM'); $this->setOrder('SEM_ORDRE'); }
public function __construct() { parent::__construct(); $this->setTable('EDB_PARCOURS_TYPE'); $this->setTableLang('EDB_PARCOURS_TYPE_LANG'); $this->setPk('PTY_NUM'); $this->setOrder('PTY_ORDRE'); }
public function __construct() { parent::__construct(); $this->setTable('EDB_SPECIALITES'); $this->setTableLang('EDB_SPECIALITES_LANG'); $this->setPk('SPE_NUM'); $this->setOrder('SPE_ORDRE'); }
/** * Cruise constructor. * * Sets the service name, response type and prepares * the api parameters. * * @param string $token */ public function __construct($token) { parent::__construct(); $this->token = $token; $this->responseType = $this->config->get("app.Cruise.response_type"); $this->apiUrl = $this->config->get("app.Cruise.url"); $this->apiParams = ['api_token' => $token, 'api_type' => $this->config->get("app.Cruise.response_type")]; }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend $this->load->model('md_message'); $this->load->library('session'); $this->_setMainPage($this->main_page); }
public function __construct() { parent::__construct(); // Your own constructor code //config page rend //$this->_setMainPage($this->main_page); $this->load->library('session'); $this->load->library('image_lib'); $this->load->helper('url'); }
function __construct() { parent::__construct(); if (config_item('disable_api')) { die("The API has been disabled\n"); } if (config_item('apikey') != $this->input->get('apikey')) { die("Invalid API key\n"); } }
public function __construct() { parent::__construct(); if (!$this->login_model->role("admin")) { $this->session->set_userdata(array("returnto" => current_url())); redirect(base_url("login")); } else { //get all components for admin sidebar $this->data['components'] = array(array("id" => "cp", "title" => "لوحة التحكم", "children" => array(array("title" => "لوحة التحكم", "link" => $this->data['cp']), array("title" => "رئيسية الموقع", "link" => base_url()), array("title" => "الاعدادات العامة", "link" => base_url("admin/settings")), array("title" => "تسجيل خروج", "link" => base_url("login/logout"))))); //get current page $this->data['cur_page'] = "cp"; } }
public function __construct() { parent::__construct(); $this->load->model("User"); $this->load->model("Post"); $this->load->model("Comment"); if (!$this->is_login() || $this->User->exists($this->current_user["user_id"]) == false) { if ($this->is_login()) { $this->session->set_flashdata("error_message", "Sorry, your account was removed! "); } else { $this->session->set_flashdata("error_message", "Please Login"); } $this->session->sess_destroy(); redirect(base_url('/')); } $this->load->view('partials/header', array('current_user' => $this->current_user)); // $this->output->enable_profiler(); }
/** * Конструктор создает объект со свойствами соответствующими таблице * юзеров и если юзер существует и имеет телефонные номера, то * сохраняет их в массив $this->phones */ function __construct($params = null) { parent::__construct($params); if ($this->is_exists()) { $phones = array(); $query = ' SELECT * FROM phones_tbl WHERE user_id=' . $this->id . ';'; $result = DB::query($query); if ($result->num_rows === 0) { return; } $phones = DB::fetch(); foreach ($phones as &$phone) { $phone = new Phone($phone); } $this->phones = $phones; } }
public function __construct($super) { parent::__construct($super); $this->controller = $super->core->getConfig()['site_config']['homecontroller']; $this->method = $super->core->getConfig()['site_config']['homemethod']; $url = $this->parseUrl(); if (file_exists('app/controllers/' . $url[0] . '.php')) { $this->controller = $url[0]; unset($url[0]); } require_once '/app/controllers/' . $this->controller . '.php'; $this->controller = new $this->controller($this->super); if ($this->controller->hasRestriction()) { $rows = $this->super->getAcl()->hasRoleArr($this->controller->restrictionRole); if (count($rows) == 0 || !$this->super->getAcl()->isLoggedin()) { // Geen toegang. Helpers::redirect('/harmstercms/'); } } // try and set the layout if (isset($this->controller->layout)) { $this->layout = $this->controller->layout; } if (isset($url[1])) { if (method_exists($this->controller, $url[1])) { $this->method = $url[1]; unset($url[1]); } } if (isset($this->controller->restrictMethods) && is_array($this->controller->restrictMethods)) { if (array_key_exists($this->method, $this->controller->restrictMethods)) { $restriction = $this->controller->restrictMethods[$this->method]; if (!$this->super->getAcl()->hasRole($restriction)) { var_dump($this->super->getAcl()->hasRole($restriction)); echo 'Hij komt hier'; //Helpers::redirect('/harmstercms/'); } } } $this->params = $url ? array_values($url) : []; $result = call_user_func_array([$this->controller, $this->method], $this->params); $this->result = $result; }
public function __construct(\Magento\Framework\Code\NameBuilder $nameBuilder, Context $context) { $this->nameBuilder = $nameBuilder; parent::__construct($context); }
public function __construct() { parent::__construct(); }
/** * construct * Задаем пароль и логи если есть * Создаёи обект Curl */ public function __construct() { parent::__construct(); $this->date = Date('Y-m-d'); }
public function __construct() { parent::__construct(); $this->setTable('edb_ues'); $this->setTableLang('edb_ues_lang'); }
public function __construct($id) { $id = (int) $id; parent::__construct("Sticker with id => {$id} not exist!"); }
public function __construct() { parent::__construct(); $this->Key = implode(array_map("chr", array(73, 105, 88, 88, 45, 69, 53, 101, 64, 88, 43, 33, 63, 48, 74, 43, 54, 45, 83, 74, 79, 50, 51, 63, 98, 66, 37, 83, 66, 73, 98, 83))); }
public function __construct() { parent::__construct(); $this->setTable('EDB_LANGUES'); $this->setPk('LANG_NUM'); }
public function __construct() { parent::__construct(); header("HTTP/1.0 404 Not Found"); }
public function __construct() { parent::__construct(); $this->load->model("User"); $this->load->view('partials/header', array('current_user' => $this->current_user)); }
function __construct($params) { parent::__construct($params); $this->formated_phone = $this->formate_phone(); }