public function show() { if (!$this->get->page) { Request::redirect(HOST . 'adm/padrinhos/all/1'); } $this->views = new Views(new Template("admin")); $this->views->total_pages = Godfather::get_pages("godfather", "inactive=0"); $this->views->current_page = isset($this->get->page) ? $this->get->page : 1; $this->views->title = "Padrinhos (Todos)"; $this->views->search = $this->post->search; $this->views->order = $this->post->order; $parameters = "inactive=0 AND (nome LIKE '%{$this->post->search}%' OR id LIKE '%{$this->post->search}%')"; $this->views->data = Godfather::get($parameters, $this->views->current_page, $this->post->order); $this->views->display('godfather_list.phtml'); }