15 || !is_numeric($pconfig['orphan']))) { $input_errors[] = gettext("Orphan mode must be a value between 0..15"); } // swap fields, really stupid field usage which we are not going to change now.... foreach (array('kod', 'nomodify', 'nopeer', 'notrap') as $fieldname) { $pconfig[$fieldname] = empty($pconfig[$fieldname]); } if (count($input_errors) == 0) { // copy fields foreach ($copy_fields as $fieldname) { if (!empty($pconfig[$fieldname])) { $a_ntpd[$fieldname] = $pconfig[$fieldname]; } elseif (isset($a_ntpd[$fieldname])) { unset($a_ntpd[$fieldname]); } } // list types $config['system']['timeservers'] = trim(implode(' ', $pconfig['timeservers_host'])); $a_ntpd['noselect'] = !empty($pconfig['timeservers_noselect']) ? trim(implode(' ', $pconfig['timeservers_noselect'])) : null; $a_ntpd['prefer'] = !empty($pconfig['timeservers_prefer']) ? trim(implode(' ', $pconfig['timeservers_prefer'])) : null; $a_ntpd['interface'] = !empty($pconfig['interface']) ? implode(',', $pconfig['interface']) : null; // unset empty foreach (array('noselect', 'prefer', 'interface') as $fieldname) { if (empty($a_ntpd[$fieldname])) { unset($a_ntpd[$fieldname]); } } if (empty($config['system']['timeservers'])) { unset($config['system']['timeservers']); } if (!empty($a_ntpd['leapsec'])) { $a_ntpd['leapsec'] = base64_encode($a_ntpd['leapsec']); } elseif(isset($config['ntpd']['leapsec'])) { unset($config['ntpd']['leapsec']); } if (is_uploaded_file($_FILES['leapfile']['tmp_name'])) { $a_ntpd['leapsec'] = base64_encode(file_get_contents($_FILES['leapfile']['tmp_name'])); } write_config("Updated NTP Server Settings"); system_ntp_configure(); header("Location: services_ntpd.php"); exit; } } $service_hook = 'ntpd'; legacy_html_escape_form_data($pconfig); include("head.inc"); ?>
0) print_input_errors($input_errors); ?>
  
$carpip) { $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; } $aliaslist = get_configured_ip_aliases_list(); foreach ($aliaslist as $aliasip => $aliasif) { $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; }?>
$timeserver):?>
/> />
/>
/>
/>
" /> -
" /> -
" /> -
  " />