Rev 12694 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?phpif (!defined('BASEPATH'))exit('No direct script access allowed');Class MY_Controller extends CI_Controller {function __construct() {// Call the CI_controller constructorparent::__construct();//load everything needed/*$currentclient =$this -> config -> item('current_client');if(!isset($currentclient)){$currentclient = $this -> session -> userdata('current_client');}*/$currentclient = $this -> config -> item('current_client');$this -> load -> config($currentclient);$model = $currentclient.'_model';$this->load->model($model);//print_r($_SERVER['SERVER_ADDR']);}function __fosauthorization() {//sample session storage.. later i will imporve security for login$check =$this->session->userdata('fosauthorized');if(isset($check) and !empty($check) and $check['authority']='success') {//redirect(base_url().'fos/dashboard');} else {redirect(base_url().'fos/login');}}}