示例#1
0
 public function __construct()
 {
     parent::__construct();
     if (!isset($_SESSION["role"]) || !$_SESSION["role"] != "owner") {
         $this->add_sys_msg("You need to be an owner to access that page.");
         $this->view->render("index/index");
         exit;
     }
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     $logged = session::get("isLoggedIn");
     if ($logged == false) {
         session::destroy();
         echo $logged;
         header('location: ' . $this->base_url . '/index/error/You tried to access a page without logging in.');
         echo "fail";
         exit;
     }
     $this->view->js = array(VIEWS_DIR . 'dashboard/js/default.js');
 }