get("Servers/$id") !== null; if ($mode == 'edit' && $server_exists) { $page_title = __('Edit server') . ' ' . $id . ' (' . $cf->getServerDSN($id) . ')'; } elseif ($mode == 'remove' && $server_exists) { $cf->removeServer($id); header('Location: index.php'); exit; } elseif ($mode == 'revert' && $server_exists) { // handled by process_formset() } else { $page_title = __('Add a new server'); $id = 0; } if (isset($page_title)) { echo '

' . $page_title . '

'; } $form_display = new FormDisplay(); $form_display->registerForm('Server', $id); $form_display->registerForm('Server_login_options', $id); $form_display->registerForm('Server_config', $id); $form_display->registerForm('Server_pmadb', $id); $form_display->registerForm('Server_tracking', $id); process_formset($form_display); ?>