0) { delete_node($id); $success = 'Node deleted.'; } } elseif (in_array($action, ['add', 'edit'], true)) { $id = $action === 'edit' ? (int)($_POST['id'] ?? 0) : null; $data = [ 'name' => trim($_POST['name'] ?? ''), 'api_url' => rtrim(trim($_POST['api_url'] ?? ''), '/'), 'username' => trim($_POST['username'] ?? 'admin'), 'password' => $_POST['password'] ?? '', 'verify_ssl' => isset($_POST['verify_ssl']) ? 1 : 0, 'enabled' => isset($_POST['enabled']) ? 1 : 0, ]; if ($data['name'] === '') $errors[] = 'Name is required.'; if ($data['api_url'] === '') $errors[] = 'API URL is required.'; if ($data['password'] === '' && $action === 'add') $errors[] = 'Password is required.'; // On edit, keep existing password if field left blank if ($action === 'edit' && $data['password'] === '') { $existing = get_node($id); $data['password'] = $existing['password'] ?? ''; } if (empty($errors)) { upsert_node($data, $id); $success = $action === 'add' ? 'Node added.' : 'Node updated.'; } } } $nodes = get_all_nodes(); $edit_node = null; if (isset($_GET['edit'])) { $edit_node = get_node((int)$_GET['edit']); } ?> Nodes – portspoof concentrator

portspoofconcentrator

 Cancel

Configured nodes

No nodes yet. Add one above.

Name API URL SSL verify Enabled Last fetched
yes' : 'no' ?> never' ?> edit