Project

General

Profile

Download (17.2 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	status_dhcpv6_leases.php
5
	Copyright (C) 2004-2009 Scott Ullrich
6
	Copyright (C) 2011 Seth Mos
7
	All rights reserved.
8

    
9
	originially part of m0n0wall (http://m0n0.ch/wall)
10
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
	All rights reserved.
12

    
13
	Redistribution and use in source and binary forms, with or without
14
	modification, are permitted provided that the following conditions are met:
15

    
16
	1. Redistributions of source code must retain the above copyright notice,
17
	   this list of conditions and the following disclaimer.
18

    
19
	2. Redistributions in binary form must reproduce the above copyright
20
	   notice, this list of conditions and the following disclaimer in the
21
	   documentation and/or other materials provided with the distribution.
22

    
23
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
24
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
25
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
27
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
	POSSIBILITY OF SUCH DAMAGE.
33
*/
34

    
35
/*
36
	pfSense_BUILDER_BINARIES:	/usr/bin/awk	/bin/cat	/usr/sbin/ndp	/usr/bin/wc	/usr/bin/grep
37
	pfSense_MODULE:	dhcpserver
38
*/
39

    
40
##|+PRIV
41
##|*IDENT=page-status-dhcpv6leases
42
##|*NAME=Status: DHCPv6 leases page
43
##|*DESCR=Allow access to the 'Status: DHCPv6 leases' page.
44
##|*MATCH=status_dhcpv6_leases.php*
45
##|-PRIV
46

    
47
require("guiconfig.inc");
48
require_once("config.inc");
49

    
50
$pgtitle = array(gettext("Status"),gettext("DHCPv6 leases"));
51
$shortcut_section = "dhcp6";
52

    
53
$leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases";
54

    
55
if (($_GET['deleteip']) && (is_ipaddr($_GET['deleteip']))) {
56
	/* Stop DHCPD */
57
	killbyname("dhcpd");
58

    
59
	/* Read existing leases */
60
	$leases_contents = explode("\n", file_get_contents($leasesfile));
61
	$newleases_contents = array();
62
	$i=0;
63
	while ($i < count($leases_contents)) {
64
		/* Find the lease(s) we want to delete */
65
		if ($leases_contents[$i] == "lease {$_GET['deleteip']} {") {
66
			/* Skip to the end of the lease declaration */
67
			do {
68
				$i++;
69
			} while ($leases_contents[$i] != "}");
70
		} else {
71
			/* It's a line we want to keep, copy it over. */
72
			$newleases_contents[] = $leases_contents[$i];
73
		}
74
		$i++;
75
	}
76

    
77
	/* Write out the new leases file */
78
	$fd = fopen($leasesfile, 'w');
79
	fwrite($fd, implode("\n", $newleases_contents));
80
	fclose($fd);
81

    
82
	/* Restart DHCP Service */
83
	services_dhcpd_configure();
84
	header("Location: status_dhcpv6_leases.php?all={$_GET['all']}");
85
}
86

    
87
include("head.inc");
88

    
89
?>
90

    
91
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
92
<?php include("fbegin.inc"); ?>
93
<?php
94

    
95
function leasecmp($a, $b) {
96
	return strcmp($a[$_GET['order']], $b[$_GET['order']]);
97
}
98

    
99
function adjust_gmt($dt) {
100
	global $config;
101
	$dhcpdv6 = $config['dhcpdv6'];
102
	foreach ($dhcpdv6 as $dhcpv6leaseinlocaltime) {
103
		$dhcpv6leaseinlocaltime = $dhcpv6leaseinlocaltime['dhcpv6leaseinlocaltime'];
104
		if ($dhcpv6leaseinlocaltime == "yes")
105
			break;
106
	}
107
	$timezone = $config['system']['timezone'];
108
	$ts = strtotime($dt . " GMT");
109
	if ($dhcpv6leaseinlocaltime == "yes") {
110
		$this_tz = new DateTimeZone($timezone);
111
		$dhcp_lt = new DateTime(strftime("%I:%M:%S%p", $ts), $this_tz);
112
		$offset = $this_tz->getOffset($dhcp_lt);
113
		$ts = $ts + $offset;
114
		return strftime("%Y/%m/%d %I:%M:%S%p", $ts);
115
	}
116
	else
117
		return strftime("%Y/%m/%d %H:%M:%S", $ts);
118
}
119

    
120
function remove_duplicate($array, $field) {
121
	foreach ($array as $sub)
122
		$cmp[] = $sub[$field];
123
	$unique = array_unique(array_reverse($cmp,true));
124
	foreach ($unique as $k => $rien)
125
		$new[] = $array[$k];
126
	return $new;
127
}
128

    
129
function parse_duid($duid_string) {
130
	$parsed_duid = array();
131
	for ($i=0; $i < strlen($duid_string); $i++) {
132
		$s = substr($duid_string, $i, 1);
133
		if ($s == '\\') {
134
			$n = substr($duid_string, $i+1, 1);
135
			if (($n == '\\') || ($n == '"')) {
136
				$parsed_duid[] = sprintf("%02x", ord($n));
137
			} elseif (is_numeric($n)) {
138
				$parsed_duid[] = sprintf("%02x", octdec(substr($duid_string, $i+1, 3)));
139
				$i += 3;
140
			}
141
		} else {
142
			$parsed_duid[] = sprintf("%02x", ord($s));
143
		}
144
	}
145
	$iaid = array_slice($parsed_duid, 0, 4);
146
	$duid = array_slice($parsed_duid, 4);
147
	return array($iaid, $duid);
148
}
149

    
150
$awk = "/usr/bin/awk";
151

    
152
/* this pattern sticks comments into a single array item */
153
$cleanpattern = "'{ gsub(\"^#.*\", \"\");} { gsub(\"^server-duid.*\", \"\");} { gsub(\";$\", \"\"); print;}'";
154
/* We then split the leases file by } */
155
$splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'";
156

    
157
/* stuff the leases file in a proper format into a array by line */
158
exec("/bin/cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern} | /usr/bin/grep '^ia-.. '", $leases_content);
159
$leases_count = count($leases_content);
160
exec("/usr/sbin/ndp -an", $rawdata);
161
$ndpdata = array();
162
foreach ($rawdata as $line) {
163
	$elements = preg_split('/\s+/ ',$line);
164
	if ($elements[1] != "(incomplete)") {
165
		$ndpent = array();
166
		$ip = trim(str_replace(array('(',')'),'',$elements[0]));
167
		$ndpent['mac'] = trim($elements[1]);
168
		$ndpent['interface'] = trim($elements[2]);
169
		$ndpdata[$ip] = $ndpent;
170
	}
171
}
172

    
173
$pools = array();
174
$leases = array();
175
$prefixes = array();
176
$mappings = array();
177
$i = 0;
178
$l = 0;
179
$p = 0;
180

    
181
// Put everything together again
182
while($i < $leases_count) {
183
	$entry = array();
184
	/* split the line by space */
185
	$duid_split = array();
186
	preg_match('/ia-.. "(.*)" { (.*)/ ', $leases_content[$i], $duid_split);
187
	if (!empty($duid_split[1])) {
188
		$iaid_duid = parse_duid($duid_split[1]);
189
		$entry['iaid'] = hexdec(implode("", array_reverse($iaid_duid[0])));
190
		$entry['duid'] = implode(":", $iaid_duid[1]);
191
		$data = explode(" ", $duid_split[2]);
192
	} else {
193
		$data = explode(" ", $leases_content[$i]);
194
	}
195
	/* walk the fields */
196
	$f = 0;
197
	$fcount = count($data);
198
	/* with less then 12 fields there is nothing useful */
199
	if($fcount < 12) {
200
		$i++;
201
		continue;
202
	}
203
	while($f < $fcount) {
204
		switch($data[$f]) {
205
			case "failover":
206
				$pools[$p]['name'] = $data[$f+2];
207
				$pools[$p]['mystate'] = $data[$f+7];
208
				$pools[$p]['peerstate'] = $data[$f+14];
209
				$pools[$p]['mydate'] = $data[$f+10];
210
				$pools[$p]['mydate'] .= " " . $data[$f+11];
211
				$pools[$p]['peerdate'] = $data[$f+17];
212
				$pools[$p]['peerdate'] .= " " . $data[$f+18];
213
				$p++;
214
				$i++;
215
				continue 3;
216
			case "ia-pd":
217
				$is_prefix = true;
218
			case "ia-na":
219
				$entry['iaid'] = $tmp_iaid;
220
				$entry['duid'] = $tmp_duid;
221
				if ($data[$f+1][0] == '"') {
222
					$duid = "";
223
					/* FIXME: This needs a safety belt to prevent an infinite loop */
224
					while ($data[$f][strlen($data[$f])-1] != '"') {
225
						$duid .= " " . $data[$f+1];
226
						$f++;
227
					}
228
					$entry['duid'] = $duid;
229
				} else {
230
					$entry['duid'] = $data[$f+1];
231
				}
232
				$entry['type'] = "dynamic";
233
				$f = $f+2;
234
				break;
235
			case "iaaddr":
236
				$entry['ip'] = $data[$f+1];
237
				$entry['type'] = "dynamic";
238
				if (in_array($entry['ip'], array_keys($ndpdata))) {
239
					$entry['online'] = 'online';
240
				} else {
241
					$entry['online'] = 'offline';
242
				}
243
				$f = $f+2;
244
				break;
245
			case "iaprefix":
246
				$is_prefix = true;
247
				$entry['prefix'] = $data[$f+1];
248
				$entry['type'] = "dynamic";
249
				$f = $f+2;
250
				break;
251
			case "starts":
252
				$entry['start'] = $data[$f+2];
253
				$entry['start'] .= " " . $data[$f+3];
254
				$f = $f+3;
255
				break;
256
			case "ends":
257
				$entry['end'] = $data[$f+2];
258
				$entry['end'] .= " " . $data[$f+3];
259
				$f = $f+3;
260
				break;
261
			case "tstp":
262
				$f = $f+3;
263
				break;
264
			case "tsfp":
265
				$f = $f+3;
266
				break;
267
			case "atsfp":
268
				$f = $f+3;
269
				break;
270
			case "cltt":
271
				$entry['start'] = $data[$f+2];
272
				$entry['start'] .= " " . $data[$f+3];
273
				$f = $f+3;
274
				break;
275
			case "binding":
276
				switch($data[$f+2]) {
277
					case "active":
278
						$entry['act'] = "active";
279
						break;
280
					case "free":
281
						$entry['act'] = "expired";
282
						$entry['online'] = "offline";
283
						break;
284
					case "backup":
285
						$entry['act'] = "reserved";
286
						$entry['online'] = "offline";
287
						break;
288
					case "released":
289
						$entry['act'] = "released";
290
						$entry['online'] = "offline";
291
				}
292
				$f = $f+1;
293
				break;
294
			case "next":
295
				/* skip the next binding statement */
296
				$f = $f+3;
297
				break;
298
			case "hardware":
299
				$f = $f+2;
300
				break;
301
			case "client-hostname":
302
				if($data[$f+1] <> "") {
303
					$entry['hostname'] = preg_replace('/"/','',$data[$f+1]);
304
				} else {
305
					$hostname = gethostbyaddr($entry['ip']);
306
					if($hostname <> "") {
307
						$entry['hostname'] = $hostname;
308
					}
309
				}
310
				$f = $f+1;
311
				break;
312
			case "uid":
313
				$f = $f+1;
314
				break;
315
		}
316
		$f++;
317
	}
318
	if ($is_prefix) {
319
		$prefixes[] = $entry;
320
	} else {
321
		$leases[] = $entry;
322
		$mappings[$entry['iaid'] . $entry['duid']] = $entry['ip'];
323
	}
324
	$l++;
325
	$i++;
326
	$is_prefix = false;
327
}
328

    
329
if(count($leases) > 0) {
330
	$leases = remove_duplicate($leases,"ip");
331
}
332

    
333
if(count($prefixes) > 0) {
334
	$prefixes = remove_duplicate($prefixes,"prefix");
335
}
336

    
337
if(count($pools) > 0) {
338
	$pools = remove_duplicate($pools,"name");
339
	asort($pools);
340
}
341

    
342
foreach($config['interfaces'] as $ifname => $ifarr) {
343
	if (is_array($config['dhcpdv6'][$ifname]) &&
344
		is_array($config['dhcpdv6'][$ifname]['staticmap'])) {
345
		foreach($config['dhcpdv6'][$ifname]['staticmap'] as $static) {
346
			$slease = array();
347
			$slease['ip'] = $static['ipaddrv6'];
348
			$slease['type'] = "static";
349
			$slease['duid'] = $static['duid'];
350
			$slease['start'] = "";
351
			$slease['end'] = "";
352
			$slease['hostname'] = htmlentities($static['hostname']);
353
			$slease['act'] = "static";
354
			if (in_array($slease['ip'], array_keys($ndpdata))) {
355
				$slease['online'] = 'online';
356
			} else {
357
				$slease['online'] = 'offline';
358
			}
359

    
360
			$leases[] = $slease;
361
		}
362
	}
363
}
364

    
365
if ($_GET['order'])
366
	usort($leases, "leasecmp");
367

    
368
/* only print pool status when we have one */
369
if(count($pools) > 0) {
370
?>
371
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
372
	<tr>
373
		<td class="listhdrr"><?=gettext("Failover Group"); ?></a></td>
374
		<td class="listhdrr"><?=gettext("My State"); ?></a></td>
375
		<td class="listhdrr"><?=gettext("Since"); ?></a></td>
376
		<td class="listhdrr"><?=gettext("Peer State"); ?></a></td>
377
		<td class="listhdrr"><?=gettext("Since"); ?></a></td>
378
	</tr>
379
<?php
380
foreach ($pools as $data) {
381
	echo "<tr>\n";
382
	echo "<td class=\"listlr\">{$fspans}{$data['name']}{$fspane}&nbsp;</td>\n";
383
	echo "<td class=\"listr\">{$fspans}{$data['mystate']}{$fspane}&nbsp;</td>\n";
384
	echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane}&nbsp;</td>\n";
385
	echo "<td class=\"listr\">{$fspans}{$data['peerstate']}{$fspane}&nbsp;</td>\n";
386
	echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane}&nbsp;</td>\n";
387
	echo "<td class=\"list\" valign=\"middle\" width=\"17\">&nbsp;</td>\n";
388
	echo "<td class=\"list\" valign=\"middle\" width=\"17\">&nbsp;</td>\n";
389
	echo "</tr>\n";
390
}
391

    
392
?>
393
</table>
394

    
395
<?php
396
/* only print pool status when we have one */
397
}
398
?>
399

    
400
<p>
401

    
402
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
403
  <tr>
