Project

General

Profile

Download (18.7 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * services_ntpd.php
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2013 BSD Perimeter
7
 * Copyright (c) 2013-2016 Electric Sheep Fencing
8
 * Copyright (c) 2014-2020 Rubicon Communications, LLC (Netgate)
9
 * Copyright (c) 2013 Dagorlad
10
 * All rights reserved.
11
 *
12
 * Licensed under the Apache License, Version 2.0 (the "License");
13
 * you may not use this file except in compliance with the License.
14
 * You may obtain a copy of the License at
15
 *
16
 * http://www.apache.org/licenses/LICENSE-2.0
17
 *
18
 * Unless required by applicable law or agreed to in writing, software
19
 * distributed under the License is distributed on an "AS IS" BASIS,
20
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
 * See the License for the specific language governing permissions and
22
 * limitations under the License.
23
 */
24

    
25
##|+PRIV
26
##|*IDENT=page-services-ntpd
27
##|*NAME=Services: NTP Settings
28
##|*DESCR=Allow access to the 'Services: NTP Settings' page.
29
##|*MATCH=services_ntpd.php*
30
##|-PRIV
31

    
32
define('NUMTIMESERVERS', 10);		// The maximum number of configurable time servers
33
require_once("guiconfig.inc");
34
require_once('rrd.inc');
35
require_once("shaper.inc");
36

    
37
global $ntp_poll_min_default, $ntp_poll_max_default;
38
$ntp_poll_values = system_ntp_poll_values();
39
$auto_pool_suffix = "pool.ntp.org";
40
$max_candidate_peers = 25;
41
$min_candidate_peers = 4;
42

    
43
if (!is_array($config['ntpd'])) {
44
	$config['ntpd'] = array();
45
}
46

    
47
if (empty($config['ntpd']['interface'])) {
48
	if (is_array($config['installedpackages']['openntpd']) && is_array($config['installedpackages']['openntpd']['config']) &&
49
	    is_array($config['installedpackages']['openntpd']['config'][0]) && !empty($config['installedpackages']['openntpd']['config'][0]['interface'])) {
50
		$pconfig['interface'] = explode(",", $config['installedpackages']['openntpd']['config'][0]['interface']);
51
		unset($config['installedpackages']['openntpd']);
52
		write_config(gettext("Upgraded settings from openntpd"));
53
	} else {
54
		$pconfig['interface'] = array();
55
	}
56
} else {
57
	$pconfig['interface'] = explode(",", $config['ntpd']['interface']);
58
}
59

    
60
if ($_POST) {
61
	unset($input_errors);
62
	$pconfig = $_POST;
63

    
64
	if (!empty($_POST['ntpmaxpeers']) && (!is_numericint($_POST['ntpmaxpeers']) ||
65
	    ($_POST['ntpmaxpeers'] < $min_candidate_peers) || ($_POST['ntpmaxpeers'] > $max_candidate_peers))) {
66
		$input_errors[] = sprintf(gettext("Max candidate pool peers must be a number between %d and %d"), $min_candidate_peers, $max_candidate_peers);
67
	}
68
	
69
	if ((strlen($pconfig['ntporphan']) > 0) && (!is_numericint($pconfig['ntporphan']) || ($pconfig['ntporphan'] < 1) || ($pconfig['ntporphan'] > 15))) {
70
		$input_errors[] = gettext("The supplied value for NTP Orphan Mode is invalid.");
71
	}
72

    
73
	if (!array_key_exists($pconfig['ntpminpoll'], $ntp_poll_values)) {
74
		$input_errors[] = gettext("The supplied value for Minimum Poll Interval is invalid.");
75
	}
76

    
77
	if (!array_key_exists($pconfig['ntpmaxpoll'], $ntp_poll_values)) {
78
		$input_errors[] = gettext("The supplied value for Maximum Poll Interval is invalid.");
79
	}
80

    
81
	for ($i = 0; $i < NUMTIMESERVERS; $i++) {
82
		if (isset($pconfig["servselect{$i}"]) && (isset($pconfig["servispool{$i}"]) || 
83
		    (substr_compare($pconfig["server{$i}"], $auto_pool_suffix, strlen($pconfig["server{$i}"]) - strlen($auto_pool_suffix), strlen($auto_pool_suffix)) === 0))) {
84
			$input_errors[] = gettext("It is not possible to use 'No Select' for pools.");
85
		}
86
		if (!empty($pconfig["server{$i}"]) && !is_domain($pconfig["server{$i}"]) &&
87
		    !is_ipaddr($pconfig["server{$i}"])) {
88
			$input_errors[] = gettext("NTP Time Server names must be valid domain names, IPv4 addresses, or IPv6 addresses");
89
		}
90
	}
91

    
92
	if (is_numericint($pconfig['ntpminpoll']) &&
93
	    is_numericint($pconfig['ntpmaxpoll']) &&
94
	    ($pconfig['ntpmaxpoll'] < $pconfig['ntpminpoll'])) {
95
		$input_errors[] = gettext("The supplied value for Minimum Poll Interval is higher than NTP Maximum Poll Interval.");
96
	}
97

    
98
	if (!$input_errors) {
99
		$config['ntpd']['enable'] = isset($_POST['enable']) ? 'enabled' : 'disabled';
100
		if (is_array($_POST['interface'])) {
101
			$config['ntpd']['interface'] = implode(",", $_POST['interface']);
102
		} elseif (isset($config['ntpd']['interface'])) {
103
			unset($config['ntpd']['interface']);
104
		}
105

    
106
		if (!empty($_POST['gpsport']) && file_exists('/dev/'.$_POST['gpsport'])) {
107
			$config['ntpd']['gpsport'] = $_POST['gpsport'];
108
		} elseif (isset($config['ntpd']['gpsport'])) {
109
			unset($config['ntpd']['gpsport']);
110
		}
111

    
112
		unset($config['ntpd']['prefer']);
113
		unset($config['ntpd']['noselect']);
114
		unset($config['ntpd']['ispool']);
115
		$timeservers = '';
116

    
117
		for ($i = 0; $i < NUMTIMESERVERS; $i++) {
118
			$tserver = trim($_POST["server{$i}"]);
119
			if (!empty($tserver)) {
120
				$timeservers .= "{$tserver} ";
121
				if (isset($_POST["servprefer{$i}"])) {
122
					$config['ntpd']['prefer'] .= "{$tserver} ";
123
				}
124
				if (isset($_POST["servselect{$i}"])) {
125
					$config['ntpd']['noselect'] .= "{$tserver} ";
126
				}
127
				if (isset($_POST["servispool{$i}"])) {
128
					$config['ntpd']['ispool'] .= "{$tserver} ";
129
				}
130
			}
131
		}
132
		if (trim($timeservers) == "") {
133
			$timeservers = "pool.ntp.org";
134
		}
135
		$config['system']['timeservers'] = trim($timeservers);
136

    
137
		if (!empty($pconfig['ntpmaxpeers'])) {
138
			$config['ntpd']['ntpmaxpeers'] = $pconfig['ntpmaxpeers'];
139
		} else {
140
			unset($config['ntpd']['ntpmaxpeers']);
141
		}
142
		$config['ntpd']['orphan'] = trim($pconfig['ntporphan']);
143
		$config['ntpd']['ntpminpoll'] = $pconfig['ntpminpoll'];
144
		$config['ntpd']['ntpmaxpoll'] = $pconfig['ntpmaxpoll'];
145

    
146
		if (!empty($_POST['logpeer'])) {
147
			$config['ntpd']['logpeer'] = $_POST['logpeer'];
148
		} elseif (isset($config['ntpd']['logpeer'])) {
149
			unset($config['ntpd']['logpeer']);
150
		}
151

    
152
		if (!empty($_POST['logsys'])) {
153
			$config['ntpd']['logsys'] = $_POST['logsys'];
154
		} elseif (isset($config['ntpd']['logsys'])) {
155
			unset($config['ntpd']['logsys']);
156
		}
157

    
158
		if (!empty($_POST['clockstats'])) {
159
			$config['ntpd']['clockstats'] = $_POST['clockstats'];
160
		} elseif (isset($config['ntpd']['clockstats'])) {
161
			unset($config['ntpd']['clockstats']);
162
		}
163

    
164
		if (!empty($_POST['loopstats'])) {
165
			$config['ntpd']['loopstats'] = $_POST['loopstats'];
166
		} elseif (isset($config['ntpd']['loopstats'])) {
167
			unset($config['ntpd']['loopstats']);
168
		}
169

    
170
		if (!empty($_POST['peerstats'])) {
171
			$config['ntpd']['peerstats'] = $_POST['peerstats'];
172
		} elseif (isset($config['ntpd']['peerstats'])) {
173
			unset($config['ntpd']['peerstats']);
174
		}
175

    
176
		if ((empty($_POST['statsgraph'])) == (isset($config['ntpd']['statsgraph']))) {
177
			$enable_rrd_graphing = true;
178
		}
179
		if (!empty($_POST['statsgraph'])) {
180
			$config['ntpd']['statsgraph'] = $_POST['statsgraph'];
181
		} elseif (isset($config['ntpd']['statsgraph'])) {
182
			unset($config['ntpd']['statsgraph']);
183
		}
184
		if (isset($enable_rrd_graphing)) {
185
			enable_rrd_graphing();
186
		}
187

    
188
		if (!empty($_POST['leaptext'])) {
189
			$config['ntpd']['leapsec'] = base64_encode($_POST['leaptext']);
190
		} elseif (isset($config['ntpd']['leapsec'])) {
191
			unset($config['ntpd']['leapsec']);
192
		}
193

    
194
		if (is_uploaded_file($_FILES['leapfile']['tmp_name'])) {
195
			$config['ntpd']['leapsec'] = base64_encode(file_get_contents($_FILES['leapfile']['tmp_name']));
196
		}
197

    
198
		write_config("Updated NTP Server Settings");
199

    
200
		$changes_applied = true;
201
		$retval = 0;
202
		$retval |= system_ntp_configure();
203
	}
204
}
205

    
206
function build_interface_list() {
207
	global $pconfig;
208

    
209
	$iflist = array('options' => array(), 'selected' => array());
210

    
211
	$interfaces = get_configured_interface_with_descr();
212
	$interfaces['lo0'] = "Localhost";
213

    
214
	foreach ($interfaces as $iface => $ifacename) {
215
		if (!is_ipaddr(get_interface_ip($iface)) &&
216
		    !is_ipaddrv6(get_interface_ipv6($iface))) {
217
			continue;
218
		}
219

    
220
		$iflist['options'][$iface] = $ifacename;
221

    
222
		if (in_array($iface, $pconfig['interface'])) {
223
			array_push($iflist['selected'], $iface);
224
		}
225
	}
226

    
227
	return($iflist);
228
}
229

    
230
init_config_arr(array('ntpd'));
231
$pconfig = &$config['ntpd'];
232
$pconfig['enable'] = ($config['ntpd']['enable'] != 'disabled') ? 'enabled' : 'disabled';
233
if (empty($pconfig['interface'])) {
234
	$pconfig['interface'] = array();
235
} else {
236
	$pconfig['interface'] = explode(",", $pconfig['interface']);
237
}
238
$pgtitle = array(gettext("Services"), gettext("NTP"), gettext("Settings"));
239
$pglinks = array("", "@self", "@self");
240
$shortcut_section = "ntp";
241
include("head.inc");
242

    
243
if ($input_errors) {
244
	print_input_errors($input_errors);
245
}
246

    
247
if ($changes_applied) {
248
	print_apply_result_box($retval);
249
}
250

    
251
$tab_array = array();
252
$tab_array[] = array(gettext("Settings"), true, "services_ntpd.php");
253
$tab_array[] = array(gettext("ACLs"), false, "services_ntpd_acls.php");
254
$tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php");
255
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php");
256
display_top_tabs($tab_array);
257

    
258
$form = new Form;
259
$form->setMultipartEncoding();	// Allow file uploads
260

    
261
$section = new Form_Section('NTP Server Configuration');
262

    
263
$section->addInput(new Form_Checkbox(
264
	'enable',
265
	'Enable',
266
	'Enable NTP Server',
267
	($pconfig['enable'] == 'enabled')
268
))->setHelp('You may need to disable NTP if pfSense is running in a virtual machine and the host is responsible for the clock.');
269

    
270
$iflist = build_interface_list();
271

    
272
$section->addInput(new Form_Select(
273
	'interface',
274
	'Interface',
275
	$iflist['selected'],
276
	$iflist['options'],
277
	true
278
))->setHelp('Interfaces without an IP address will not be shown.%1$s' .
279
			'Selecting no interfaces will listen on all interfaces with a wildcard.%1$s' .
280
			'Selecting all interfaces will explicitly listen on only the interfaces/IPs specified.', '<br />');
281

    
282
$timeservers = explode(' ', $config['system']['timeservers']);
283
$maxrows = max(count($timeservers), 1);
284
for ($counter=0; $counter < $maxrows; $counter++) {
285
	$group = new Form_Group($counter == 0 ? 'Time Servers':'');
286
	$group->addClass('repeatable');
287
	$group->setAttribute('max_repeats', NUMTIMESERVERS);
288
	$group->setAttribute('max_repeats_alert', sprintf(gettext('%d is the maximum number of configured servers.'), NUMTIMESERVERS));
289

    
290
	$group->add(new Form_Input(
291
		'server' . $counter,
292
		null,
293
		'text',
294
		$timeservers[$counter],
295
		['placeholder' => 'Hostname']
296
	 ))->setWidth(3);
297

    
298
	 $group->add(new Form_Checkbox(
299
		'servprefer' . $counter,
300
		null,
301
		null,
302
		isset($config['ntpd']['prefer']) && isset($timeservers[$counter]) && substr_count($config['ntpd']['prefer'], $timeservers[$counter])
303
	 ))->sethelp('Prefer');
304

    
305
	 $group->add(new Form_Checkbox(
306
		'servselect' . $counter,
307
		null,
308
		null,
309
		isset($config['ntpd']['noselect']) && isset($timeservers[$counter]) && substr_count($config['ntpd']['noselect'], $timeservers[$counter])
310
	 ))->sethelp('No Select');
311

    
312
	$group->add(new Form_Checkbox(
313
		'servispool' . $counter,
314
		null,
315
		null,
316
		(substr_compare($timeservers[$counter], $auto_pool_suffix, strlen($timeservers[$counter]) - strlen($auto_pool_suffix), strlen($auto_pool_suffix)) === 0)
317
		 || (isset($config['ntpd']['ispool']) && isset($timeservers[$counter]) && substr_count($config['ntpd']['ispool'], $timeservers[$counter]))
318
	 ))->sethelp('Is a Pool');
319

    
320
	$group->add(new Form_Button(
321
		'deleterow' . $counter,
322
		'Delete',
323
		null,
324
		'fa-trash'
325
	))->addClass('btn-warning');
326

    
327
	 $section->add($group);
328
}
329

    
330
$section->addInput(new Form_Button(
331
	'addrow',
332
	'Add',
333
	null,
334
	'fa-plus'
335
))->addClass('btn-success');
336

    
337
$section->addInput(new Form_StaticText(
338
	null,
339
	$btnaddrow
340
))->setHelp(
341
	'NTP will only sync if a majority of the servers agree on the time.  For best results you should configure between 3 and 5 servers ' .
342
	'(%4$sNTP support pages recommend at least 4 or 5%5$s), or a pool. If only one server is configured, it %2$swill%3$s be believed, and if 2 servers ' .
343
	'are configured and they disagree, %2$sneither%3$s will be believed. Options:%1$s' .
344
	'%2$sPrefer%3$s - NTP should favor the use of this server more than all others.%1$s' .
345
	'%2$sNo Select%3$s - NTP should not use this server for time, but stats for this server will be collected and displayed.%1$s' .
346
	'%2$sIs a Pool%3$s - this entry is a pool of NTP servers and not a single address. This is assumed for *.pool.ntp.org.',
347
	'<br />',
348
	'<b>',
349
	'</b>',
350
	'<a target="_blank" href="https://support.ntp.org/bin/view/Support/ConfiguringNTP">',
351
	'</a>'
352
	);
353

    
354
$section->addInput(new Form_Input(
355
	'ntpmaxpeers',
356
	'Max candidate pool peers',
357
	'number',
358
	$pconfig['ntpmaxpeers'],
359
	['min' => $min_candidate_peers, 'max' => $max_candidate_peers]
360
))->setHelp('Maximum number of candidate peers in the NTP pool. This value should be set low enough to provide sufficient alternate sources ' .
361
	    'while not contacting an excessively large number of peers. ' .
362
	    'Many servers inside public pools are provided by volunteers, ' .
363
	    'and a large candidate pool places unnecessary extra load ' .
364
	    'on the volunteer time servers for little to no added benefit. (Default: 5).');
365

    
366
$section->addInput(new Form_Input(
367
	'ntporphan',
368
	'Orphan Mode',
369
	'text',
370
	$pconfig['orphan'],
371
	['placeholder' => "12"]
372
))->setHelp('Orphan mode allows the system clock to be used when no other clocks are available. ' .
373
			'The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough ' .
374
			'to insure that any other servers available to clients are preferred over this server (default: 12).');
375

    
376
$section->addInput(new Form_Select(
377
	'ntpminpoll',
378
	'Minimum Poll Interval',
379
	$pconfig['ntpminpoll'],
380
	$ntp_poll_values
381
))->setHelp('Minimum poll interval for NTP messages. If set, must be less than or equal to Maximum Poll Interval.');
382

    
383
$section->addInput(new Form_Select(
384
	'ntpmaxpoll',
385
	'Maximum Poll Interval',
386
	$pconfig['ntpmaxpoll'],
387
	$ntp_poll_values
388
))->setHelp('Maximum poll interval for NTP messages. If set, must be greater than or equal to Minimum Poll Interval.');
389

    
390
$section->addInput(new Form_Checkbox(
391
	'statsgraph',
392
	'NTP Graphs',
393
	'Enable RRD graphs of NTP statistics (default: disabled).',
394
	$pconfig['statsgraph']
395
));
396

    
397
$section->addInput(new Form_Checkbox(
398
	'logpeer',
399
	'Logging',
400
	'Log peer messages (default: disabled).',
401
	$pconfig['logpeer']
402
));
403

    
404
$section->addInput(new Form_Checkbox(
405
	'logsys',
406
	null,
407
	'Log system messages (default: disabled).',
408
	$pconfig['logsys']
409
))->setHelp('These options enable additional messages from NTP to be written to the System Log %1$sStatus > System Logs > NTP%2$s',
410
			'<a href="status_logs.php?logfile=ntpd">', '</a>.');
411

    
412
// Statistics logging section
413
$btnadv = new Form_Button(
414
	'btnadvstats',
415
	'Display Advanced',
416
	null,
417
	'fa-cog'
418
);
419

    
420
$btnadv->setAttribute('type','button')->addClass('btn-info btn-sm');
421

    
422
$section->addInput(new Form_StaticText(
423
	'Statistics Logging',
424
	$btnadv
425
))->setHelp('Warning: These options will create persistent daily log files in /var/log/ntp.');
426

    
427
$section->addInput(new Form_Checkbox(
428
	'clockstats',
429
	null,
430
	'Log reference clock statistics (default: disabled).',
431
	$pconfig['clockstats']
432
));
433

    
434
$section->addInput(new Form_Checkbox(
435
	'loopstats',
436
	null,
437
	'Log clock discipline statistics (default: disabled).',
438
	$pconfig['loopstats']
439
));
440

    
441
$section->addInput(new Form_Checkbox(
442
	'peerstats',
443
	null,
444
	'Log NTP peer statistics (default: disabled).',
445
	$pconfig['peerstats']
446
));
447

    
448
// Leap seconds section
449
$btnadv = new Form_Button(
450
	'btnadvleap',
451
	'Display Advanced',
452
	null,
453
	'fa-cog'
454
);
455

    
456
$btnadv->setAttribute('type','button')->addClass('btn-info btn-sm');
457

    
458
$section->addInput(new Form_StaticText(
459
	'Leap seconds',
460
	$btnadv
461
))->setHelp(
462
	'Leap seconds may be added or subtracted at the end of June or December. Leap seconds are administered by the ' .
463
	'%1$sIERS%2$s, who publish them in their Bulletin C approximately 6 - 12 months in advance.  Normally this correction ' .
464
	'should only be needed if the server is a stratum 1 NTP server, but many NTP servers do not advertise an upcoming leap ' .
465
	'second when other NTP servers synchronise to them.%3$s%4$sIf the leap second is important to your network services, ' .
466
	'it is %6$sgood practice%2$s to download and add the leap second file at least a day in advance of any time correction%5$s.%3$s ' .
467
	'More information and files for downloading can be found on their %1$swebsite%2$s, and also on the %7$NIST%2$s and %8$sNTP%2$s websites.',
468
	'<a target="_blank" href="https://www.iers.org">',
469
	'</a>',
470
	'<br />',
471
	'<b>',
472
	'</b>',
473
	'<a target="_blank" href="https://support.ntp.org/bin/view/Support/ConfiguringNTP">',
474
	'<a target="_blank" href="https://www.nist.gov">',
475
	'<a target="_blank" href="https://www.ntp.org">'
476
);
477

    
478
$section->addInput(new Form_Textarea(
479
	'leaptext',
480
	null,
481
	base64_decode(chunk_split($pconfig['leapsec']))
482
))->setHelp('Enter Leap second configuration as text OR select a file to upload.');
483

    
484
$section->addInput(new Form_Input(
485
	'leapfile',
486
	null,
487
	'file'
488
))->addClass('btn-default');
489

    
490
$form->add($section);
491

    
492
print($form);
493

    
494
?>
495

    
496
<script type="text/javascript">
497
//<![CDATA[
498
	// If this variable is declared, any help text will not be deleted when rows are added
499
	// IOW the help text will appear on every row
500
	retainhelp = true;
501
</script>
502

    
503
<script type="text/javascript">
504
//<![CDATA[
505
events.push(function() {
506

    
507
	// Show advanced stats options ============================================
508
	var showadvstats = false;
509

    
510
	function show_advstats(ispageload) {
511
		var text;
512
		// On page load decide the initial state based on the data.
513
		if (ispageload) {
514
<?php
515
			if (!$pconfig['clockstats'] && !$pconfig['loopstats'] && !$pconfig['peerstats']) {
516
				$showadv = false;
517
			} else {
518
				$showadv = true;
519
			}
520
?>
521
			showadvstats = <?php if ($showadv) {echo 'true';} else {echo 'false';} ?>;
522
		} else {
523
			// It was a click, swap the state.
524
			showadvstats = !showadvstats;
525
		}
526

    
527
		hideCheckbox('clockstats', !showadvstats);
528
		hideCheckbox('loopstats', !showadvstats);
529
		hideCheckbox('peerstats', !showadvstats);
530

    
531
		if (showadvstats) {
532
			text = "<?=gettext('Hide Advanced');?>";
533
		} else {
534
			text = "<?=gettext('Display Advanced');?>";
535
		}
536
		$('#btnadvstats').html('<i class="fa fa-cog"></i> ' + text);
537
	}
538

    
539
	$('#btnadvstats').click(function(event) {
540
		show_advstats();
541
	});
542

    
543
	// Show advanced leap second options ======================================
544
	var showadvleap = false;
545

    
546
	function show_advleap(ispageload) {
547
		var text;
548
		// On page load decide the initial state based on the data.
549
		if (ispageload) {
550
<?php
551
			// Note: leapfile is not a field saved in the config, so no need to test for it here.
552
			// leapsec is the encoded text in the config, leaptext is not a pconfig[] key.
553
			if (empty($pconfig['leapsec'])) {
554
				$showadv = false;
555
			} else {
556
				$showadv = true;
557
			}
558
?>
559
			showadvleap = <?php if ($showadv) {echo 'true';} else {echo 'false';} ?>;
560
		} else {
561
			// It was a click, swap the state.
562
			showadvleap = !showadvleap;
563
		}
564

    
565
		hideInput('leaptext', !showadvleap);
566
		hideInput('leapfile', !showadvleap);
567

    
568
		if (showadvleap) {
569
			text = "<?=gettext('Hide Advanced');?>";
570
		} else {
571
			text = "<?=gettext('Display Advanced');?>";
572
		}
573
		$('#btnadvleap').html('<i class="fa fa-cog"></i> ' + text);
574
	}
575

    
576
	$('#btnadvleap').click(function(event) {
577
		show_advleap();
578
	});
579

    
580
	// Set initial states
581
	show_advstats(true);
582
	show_advleap(true);
583

    
584
	// Suppress "Delete row" button if there are fewer than two rows
585
	checkLastRow();
586
});
587
//]]>
588
</script>
589

    
590
<?php include("foot.inc");
(131-131/227)