D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso_ant
/
adm
/
app
/
gre
/
Models
/
Filename :
GreApagarItemPedido.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GrsApagarItemPedido * * @copyright (c) year, Carlos Marques - CM */ class GreApagarItemPedido { private $DadosId; private $Resultado; private $Dados; private $DadosGet; function getResultado() { return $this->Resultado; } public function apagarItemPed($DadosId = null) { $this->DadosGet = filter_input_array(INPUT_GET, FILTER_DEFAULT); $this->DadosId = $this->DadosGet['id']; $apagarItemPed = new \App\adms\Models\helper\AdmsDelete(); $apagarItemPed->exeDelete("gre_pedido", "WHERE id =:id", "id={$this->DadosId}"); if ($apagarItemPed->getResultado()) { $_SESSION['msg'] = "<div class='alert alert-success'>Item do Pedido apagado com sucesso!</div>"; return $this->Resultado; } else { $_SESSION['msg'] = "<div class='alert alert-danger'>Erro: Item do Pedido não foi apagado!</div>"; $this->Resultado = false; } } }