D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso_ant
/
adm
/
app
/
gre
/
Controllers
/
Filename :
AbreMes.php
back
Copy
<?php namespace App\gre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of AbreMes * * @copyright (c) year, Carlos Marques - CM */ class AbreMes { private $Dados; private $DadosForm; private $PageId; public function listar($PageId = null) { $botao = ['list_abre' => ['menu_controller' => 'abre-mes', 'menu_metodo' => 'listar'], 'cad_abre' => ['menu_controller' => 'cadastrar-abre-mes', 'menu_metodo' => 'cad-abre-mes'], 'vis_abre' => ['menu_controller' => 'ver-abre-mes', 'menu_metodo' => 'ver-abre-mes'], 'edit_abre' => ['menu_controller' => 'editar-abre-mes', 'menu_metodo' => 'edit-abre-mes'], 'del_abre' => ['menu_controller' => 'apagar-abre-mes', 'menu_metodo' => 'apagar-abre-mes']]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $this->cadAbreViewPriv(); $this->DadosForm = filter_input_array(INPUT_POST, FILTER_DEFAULT); if (!empty($this->DadosForm['ListAbre'])) { unset($this->DadosForm['ListAbre']); // var_dump($this->DadosForm); $grvAbre = new \App\gre\Models\GreGravaAbreMes(); $this->Dados['listAbre'] = $grvAbre->grvAbre($this->DadosForm); $this->cadAbreViewPriv(); } else { $this->PageId = (int) $PageId ? $PageId : 1; } $listarAbre = new \App\gre\Models\GreListarAbreMes(); $this->Dados['listAbre'] = $listarAbre->listarAbre($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarAbre->getResultadoPg(); $carregarView = new \Core\ConfigView("gre/Views/AbreMes/listarAbreMes", $this->Dados); $carregarView->renderizar(); } private function cadAbreViewPriv() { $listarSelect = new \App\gre\Models\GreListarAbreMes(); $this->Dados['select'] = $listarSelect->listarCadastrar(); } }