tieneRol("4")){ header("Location: aplicacion.php?e=permiso"); exit; } include_once("html/cabecera.php"); include_once("Objects/HTML.php"); include_once("Objects/Administracion.php"); $html=new HTML($locale); if($_POST['action']!=""){ $administrador=new Administracion($usuario,$locale); switch ($_POST['action']) { case "Editar":$texto=$_POST['editName']; try{ $cod=$_POST['campoSelect']; $texto=array_merge($cod,$texto); $administrador->editItem("salario",$texto); $msg=$locale['2300'].$locale['2303']; $tipo="ok"; } catch (Exception $e){ $msg=$e->getMessage(); $tipo="error"; } break; case "Eliminar": $cod=$_POST['campoSelect']; $cod=$cod[0]; try{ $administrador->removeItem("salario",$cod); $msg=$locale['2301'].$locale['2303']; $tipo="ok"; } catch (Exception $e){ $msg=$e->getMessage(); $tipo="error"; } break; case "Anadir": $texto=$_POST['newName']; try{ $administrador->addItem("salario",$texto); $msg=$locale['2302'].$locale['2303']; $tipo="ok"; } catch (Exception $e){ $msg=$e->getMessage(); $tipo="error"; } break; default: break; } } ?>
".$msg.""; } ?>