404
    <td class="listhdrr"><a href="#"><?=gettext("IPv6 address"); ?></a></td>
405
    <td class="listhdrr"><a href="#"><?=gettext("IAID"); ?></a></td>
406
    <td class="listhdrr"><a href="#"><?=gettext("DUID"); ?></a></td>
407
    <td class="listhdrr"><a href="#"><?=gettext("Hostname/MAC"); ?></a></td>
408
    <td class="listhdrr"><a href="#"><?=gettext("Start"); ?></a></td>
409
    <td class="listhdrr"><a href="#"><?=gettext("End"); ?></a></td>
410
    <td class="listhdrr"><a href="#"><?=gettext("Online"); ?></a></td>
411
    <td class="listhdrr"><a href="#"><?=gettext("Lease Type"); ?></a></td>
412
	</tr>
413
<?php
414
foreach ($leases as $data) {
415
	if (($data['act'] == "active") || ($data['act'] == "static") || ($_GET['all'] == 1)) {
416
		if ($data['act'] != "active" && $data['act'] != "static") {
417
			$fspans = "<span class=\"gray\">";
418
			$fspane = "</span>";
419
		} else {
420
			$fspans = $fspane = "";
421
		}
422

    
423
		if ($data['act'] == "static") {
424
			foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) {
425
				if(is_array($dhcpifconf['staticmap'])) {
426
					foreach ($dhcpifconf['staticmap'] as $staticent) {
427
						if ($data['ip'] == $staticent['ipaddr']) {
428
							$data['if'] = $dhcpif;
429
							break;
430
						}
431
					}
432
				}
433
				/* exit as soon as we have an interface */
434
				if ($data['if'] != "")
435
					break;
436
			}
437
		} else {
438
			$data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip']));
439
		}
440
		echo "<tr>\n";
441
		echo "<td class=\"listlr\">{$fspans}{$data['ip']}{$fspane}&nbsp;</td>\n";
442
		echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane}&nbsp;</td>\n";
