function __construct() { parent::__construct(); if ($user = session('user')) { $this->redirect('/labs/' . $user['labId'] . '/admin'); } }
function __construct() { parent::__construct(); if (empty($_GET['labName'])) { $this->error(); } else { if ($this->isExist($_GET['labName'])) { $this->doCookie($this->labId); $this->labModel = new LabModel($this->labId); } else { $this->error(); } } }