tieneRol("4") && !$usuario->tieneRol("1")){ header("Location: aplicacion.php?e=permiso"); exit; } $idEmpleado=$_GET['oid']; if($_GET['byEstado']!=""){ $tipoPedidos=stripinput($_GET['byEstado']); } else { $tipoPedidos="10"; } include_once("Objects/Empleado.php"); try{ $empleado=new Empleado($usuario,$idEmpleado); $resultado=$empleado->eliminar(); if($resultado){ header("Location: lista_empleados.php?msg=1&byEstado=".$tipoPedidos); } else { header("Location: lista_empleados.php?msg=2&byEstado=".$tipoPedidos); } } catch (Exception $e) { $msg=$e->getMessage(); include_once("showError.php"); } exit(); ?>