443
		echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane}&nbsp;</td>\n";
444
		echo "<td class=\"listr\">{$fspans}";
445
		if (!empty($data['hostname'])) {
446
			echo htmlentities($data['hostname']) . "<br/>";
447
		}
448
		echo htmlentities($ndpdata[$data['ip']]['mac']);
449
		echo "{$fspane}&nbsp;</td>\n";
450
		if ($data['type'] != "static") {
451
			echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}&nbsp;</td>\n";
452
			echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}&nbsp;</td>\n";
453
		} else {
454
			echo "<td class=\"listr\">{$fspans} n/a {$fspane}&nbsp;</td>\n";
455
			echo "<td class=\"listr\">{$fspans} n/a {$fspane}&nbsp;</td>\n";
456
		}
457
		echo "<td class=\"listr\">{$fspans}{$data['online']}{$fspane}&nbsp;</td>\n";
458
		echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane}&nbsp;</td>\n";
459

    
460
		if ($data['type'] == "dynamic") {
461
			echo "<td valign=\"middle\"><a href=\"services_dhcpv6_edit.php?if={$data['if']}&duid={$data['duid']}&hostname={$data['hostname']}\">";
462
			echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("add a static mapping for this MAC address") ."\"></a></td>\n";
463
		} else {
464
			echo "<td class=\"list\" valign=\"middle\">";
465
			echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_plus_mo.gif\" width=\"17\" height=\"17\" border=\"0\"></td>\n";
466
		}
