setLocale($_COOKIE['language']); $this->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 memberList () { $r = new \App\Http\Controllers\User\MemberList($this->valid, $this->menu, $this->user); return $r->index(); } public function commentList () { $r = new \App\Http\Controllers\Home\CommentList($this->valid, $this->menu, $this->user); return $r->index(); } public function newComment (Request $rr) { $r = new Comment(); return $r->add($rr); } public function addContent (Request $rr) { $r = new Content($this->valid, $this->menu, $this->user); return $r->add($rr); } public function editContent (Request $rr) { $r = new Content($this->valid, $this->menu, $this->user); return $r->edit($rr); } public function delContent (Request $rr) { $r = new Content($this->valid, $this->menu, $this->user); return $r->delete($rr); } }