Example #1
0
 public function __construct()
 {
     $conf = new Config();
     $this->base_url = $conf->get('app.base_url');
     $this->_module = $conf->get('app.default_module');
     $this->_page = $conf->get('app.default_page');
     $this->_page = $conf->get('app.default_act');
     $this->_params = $conf->get('app.default_params');
     $conf->close();
 }
Example #2
0
 public function redirect($mode)
 {
     if (!self::$data) {
         $conf = new Config();
         $base_url = $conf->get('app.base_url');
         $conf->close();
         switch ($mode) {
             case 'login':
                 header('location:' . $base_url . '/login.php');
                 break;
             case 500:
                 echo 'You dont have access on this page !';
                 break;
         }
     }
 }