} if (isset($_GET['activo'])) { $activo = 1; } else { $activo = 0; } $lista_ingredientes = array(); foreach ($carnes as $carne) { array_push($lista_ingredientes, $carne); } foreach ($vegetales as $vegetal) { array_push($lista_ingredientes, $vegetal); } $pizza = new Pizza(0, $descripcion, $activo, null, $lista_ingredientes, $queso); try { $resultado = pizzaBLL::agregar($pizza); } catch (Exception $ex) { $resultado = $ex->getMessage(); } if ($resultado === true) { echo "<div class=\"alert alert-success\" role=\"alert\">\n <strong>Exito!</strong> Pizza <strong>{$descripcion}</strong> agregado correctamente.\n </div>"; } else { echo "<div class=\"alert alert-danger\" role=\"alert\">\n <strong>Error!</strong> No se puedo agregar la pizza.\n </div>"; } echo "<p class=\"text-right\">\n\t\t\t\t<a href=\"mantenimiento.php?view=nueva_pizza\"\n\t\t\t \tclass=\"btn btn-primary\">\n\t\t\t\t\t<span class=\"glyphicon glyphicon-plus-sign\"></span>\n\t\t\t \t\tAgregar Nueva Pizza\n\t\t\t \t</a>\n\t\t\t </p>"; return; } else { try { $option_vegetal = ""; $option_carne = ""; $lista_ingredientes = ingredienteBLL::obtenerTodos(1);