infrastruktur karte

This commit is contained in:
2026-02-16 11:57:24 +01:00
parent d1d89dd4e3
commit 12141485ae
7 changed files with 752 additions and 422 deletions

View File

@@ -9,22 +9,18 @@ $type = $_POST['type'] ?? '';
$id = (int)($_POST['id'] ?? 0);
if ($type === 'patchpanel') {
$fixedPanelWidth = 20;
$fixedPanelHeight = 5;
$name = trim($_POST['name'] ?? '');
$floorId = (int)($_POST['floor_id'] ?? 0);
$posX = (int)($_POST['pos_x'] ?? 0);
$posY = (int)($_POST['pos_y'] ?? 0);
$width = (int)($_POST['width'] ?? 0);
$height = (int)($_POST['height'] ?? 0);
$width = $fixedPanelWidth;
$height = $fixedPanelHeight;
$portCount = (int)($_POST['port_count'] ?? 0);
$comment = trim($_POST['comment'] ?? '');
if ($width <= 0) {
$width = 140;
}
if ($height <= 0) {
$height = 40;
}
if ($id > 0) {
$sql->set(
"UPDATE floor_patchpanels SET name = ?, floor_id = ?, pos_x = ?, pos_y = ?, width = ?, height = ?, port_count = ?, comment = ? WHERE id = ?",