tieneRol("3")){ header("Location: aplicacion.php?e=permiso"); exit; } $idEmpresa=$_GET['oid']; include_once("Objects/Empresa.php"); try{ $empresa=new Empresa($usuario,$idEmpresa); $resultado=$empresa->eliminar(); if($resultado){ header("Location: lista_empresas.php?msg=1"); } else { header("Location: lista_empresas.php?msg=2"); } } catch (Exception $e) { $msg=$e->getMessage(); include_once("showError.php"); } exit(); ?>