D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
novonote
/
adm
/
app
/
gre
/
Models
/
Orcamento
/
Filename :
ModApagarOrcamentoItem.php
back
Copy
<?php namespace App\gre\Models\Orcamento; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of AdmsApagarCor * * @copyright (c) year, Cesar Szpak - Celke */ class ModApagarOrcamentoItem { private $DadosId; private $Resultado; function getResultado() { return $this->Resultado; } public function apagarItem($DadosId = null) { $this->DadosId = $DadosId; $apagarItem = new \App\adms\Models\helper\AdmsDelete(); $apagarItem->exeDelete("gre_item_propostas", "WHERE id =:id", "id={$this->DadosId['id']}"); if ($apagarItem->getResultado()) { $_SESSION['msg'] = "<br><div class='alert alert-success alert-dismissible fade show' role='alert'> Item Apagado com sucesso! <button type='button' class='close' data-bs-dismiss='alert' aria-label='Close'> <span aria-hidden='true'>×</span></button> </div>"; $this->Resultado = true; } else { $_SESSION['msg'] = "<br><div class='alert alert-danger alert-dismissible fade show' role='alert'> Item não foi Apagado! <button type='button' class='close' data-bs-dismiss='alert' aria-label='Close'> <span aria-hidden='true'>×</span></button> </div>"; $this->Resultado = false; } } }