function Excluir() { session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $tipoUsuario = new clsPmieducarTipoUsuario($this->cod_tipo_usuario, NULL, $this->pessoa_logada); if ($tipoUsuario->excluir()) { $this->mensagem .= 'Exclusão efetuada com sucesso.<br>'; $menuTipoUsuario = new clsPmieducarMenuTipoUsuario($this->cod_tipo_usuario); $menuTipoUsuario->excluirTudo(); header('Location: educar_tipo_usuario_lst.php'); die; } $this->mensagem = 'Exclusão não realizada.<br>'; return FALSE; }
function Excluir() { session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $obj = new clsPmieducarTipoUsuario($this->cod_tipo_usuario, NULL, $this->pessoa_logada, $this->nm_tipo, $this->descricao, $this->nivel, NULL, NULL, 0); $excluiu = $obj->excluir(); if ($excluiu) { $this->mensagem .= 'Exclusão efetuada com sucesso.<br>'; $obj_menu_usuario = new clsPmieducarMenuTipoUsuario($this->cod_tipo_usuario, $key, $valor['cadastra'], $valor['visualiza'], $valor['exclui']); $obj_menu_usuario->excluirTudo(); header('Location: educar_tipo_usuario_lst.php'); die; } $this->mensagem = 'Exclusão não realizada.<br>'; return FALSE; }