function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; $this->cod_acao_governo = $_GET['cod_acao_governo']; if (isset($_GET['cod_acao_governo'])) { if (isset($_GET['limpa'])) { unset($_SESSION["fotos"]); unset($_SESSION["fotos"]["inserido"]); unset($_SESSION["fotos"]["removidos"]); } if (isset($_GET['remover_foto']) && is_numeric($_GET['remover_foto']) && $this->permiteEditar()) { $obj_not = new clsPmiacoesAcaoGovernoFotoPortal($this->cod_acao_governo, $_GET['remover_foto']); $obj_not->excluir(); header("location: acoes_acao_det.php?cod_acao_governo={$this->cod_acao_governo}&display={$_GET["display"]}"); die; } } @session_write_close(); if (!isset($_GET['cod_acao_governo'])) { echo "<script>if(window.opener == null)window.location = \"acoes_acao_lst.php\";</script>"; } else { $obj_acao = new clsPmiAcoesAcaoGoverno($_GET['cod_acao_governo']); if (!($det_acao = $obj_acao->detalhe())) { echo "<script>if(window.opener == null)window.location = \"acoes_acao_lst.php\";</script>"; } } return $retorno; }