set("UPDATE ...", "???", [...]); } else { // TODO: INSERT INTO devices ... // $deviceId = $sql->set("INSERT ...", "???", [...], true); } // ========================= // Ports speichern / übernehmen vom Device-Type // ========================= // TODO: // - $portsData iterieren // - Positionen aus SVG übernehmen // - port_type_id, name, VLAN, Modus speichern // ========================= // SVG-Positionen speichern // ========================= // TODO: // - device_positions Tabelle? // - x/y Koordinaten // - Rotation / Zoom (optional) // ========================= // Antwort // ========================= echo json_encode([ 'status' => 'ok', 'id' => $deviceId ]);