Phone Systems - one phone system's window: Add (no id) or Edit. Which kind it is is * picked when it is added and stays. Its address is only for links into it - ITFlow never * connects to it; it sends ITFlow what happens, to the addresses its Setup window shows. Saved by * save_phone_system (admin/post/phone.php). */ require_once '../../includes/modal_header.php'; $phone_system_id = intval($_GET['id'] ?? 0); $row = $phone_system_id ? phoneSystemRow($phone_system_id) : null; if ($phone_system_id && !$row) { echo json_encode(['error' => 'That phone system no longer exists.']); exit; } if ($row && !phoneKind($row)) { echo json_encode(['error' => 'This ITFlow doesn\'t know that phone system\'s kind.']); exit; } $kinds = phoneSystemKinds(); $kind_key = $row ? (string) $row['phone_system_kind'] : (string) array_key_first($kinds); $kind = $kinds[$kind_key]; ob_start(); ?>