D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
cpgre
/
Controllers
/
Filename :
CarregarServicoContratadoJs.php
back
Copy
<?php namespace App\cpgre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of CarregarServContrJs * * @copyright (c) year, Carlos Marques - */ class CarregarServicoContratadoJs { private $Dados; private $PageId; private $TipoResultado; private $PesqResid; private $PesqFilial; public function listar($PageId = null) { $this->TipoResultado = filter_input(INPUT_GET, 'tiporesult'); $this->PageId = (int) $PageId ? $PageId : 1; $botao = ['cad_serv_contr' => ['menu_controller' => 'cadastrar-serv-contratado', 'menu_metodo' => 'cad-serv-contr'], 'vis_serv_resid' => ['menu_controller' => 'ver-servico-residente', 'menu_metodo' => 'ver-servico-resid'], 'imp_serv_resid' => ['menu_controller' => 'imprime-servico-residente', 'menu_metodo' => 'listar'], 'lis_serv_resid' => ['menu_controller' => 'listar-servico-residente', 'menu_metodo' => 'list-serv-resid'], 'vol_serv_contr' => ['menu_controller' => 'carregar-servico-contratado-js', 'menu_metodo' => 'listar'], 'edit_serv_contr' => ['menu_controller' => 'editar-servico-contratado', 'menu_metodo' => 'edit-serv-contr'], 'del_serv_contr' => ['menu_controller' => 'apagar-servico-contratado', 'menu_metodo' => 'apagar-serv-contr']]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); if (!empty($this->TipoResultado) AND ( $this->TipoResultado == 1)) { $this->PesqResid = filter_input(INPUT_POST, 'palavraPesq'); $this->PesqFilial = filter_input(INPUT_POST, 'pesqfilial'); $this->pesqServContrPriv(); } elseif (!empty($this->TipoResultado) AND ( $this->TipoResultado == 2)) { $this->PesqResid = filter_input(INPUT_POST, 'palavraPesq'); $this->PesqFilial = filter_input(INPUT_POST, 'pesqfilial'); // echo $this->pesqServContr; // print_r($_POST); $this->pesqServContrPriv(); } else { $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $listarSelect = new \App\cpgre\Models\CpGreListarServicoContratado(); $this->Dados['select'] = $listarSelect->listarCadastrar(); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/Servico_Contratado/carregarServicoContratadoJs", $this->Dados); $carregarView->renderizar(); } } private function listarServContrPriv() { $listarServContr = new \App\cpgre\Models\CpGreListarServicoContratado(); $this->Dados['listServContr'] = $listarServContr->listarServContr($this->PesqFilial,$this->PageId); $this->Dados['paginacao'] = $listarServContr->getResultadoPg(); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/Servico_COntratado/listarServicoContratadoJs", $this->Dados); $carregarView->renderizarListar(); } private function pesqServContrPriv() { $listarServContr = new \App\cpgre\Models\CpGrePesqServicoContratado(); $this->Dados['listServContr'] = $listarServContr->pesqServContr($this->PesqResid, $this->PesqFilial ); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/Servico_Contratado/listarServicoContratadoJs", $this->Dados); $carregarView->renderizarListar(); } }