D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Controllers
/
Filename :
ConLayoutImprimeVariosQr.php
back
Copy
<?php namespace App\gre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of ConLayoutImprimeVariosQr * * @copyright (c) year, Carlos Marques - CM */ class ConLayoutImprimeVariosQr { private $Dados; private $DadosForm; private $PageId; private $DadosGet; public function listar($PageId = null) { $botao = ['cad_lay' => ['menu_controller' => 'con-layout-cadastrar', 'menu_metodo' => 'cad-layout'], 'lis_lay' => ['menu_controller' => 'con-layout', 'menu_metodo' => 'listar'], 'edit_lay' => ['menu_controller' => 'con-layout-editar', 'menu_metodo' => 'edit-layout'], 'vis_lay' => ['menu_controller' => 'con-layout-ver', 'menu_metodo' => 'ver-layout'], 'del_lay' => ['menu_controller' => 'con-layout-apagar', 'menu_metodo' => 'apagar-layout'],]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $this->DadosForm = filter_input_array(INPUT_POST, FILTER_DEFAULT); // var_dump($this->DadosForm); if (!empty($this->DadosForm['ImprQr'])) { unset ($this->DadosForm['ImprQr']); // var_dump($this->DadosForm); $carregarView = new \App\gre\core\ConfigViewImprSimples("gre/Views/Layout/VieLayoutImprimeVariosQr", $this->DadosForm); $carregarView->renderizarGre(); /* echo '<pre>'; unset ($this->DadosForm['ImprQr']); // print_r($this->DadosForm); $dados = $this->DadosForm['imprimir']; $imagem = $this->DadosForm['imagens']; foreach($this->DadosForm['imprimir'] as $id => $value) { $array[] = [ 'id' => $id, 'imagem' => $imagem[$id], ]; } print_r($array); echo '</pre>'; die; // var_dump($this->DadosForm); */ } if (!empty($this->DadosForm['listQR'])) { unset($this->DadosForm['listQR']); $listarLay = new \App\gre\Models\ModLayoutListar(); $this->Dados['listQr'] = $listarLay->listarLayout($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarLay->getResultadoPg(); $carregarView = new \Core\ConfigView("gre/Views/Layout/VieLayoutListaVariosQr", $this->Dados); $carregarView->renderizar(); }else{ $this->DadosGet = filter_input_array(INPUT_GET, FILTER_DEFAULT); if(isset($this->DadosGet)) { } $this->cadLayViewPriv(); if (!empty($this->DadosForm['listLay'])) { unset($this->DadosForm['listLay']); $listarLay = new \App\gre\Models\ModLayoutListar(); $this->Dados['listarLay'] = $listarLay->listarLayout($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarLay->getResultadoPg(); } else { $this->PageId = (int) $PageId ? $PageId : 1; if (isset($this->DadosGet['filial_id'])) { $this->DadosForm['filial_id'] = $this->DadosGet['filial_id']; } } /* $listarLay = new \App\gre\Models\ModLayoutListar(); $this->Dados['listLay'] = $listarLay->listarLayout($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarLay->getResultadoPg(); */ if (!isset($this->DadosForm['listQR'])) { $carregarView = new \Core\ConfigView("gre/Views/Layout/VieLayoutSelecionaFilial", $this->Dados); $carregarView->renderizar(); } } } private function cadLayViewPriv() { $listarSelect = new \App\gre\Models\ModLayoutListar(); $this->Dados['select'] = $listarSelect->listarCadastrar(); } }