objAuth = new AuthController(); $this->objUser = new UserController(); $this->valid = $this->objAuth->getPermissions((isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '')); $this->menu = getPagesInMenu(); $this->cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : ''); $this->id = checkLegit($this->cook); $this->user = $this->objUser->getLoggedUser($this->id, $this->cook); } public function index () { $r = new Index($this->valid, $this->menu, $this->user); return $r->index(); } public function post ($slug) { $r = new Index($this->valid, $this->menu, $this->user); return $r->post($slug, $this->cook); } public function page ($slug) { $r = new Index($this->valid, $this->menu, $this->user); return $r->page($slug); } public function newComment (Request $rr) { $r = new Comment(); return $r->add($rr); } public function addContent ($bdl) { $r = new Content($this->valid, $this->menu, $this->user); return $r->add($bdl); } public function editContent ($bdl) { $r = new Content($this->valid, $this->menu, $this->user); return $r->edit($bdl); } public function delContent ($bdl) { $r = new Content($this->valid, $this->menu, $this->user); return $r->delete($bdl); } }