public function excluir() { $objeto = new Contratoservico(); $objeto->load($_GET['id']); if ($objeto->excluir()) { redirecionar('?pagina=contratoservico&acao=listar', 'registro excluido com sucesso!'); } else { redirecionar('?pagina=contratoservico&acao=listar', 'falha ao excluir registro!'); } }
public function excluir() { $objeto = new Eventoinfraest(); $objeto->load($_GET['id']); if ($objeto->excluir()) { redirecionar('?pagina=eventoinfraest&acao=listar', 'registro excluido com sucesso!'); } else { redirecionar('?pagina=eventoinfraest&acao=listar', 'falha ao excluir registro!'); } }
public function excluir() { $objeto = new Patrocinador(); $objeto->load($_GET['id']); if ($objeto->excluir()) { redirecionar('?pagina=patrocinador&acao=listar', 'registro excluido com sucesso!'); } else { redirecionar('?pagina=patrocinador&acao=listar', 'falha ao excluir registro!'); } }
function scaffold($tabelas) { $tabelas_saffold = array(); $createZip = new createZip(); foreach ($_POST['tabelas_requeridas'] as $tabela_req) { $tabelas_saffold[$tabela_req] = $tabelas[$tabela_req]; $tabelas_saffold[$tabela_req]['nome_classe'] = $_POST['classe_' . $tabela_req]; geraarquivos($tabelas_saffold[$tabela_req], $createZip); } $createZip->addFile(geraxml($tabelas_saffold), 'routes.xml'); $fileName = "temp/eventos.zip"; $fd = fopen($fileName, "wb"); $out = fwrite($fd, $createZip->getZippedfile()); fclose($fd); redirecionar('temp/eventos.zip', $mensagem); //$createZip -> forceDownload($fileName); die; }
function Processar() { $this->excluir = @$_GET['excluir']; if ($this->excluir) { $this->tipoacao = "Excluir"; } if (empty($this->tipoacao)) { $this->tipoacao = $this->Inicializar(); $this->Formular(); } else { reset($_POST); while (list($variavel, $valor) = each($_POST)) { $this->{$variavel} = $valor; } reset($_FILES); while (list($variavel, $valor) = each($_FILES)) { $this->{$variavel} = $valor; } // Realiza cadastro $this->PreCadastrar(); $sucesso = FALSE; if ($this->tipoacao == 'Novo') { $sucesso = $this->Novo(); if ($sucesso && !empty($this->script_sucesso)) { $this->script = "<script type=\"text/javascript\">\n window.opener.AdicionaItem({$this->chave}, '{$this->item_campo_pai}', '{$this->nome_pai}', {$this->submete} );\n window.close();\n </script>"; } if (!$sucesso && empty($this->erros) && empty($this->mensagem)) { $this->mensagem = "Não foi possível inserir a informação. [CAD01]"; } } elseif ($this->tipoacao == 'Editar') { $sucesso = $this->Editar(); if (!$sucesso && empty($this->erros) && empty($this->mensagem)) { $this->mensagem = "Não foi possível editar a informação. [CAD02]"; } } elseif ($this->tipoacao == 'Excluir') { $sucesso = $this->Excluir(); if (!$sucesso && empty($this->erros) && empty($this->mensagem)) { $this->mensagem = "Não foi possível excluir a informação. [CAD03]"; } } elseif ($this->tipoacao == 'ExcluirImg') { $sucesso = $this->ExcluirImg(); if (!$sucesso && empty($this->erros) && empty($this->mensagem)) { $this->mensagem = "Não foi possível excluir a informação. [CAD04]"; } } if (empty($script) && $sucesso && !empty($this->url_sucesso)) { redirecionar($this->url_sucesso); } else { $this->Formular(); } } }
public function excluir() { $objeto = new Evento(); $objeto->load($_GET['id']); DB::getConexao()->query("DELETE from eventoinfraest WHERE evento_id = {$objeto->getEvento_id()}"); DB::getConexao()->query("DELETE from contratoservico WHERE evento_id = {$objeto->getEvento_id()}"); DB::getConexao()->query("DELETE from eventopatrocinador WHERE evento_id = {$objeto->getEvento_id()}"); if ($objeto->excluir()) { redirecionar('?pagina=evento&acao=listar', 'registro excluido com sucesso!'); } else { redirecionar('?pagina=evento&acao=listar', 'falha ao excluir registro!'); } }