tieneRol("3")){ header("Location: aplicacion.php?e=permiso"); exit; } include_once("html/cabecera.php"); include_once("Objects/HTML.php"); include_once("Objects/Empresa.php"); $html = new HTML($locale); if($_POST['oid']!=""){ $oid=$_POST['oid']; } elseif ($_GET['oid']!="") { $oid=$_GET['oid']; } try{ $empresa=new Empresa($usuario,$oid,$locale); }catch (Exception $e){ $msg=$e->getMessage(); include_once("showError.php"); exit(); } switch ($_POST['action']) { case "editar":$id=$_POST['id']; $gerente=$_POST['gerente']; $privado=$_POST['privado']; $valores = array("gerente" => $gerente, "id" => $id, "privado" => $privado); try{ $empresa->setCampos($valores); $msg=$locale['2300'].$locale['2303'].$locale['2306']; $tipo="ok"; } catch (Exception $e){ $msg=$e->getMessage(); $tipo="error"; } break; default: break; } echo $html->menuEmpresas($oid,""); ?>