infrastruktur karte
This commit is contained in:
@@ -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 = ?",
|
||||
|
||||
Reference in New Issue
Block a user