D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso_ant
/
adm
/
app
/
gre
/
Controllers
/
Filename :
PedidoMan.php
back
Copy
<?php namespace App\gre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of PedidoMan * * @copyright (c) year, Carlos Marques - CM */ class PedidoMan { private $Dados; private $DadosForm; private $PageId; public function listar($PageId = null) { $botao = ['vis_ped' => ['menu_controller' => 'ver-pedido', 'menu_metodo' => 'ver-ped'], 'vol_ped' => ['menu_controller' => 'pedido-man', 'menu_metodo' => 'listar'], 'cad_ped' => ['menu_controller' => 'cadastrar-item-pedido', 'menu_metodo' => 'cad-item-ped'], 'fec_ped' => ['menu_controller' => 'fechar-pedido', 'menu_metodo' => 'fec-ped'], 'del_ped' => ['menu_controller' => 'apagar-pedido', 'menu_metodo' => 'apagar-ped']]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $this->cadItemPedViewPriv(); $this->DadosForm = filter_input_array(INPUT_POST, FILTER_DEFAULT); if (!empty($this->DadosForm['ListItemPed'])) { unset($this->DadosForm['ListItemPed']); $this->PageId = (int) $PageId ? $PageId : 1; $listarItemPed = new \App\gre\Models\GreListarPedidoMan(); $this->Dados['listPedMan'] = $listarItemPed->listarPedMan($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarItemPed->getResultadoPg(); $carregarView = new \Core\ConfigView("gre/Views/Compras/listarPedidoMan", $this->Dados); $carregarView->renderizar(); } else { $listarItemPed = new \App\gre\Models\GreListarPedidoMan(); $this->Dados['listPedMan'] = $listarItemPed->listarCadastrar(); $carregarView = new \Core\ConfigView("gre/Views/Compras/listarPedidoMan", $this->Dados); $carregarView->renderizar(); } } private function cadItemPedViewPriv() { $listarSelect = new \App\gre\Models\GreListarPedidoMan(); $this->Dados['select'] = $listarSelect->listarCadastrar(); } }