467

    
468
		/* Only show the button for offline dynamic leases */
469
		if (($data['type'] == "dynamic") && ($data['online'] != "online")) {
470
			echo "<td class=\"list\" valign=\"middle\"><a href=\"status_dhcpv6_leases.php?deleteip={$data['ip']}&all=" . htmlspecialchars($_GET['all']) . "\">";
471
			echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("delete this DHCP lease") . "\"></a></td>\n";
472
		}
473
		echo "</tr>\n";
474
	}
475
}
476
?>
477
</table>
478
<p>
479
<h3>Delegated Prefixes</h3>
480
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
481
	<tr>
482
		<td class="listhdrr"><a href="#"><?=gettext("IPv6 Prefix"); ?></a></td>
483
		<td class="listhdrr"><a href="#"><?=gettext("IAID"); ?></a></td>
484
		<td class="listhdrr"><a href="#"><?=gettext("DUID"); ?></a></td>
485
		<td class="listhdrr"><a href="#"><?=gettext("Start"); ?></a></td>
486
		<td class="listhdrr"><a href="#"><?=gettext("End"); ?></a></td>
487
		<td class="listhdrr"><a href="#"><?=gettext("State"); ?></a></td>
488
	</tr>
489
<?php
490
foreach ($prefixes as $data) {
491
	if (($data['act'] == "active") || ($data['act'] == "static") || ($_GET['all'] == 1)) {
492
		if ($data['act'] != "active" && $data['act'] != "static") {
493
			$fspans = "<span class=\"gray\">";
494
			$fspane = "</span>";
495
		} else {
496
			$fspans = $fspane = "";
497
		}
498

    
499
		if ($data['act'] == "static") {
500
			foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) {
501
				if(is_array($dhcpifconf['staticmap'])) {
502
					foreach ($dhcpifconf['staticmap'] as $staticent) {
503
						if ($data['ip'] == $staticent['ipaddr']) {
504
							$data['if'] = $dhcpif;
505
							break;
506
						}
507
					}
508
				}
509
				/* exit as soon as we have an interface */
510
				if ($data['if'] != "")
511
					break;
512
			}
513
		} else {
514
			$data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip']));
515
		}
516
		echo "<tr>\n";
517
		if ($mappings[$data['iaid'] . $data['duid']]) {
518
			$dip = "<br/>Routed To: {$mappings[$data['iaid'] . $data['duid']]}";
519
		}
520
		echo "<td class=\"listlr\">{$fspans}{$data['prefix']}{$dip}{$fspane}&nbsp;</td>\n";
521
		echo "<td class=\"listr\">{$fspans}{$data['iaid']}{$fspane}&nbsp;</td>\n";
522
		echo "<td class=\"listr\">{$fspans}{$data['duid']}{$fspane}&nbsp;</td>\n";
523
		if ($data['type'] != "static") {
524
			echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}&nbsp;</td>\n";
525
			echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}&nbsp;</td>\n";
526
		} else {
527
			echo "<td class=\"listr\">{$fspans} n/a {$fspane}&nbsp;</td>\n";
528
			echo "<td class=\"listr\">{$fspans} n/a {$fspane}&nbsp;</td>\n";
529
		}
530
		echo "<td class=\"listr\">{$fspans}{$data['act']}{$fspane}&nbsp;</td>\n";
531
		echo "</tr>\n";
532
	}
533
}
534
?>
535
</table>
536
<p>
537
<form action="status_dhcpv6_leases.php" method="GET">
538
<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order']);?>">
539
<?php if ($_GET['all']): ?>
540
<input type="hidden" name="all" value="0">
541
<input type="submit" class="formbtn" value="<?=gettext("Show active and static leases only"); ?>">
542
<?php else: ?>
543
<input type="hidden" name="all" value="1">
544
<input type="submit" class="formbtn" value="<?=gettext("Show all configured leases"); ?>">
545
<?php endif; ?>
546
</form>
547
<?php if($leases == 0): ?>
548
<p><strong><?=gettext("No leases file found. Is the DHCP server active"); ?>?</strong></p>
549
<?php endif; ?>
550

    
551
<?php include("fend.inc"); ?>
552
</body>
553
</html>
(179-179/249)