public function form() { $this->views = new Views(new Template("admin")); if (isset($this->get->id)) { $this->views->title = "Editar padrinho"; $this->views->data = Godfather::get($this->get->id); } else { $this->views->title = "Adicionar padrinho"; } $this->views->display('godfather_form.phtml'); }
public function form() { Phalanx::loadClasses('Users'); Phalanx::loadClasses('Godfather'); $this->views = new Views(new Template("admin")); if (isset($this->get->cat_id)) { $this->views->data = Cats::get_details($this->get->cat_id); $this->views->title = "Gatos (Editando Registro)"; } else { $this->views->title = "Gatos (Adicionar)"; } $this->views->godfathers = Godfather::get(NULL, NULL, "nome ASC"); $this->views->data->godfathers_list = unserialize($this->views->data->godfathers_list); $this->views->users = Users::get(); $this->views->display('cats_form.phtml'); }