get("SELECT id, name, svg_path FROM floors ORDER BY name", "", []); $where = ''; $types = ''; $params = []; if ($floorId > 0) { $where = "WHERE p.floor_id = ?"; $types = "i"; $params[] = $floorId; } $patchPanels = $sql->get( "SELECT p.*, f.name AS floor_name FROM floor_patchpanels p LEFT JOIN floors f ON f.id = p.floor_id $where ORDER BY f.name, p.name", $types, $params ); $networkOutlets = $sql->get( "SELECT o.*, r.name AS room_name, f.name AS floor_name, f.id AS floor_id FROM network_outlets o LEFT JOIN rooms r ON r.id = o.room_id LEFT JOIN floors f ON f.id = r.floor_id ORDER BY f.name, r.name, o.name", "", [] ); $floorMap = []; foreach ($floors as $floor) { $id = (int)$floor['id']; $svgPath = trim((string)($floor['svg_path'] ?? '')); $floorMap[$id] = [ 'id' => $id, 'name' => (string)($floor['name'] ?? ''), 'svg_url' => $svgPath !== '' ? '/' . ltrim($svgPath, '/\\') : '' ]; } $editorFloorId = $floorId; if ($editorFloorId <= 0) { foreach ($floorMap as $candidate) { if ($candidate['svg_url'] !== '') { $editorFloorId = (int)$candidate['id']; break; } } } $editorFloor = $floorMap[$editorFloorId] ?? null; $editorPatchPanels = []; $editorOutlets = []; if ($editorFloorId > 0) { foreach ($patchPanels as $panel) { if ((int)$panel['floor_id'] === $editorFloorId) { $editorPatchPanels[] = [ 'id' => (int)$panel['id'], 'name' => (string)$panel['name'], 'floor_id' => (int)$panel['floor_id'], 'x' => (int)$panel['pos_x'], 'y' => (int)$panel['pos_y'], 'width' => max(1, (int)$panel['width']), 'height' => max(1, (int)$panel['height']), 'port_count' => (int)$panel['port_count'], 'comment' => (string)($panel['comment'] ?? '') ]; } } foreach ($networkOutlets as $outlet) { if ((int)$outlet['floor_id'] === $editorFloorId) { $editorOutlets[] = [ 'id' => (int)$outlet['id'], 'name' => (string)$outlet['name'], 'room_id' => (int)$outlet['room_id'], 'x' => (int)$outlet['x'], 'y' => (int)$outlet['y'], 'comment' => (string)($outlet['comment'] ?? '') ]; } } } ?>

Stockwerksinfrastruktur

+ Patchpanel hinzufügen + Wandbuchse hinzufügen
Zurücksetzen

Patchpanels

Name Stockwerk Position Größe Ports Aktionen
Bearbeiten

Noch keine Patchpanels definiert.

Wandbuchsen

Name Stockwerk Raum Koordinaten Kommentar Aktionen
Bearbeiten

Noch keine Wandbuchsen angelegt.

Stockwerksplan-Verortung

Kein Stockwerk für die Planansicht verfügbar.

Das gewählte Stockwerk hat noch keinen SVG-Plan hinterlegt.

Vorschau für . Positionen bearbeitest du über den jeweiligen „Bearbeiten“-Button.

Stockwerksplan

Patchpanels: blau, Wandbuchsen: grün. In dieser Ansicht sind Marker nicht verschiebbar.