Project

General

Profile

Download (22.4 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	services_unbound.php
5
	part of the pfSense project (https://www.pfsense.org)
6
	Copyright (C) 2014	Warren Baker (warren@pfsense.org)
7
        Copyright (C) 2013-2014 Electric Sheep Fencing, LP
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

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

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

    
35
##|+PRIV
36
##|*IDENT=page-services-unbound
37
##|*NAME=Services: DNS Resolver page
38
##|*DESCR=Allow access to the 'Services: DNS Resolver' page.
39
##|*MATCH=services_unbound.php*
40
##|-PRIV
41

    
42
require_once("guiconfig.inc");
43
require_once("unbound.inc");
44
require_once("system.inc");
45

    
46
if (!is_array($config['unbound'])) {
47
	$config['unbound'] = array();
48
}
49

    
50
$a_unboundcfg =& $config['unbound'];
51

    
52
if (!is_array($config['unbound']['hosts'])) {
53
	$config['unbound']['hosts'] = array();
54
}
55

    
56
$a_hosts =& $config['unbound']['hosts'];
57

    
58
if (!is_array($config['unbound']['domainoverrides'])) {
59
	$config['unbound']['domainoverrides'] = array();
60
}
61

    
62
$a_domainOverrides = &$config['unbound']['domainoverrides'];
63

    
64
if (isset($config['unbound']['enable'])) {
65
	$pconfig['enable'] = true;
66
}
67
if (isset($config['unbound']['dnssec'])) {
68
	$pconfig['dnssec'] = true;
69
}
70
if (isset($config['unbound']['forwarding'])) {
71
	$pconfig['forwarding'] = true;
72
}
73
if (isset($config['unbound']['regdhcp'])) {
74
	$pconfig['regdhcp'] = true;
75
}
76
if (isset($config['unbound']['regdhcpstatic'])) {
77
	$pconfig['regdhcpstatic'] = true;
78
}
79
if (isset($config['unbound']['txtsupport'])) {
80
	$pconfig['txtsupport'] = true;
81
}
82

    
83
$pconfig['port'] = $config['unbound']['port'];
84
$pconfig['custom_options'] = $config['unbound']['custom_options'];
85

    
86
if (empty($config['unbound']['active_interface'])) {
87
	$pconfig['active_interface'] = array();
88
} else {
89
	$pconfig['active_interface'] = explode(",", $config['unbound']['active_interface']);
90
}
91
if (empty($config['unbound']['outgoing_interface'])) {
92
	$pconfig['outgoing_interface'] = array();
93
} else {
94
	$pconfig['outgoing_interface'] = explode(",", $config['unbound']['outgoing_interface']);
95
}
96

    
97
if ($_POST) {
98
	$pconfig = $_POST;
99
	unset($input_errors);
100

    
101
	if ($_POST['apply']) {
102
		$retval = services_unbound_configure();
103
		$savemsg = get_std_save_message($retval);
104
		if ($retval == 0) {
105
			clear_subsystem_dirty('unbound');
106
		}
107
		/* Update resolv.conf in case the interface bindings exclude localhost. */
108
		system_resolvconf_generate();
109
		/* Start or restart dhcpleases when it's necessary */
110
		system_dhcpleases_configure();
111
	} else {
112
		if (isset($_POST['enable']) && isset($config['dnsmasq']['enable'])) {
113
			$input_errors[] = "The DNS Forwarder is enabled. Disable it before enabling the DNS Resolver.";
114
		}
115

    
116
		if (empty($_POST['active_interface'])) {
117
			$input_errors[] = "One or more Network Interfaces must be selected for binding.";
118
		}
119

    
120
		if (empty($_POST['outgoing_interface'])) {
121
			$input_errors[] = "One or more Outgoing Network Interfaces must be selected.";
122
		}
123

    
124
		if ($_POST['port']) {
125
			if (is_port($_POST['port'])) {
126
				$a_unboundcfg['port'] = $_POST['port'];
127
			} else {
128
				$input_errors[] = gettext("You must specify a valid port number.");
129
			}
130
		} else if (isset($config['unbound']['port'])) {
131
			unset($config['unbound']['port']);
132
		}
133

    
134
		if (isset($_POST['enable'])) {
135
			$a_unboundcfg['enable'] = true;
136
		} else {
137
			unset($a_unboundcfg['enable']);
138
		}
139
		if (isset($_POST['dnssec'])) {
140
			$a_unboundcfg['dnssec'] = true;
141
		} else {
142
			unset($a_unboundcfg['dnssec']);
143
		}
144
		if (isset($_POST['forwarding'])) {
145
			$a_unboundcfg['forwarding'] = true;
146
		} else {
147
			unset($a_unboundcfg['forwarding']);
148
		}
149
		if (isset($_POST['regdhcp'])) {
150
			$a_unboundcfg['regdhcp'] = true;
151
		} else {
152
			unset($a_unboundcfg['regdhcp']);
153
		}
154
		if (isset($_POST['regdhcpstatic'])) {
155
			$a_unboundcfg['regdhcpstatic'] = true;
156
		} else {
157
			unset($a_unboundcfg['regdhcpstatic']);
158
		}
159
		if (isset($_POST['txtsupport'])) {
160
			$a_unboundcfg['txtsupport'] = true;
161
		} else {
162
			unset($a_unboundcfg['txtsupport']);
163
		}
164
		if (is_array($_POST['active_interface']) && !empty($_POST['active_interface'])) {
165
			$a_unboundcfg['active_interface'] = implode(",", $_POST['active_interface']);
166
		}
167

    
168
		if (is_array($_POST['outgoing_interface']) && !empty($_POST['outgoing_interface'])) {
169
			$a_unboundcfg['outgoing_interface'] = implode(",", $_POST['outgoing_interface']);
170
		}
171

    
172
		$a_unboundcfg['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
173

    
174
		if (!$input_errors) {
175
			write_config("DNS Resolver configured.");
176
			mark_subsystem_dirty('unbound');
177
		}
178
	}
179
}
180

    
181
if ($_GET['act'] == "del") {
182
	if ($_GET['type'] == 'host') {
183
		if ($a_hosts[$_GET['id']]) {
184
			unset($a_hosts[$_GET['id']]);
185
			write_config();
186
			mark_subsystem_dirty('unbound');
187
			header("Location: services_unbound.php");
188
			exit;
189
		}
190
	} elseif ($_GET['type'] == 'doverride') {
191
		if ($a_domainOverrides[$_GET['id']]) {
192
			unset($a_domainOverrides[$_GET['id']]);
193
			write_config();
194
			mark_subsystem_dirty('unbound');
195
			header("Location: services_unbound.php");
196
			exit;
197
		}
198
	}
199
}
200

    
201
$closehead = false;
202
$pgtitle = array(gettext("Services"),gettext("DNS Resolver"));
203
include_once("head.inc");
204

    
205
?>
206

    
207
<script type="text/javascript">
208
//<![CDATA[
209
function enable_change(enable_over) {
210
	var endis;
211
	endis = !(jQuery('#enable').is(":checked") || enable_over);
212
	jQuery("#active_interface,#outgoing_interface,#dnssec,#forwarding,#regdhcp,#regdhcpstatic,#dhcpfirst,#port,#txtsupport,#custom_options").prop('disabled', endis);
213
}
214
function show_advanced_dns() {
215
	jQuery("#showadv").show();
216
	jQuery("#showadvbox").hide();
217
}
218
//]]>
219
</script>
220
</head>
221

    
222
<body>
223
<?php include("fbegin.inc"); ?>
224
<form action="services_unbound.php" method="post" name="iform" id="iform">
225
<?php if ($input_errors) print_input_errors($input_errors); ?>
226
<?php if ($savemsg) print_info_box($savemsg); ?>
227
<?php if (is_subsystem_dirty('unbound')): ?><br/>
228
<?php print_info_box_np(gettext("The configuration of the DNS Resolver has been changed") . ".<br />" . gettext("You must apply changes for them to take effect."));?><br />
229
<?php endif; ?>
230
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="services unbound">
231
	<tbody>
232
		<tr>
233
			<td class="tabnavtbl">
234
				<?php
235
					$tab_array = array();
236
					$tab_array[] = array(gettext("General settings"), true, "services_unbound.php");
237
					$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
238
					$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
239
					display_top_tabs($tab_array, true);
240
				?>
241
			</td>
242
		</tr>
243
		<tr>
244
			<td id="mainarea">
245
				<div class="tabcont">
246
					<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
247
						<tbody>
248
							<tr>
249
								<td colspan="2" valign="top" class="listtopic"><?=gettext("General DNS Resolver Options");?></td>
250
							</tr>
251
							<tr>
252
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
253
								<td width="78%" class="vtable"><p>
254
									<input name="enable" type="checkbox" id="enable" value="yes" <?php if (isset($pconfig['enable'])) echo "checked=\"checked\"";?> onclick="enable_change(false)" />
255
									<strong><?=gettext("Enable DNS Resolver");?><br />
256
									</strong></p>
257
								</td>
258
							</tr>
259
							<tr>
260
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Listen Port");?></td>
261
								<td width="78%" class="vtable">
262
									<p>
263
										<input name="port" type="text" id="port" size="6" <?php if ($pconfig['port']) echo "value=\"{$pconfig['port']}\"";?> />
264
										<br /><br />
265
										<?=gettext("The port used for responding to DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 53.");?>
266
									</p>
267
								</td>
268
							</tr>
269
							<tr>
270
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Network Interfaces"); ?></td>
271
								<td width="78%" class="vtable">
272
									<?php
273
										$interface_addresses = get_possible_listen_ips(true);
274
										$size=count($interface_addresses)+1;
275
									?>
276
									<?=gettext("Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. The default behavior is to respond to queries on every available IPv4 and IPv6 address.");?>
277
									<br /><br />
278
									<select id="active_interface" name="active_interface[]" multiple="multiple" size="<?php echo $size; ?>">
279
										<option value="" <?php if (empty($pconfig['active_interface']) || empty($pconfig['active_interface'][0])) echo 'selected="selected"'; ?>>All</option>
280
										<?php
281
											foreach ($interface_addresses as $laddr):
282
												$selected = "";
283
												if (in_array($laddr['value'], $pconfig['active_interface']))
284
													$selected = 'selected="selected"';
285
										?>
286
										<option value="<?=$laddr['value'];?>" <?=$selected;?>>
287
											<?=htmlspecialchars($laddr['name']);?>
288
										</option>
289
										<?php endforeach; ?>
290
									</select>
291
									<br /><br />
292
								</td>
293
							</tr>
294
							<tr>
295
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Outgoing Network Interfaces"); ?></td>
296
								<td width="78%" class="vtable">
297
									<?php
298
										$interface_addresses = get_possible_listen_ips(true);
299
										$size=count($interface_addresses)+1;
300
									?>
301
									<?=gettext("Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.");?>
302
									<br /><br />
303
									<select id="outgoing_interface" name="outgoing_interface[]" multiple="multiple" size="<?php echo $size; ?>">
304
										<option value="" <?php if (empty($pconfig['outgoing_interface']) || empty($pconfig['outgoing_interface'][0])) echo 'selected="selected"'; ?>>All</option>
305
										<?php
306
											foreach ($interface_addresses as $laddr):
307
												$selected = "";
308
												if (in_array($laddr['value'], $pconfig['outgoing_interface']))
309
												$selected = 'selected="selected"';
310
										?>
311
										<option value="<?=$laddr['value'];?>" <?=$selected;?>>
312
											<?=htmlspecialchars($laddr['name']);?>
313
										</option>
314
										<?php endforeach; ?>
315
									</select>
316
									<br /><br />
317
								</td>
318
							</tr>
319
							<tr>
320
								<td width="22%" valign="top" class="vncellreq"><?=gettext("DNSSEC");?></td>
321
								<td width="78%" class="vtable"><p>
322
									<input name="dnssec" type="checkbox" id="dnssec" value="yes" <?php echo (isset($pconfig['dnssec']) ? "checked=\"checked\"" : "");?> />
323
									<strong><?=gettext("Enable DNSSEC Support");?><br />
324
									</strong></p>
325
								</td>
326
							</tr>
327
							<tr>
328
								<td width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
329
								<td width="78%" class="vtable"><p>
330
									<input name="forwarding" type="checkbox" id="forwarding" value="yes" <?php echo (isset($pconfig['forwarding']) ? "checked=\"checked\"" : "");?> />
331
									<strong><?=gettext("Enable Forwarding Mode");?></strong><br /></p>
332
								</td>
333
							</tr>
334
							<tr>
335
								<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCP Registration");?></td>
336
								<td width="78%" class="vtable"><p>
337
									<input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if (isset($pconfig['regdhcp'])) echo "checked=\"checked\"";?> />
338
									<strong><?=gettext("Register DHCP leases in the DNS Resolver");?><br />
339
									</strong><?php printf(gettext("If this option is set, then machines that specify".
340
									" their hostname when requesting a DHCP lease will be registered".
341
									" in the DNS Resolver, so that their name can be resolved.".
342
									" You should also set the domain in %sSystem:".
343
									" General setup%s to the proper value."),'<a href="system.php">','</a>')?></p>
344
								</td>
345
							</tr>
346
							<tr>
347
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Static DHCP");?></td>
348
								<td width="78%" class="vtable"><p>
349
									<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if (isset($pconfig['regdhcpstatic'])) echo "checked=\"checked\"";?> />
350
									<strong><?=gettext("Register DHCP static mappings in the DNS Resolver");?><br />
351
									</strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
352
											"be registered in the DNS Resolver, so that their name can be ".
353
											"resolved. You should also set the domain in %s".
354
											"System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
355
								</td>
356
							</tr>
357
							<tr>
358
								<td width="22%" valign="top" class="vncellreq"><?=gettext("TXT Comment Support");?></td>
359
								<td width="78%" class="vtable"><p>
360
									<input name="txtsupport" type="checkbox" id="txtsupport" value="yes" <?php echo (isset($pconfig['txtsupport']) ? "checked=\"checked\"" : "");?> />
361
									<strong><?=gettext("If this option is set, then any descriptions associated with Host entries and DHCP Static mappings will create a corresponding TXT record.");?><br />
362
									</strong></p>
363
								</td>
364
							</tr>
365
							<tr>
366
								<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
367
								<td width="78%" class="vtable">
368
									<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
369
										<input type="button" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
370
									</div>
371
									<div id="showadv" <?php if (empty($pconfig['custom_options'])) echo "style='display:none'"; ?>>
372
										<strong><?=gettext("Advanced");?><br /></strong>
373
										<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=htmlspecialchars($pconfig['custom_options']);?></textarea><br />
374
										<?=gettext("Enter any additional configuration parameters to add to the DNS Resolver configuration here, separated by a newline"); ?><br />
375
									</div>
376
								</td>
377
							</tr>
378
							<tr>
379
								<td colspan="2">
380
									<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" />
381
								</td>
382
							</tr>
383
						</tbody>
384
					</table>
385
				</div>
386
			</td>
387
		</tr>
388
	</tbody>
389
</table>
390

    
391

    
392
<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
393
</strong></span><?php printf(gettext("If the DNS Resolver is enabled, the DHCP".
394
" service (if enabled) will automatically serve the LAN IP".
395
" address as a DNS server to DHCP clients so they will use".
396
" the DNS Resolver. If Forwarding, is enabled, the DNS Resolver will use the DNS servers".
397
" entered in %sSystem: General setup%s".
398
" or those obtained via DHCP or PPP on WAN if the &quot;Allow".
399
" DNS server list to be overridden by DHCP/PPP on WAN&quot;".
400
" is checked."),'<a href="system.php">','</a>');?><br />
401
</span></p>
402

    
403
&nbsp;<br />
404
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont" summary="host overrides">
405
<tr>
406
	<td colspan="5" valign="top" class="listtopic"><?=gettext("Host Overrides");?></td>
407
</tr>
408
<tr>
409
	<td><br />
410
	<?=gettext("Entries in this section override individual results from the forwarders.");?>
411
	<?=gettext("Use these for changing DNS results or for adding custom DNS records.");?>
412
	</td>
413
</tr>
414
</table>
415
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" summary="results">
416
	<thead>
417
	<tr>
418
		<td width="20%" class="listhdrr"><?=gettext("Host");?></td>
419
		<td width="25%" class="listhdrr"><?=gettext("Domain");?></td>
420
		<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
421
		<td width="30%" class="listhdr"><?=gettext("Description");?></td>
422
		<td width="5%" class="list">
423
			<table border="0" cellspacing="0" cellpadding="1" summary="add">
424
				<tr>
425
					<td width="17"></td>
426
					<td valign="middle"><a href="services_unbound_host_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
427
				</tr>
428
			</table>
429
		</td>
430
	</tr>
431
	</thead>
432
	<tfoot>
433
	<tr>
434
		<td class="list" colspan="4"></td>
435
		<td class="list">
436
			<table border="0" cellspacing="0" cellpadding="1" summary="add">
437
				<tr>
438
					<td width="17"></td>
439
					<td valign="middle"><a href="services_unbound_host_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
440
				</tr>
441
			</table>
442
		</td>
443
	</tr>
444
	</tfoot>
445
	<tbody>
446
	<?php $i = 0; foreach ($a_hosts as $hostent): ?>
447
	<tr>
448
		<td class="listlr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
449
			<?=strtolower($hostent['host']);?>&nbsp;
450
		</td>
451
		<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
452
			<?=strtolower($hostent['domain']);?>&nbsp;
453
		</td>
454
		<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
455
			<?=$hostent['ip'];?>&nbsp;
456
		</td>
457
		<td class="listbg" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
458
			<?=htmlspecialchars($hostent['descr']);?>&nbsp;
459
		</td>
460
		<td valign="middle" class="list nowrap">
461
			<table border="0" cellspacing="0" cellpadding="1" summary="icons">
462
				<tr>
463
					<td valign="middle"><a href="services_unbound_host_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td>
464
					<td><a href="services_unbound.php?type=host&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td>
465
				</tr>
466
			</table>
467
	</tr>
468
	<?php if ($hostent['aliases']['item'] && is_array($hostent['aliases']['item'])): ?>
469
	<?php foreach ($hostent['aliases']['item'] as $alias): ?>
470
	<tr>
471
		<td class="listlr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
472
			<?=strtolower($alias['host']);?>&nbsp;
473
		</td>
474
		<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
475
			<?=strtolower($alias['domain']);?>&nbsp;
476
		</td>
477
		<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
478
			Alias for <?=$hostent['host'] ? $hostent['host'] . '.' . $hostent['domain'] : $hostent['domain'];?>&nbsp;
479
		</td>
480
		<td class="listbg" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
481
			<?=htmlspecialchars($alias['description']);?>&nbsp;
482
		</td>
483
		<td valign="middle" class="list nowrap">
484
			<a href="services_unbound_host_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a>
485
		</td>
486
	</tr>
487
	<?php endforeach; ?>
488
	<?php endif; ?>
489
	<?php $i++; endforeach; ?>
490
	<tr style="display:none"><td></td></tr>
491
	</tbody>
492
</table>
493
<br />
494
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont" summary="domain overrides">
495
<tr>
496
	<td colspan="5" valign="top" class="listtopic"><?=gettext("Domain Overrides");?></td>
497
</tr>
498
<tr>
499
	<td><p><?=gettext("Entries in this area override an entire domain by specifying an".
500
	" authoritative DNS server to be queried for that domain.");?></p></td>
501
</tr>
502
</table>
503
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" summary="results">
504
	<thead>
505
	<tr>
506
		<td width="35%" class="listhdrr"><?=gettext("Domain");?></td>
507
		<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
508
		<td width="40%" class="listhdr"><?=gettext("Description");?></td>
509
		<td width="5%" class="list">
510
			<table border="0" cellspacing="0" cellpadding="1" summary="add">
511
				<tr>
512
					<td width="17" height="17"></td>
513
					<td><a href="services_unbound_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
514
				</tr>
515
			</table>
516
		</td>
517
	</tr>
518
	</thead>
519
	<tfoot>
520
	<tr>
521
		<td class="list" colspan="3"></td>
522
		<td class="list">
523
		<table border="0" cellspacing="0" cellpadding="1" summary="add">
524
			<tr>
525
				<td width="17" height="17"></td>
526
				<td><a href="services_unbound_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td>
527
			</tr>
528
		</table>
529
		</td>
530
	</tr>
531
	</tfoot>
532
	<tbody>
533
	<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
534
	<tr>
535
		<td class="listlr">
536
			<?=strtolower($doment['domain']);?>&nbsp;
537
		</td>
538
		<td class="listr">
539
			<?=$doment['ip'];?>&nbsp;
540
		</td>
541
		<td class="listbg">
542
			<?=htmlspecialchars($doment['descr']);?>&nbsp;
543
		</td>
544
		<td valign="middle" class="list nowrap">
545
			<table border="0" cellspacing="0" cellpadding="1" summary="icons">
546
				<tr>
547
					<td valign="middle"><a href="services_unbound_domainoverride_edit.php?id=<?=$i;?>">
548
						<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" />
549
					</a></td>
550
					<td valign="middle"><a href="services_unbound.php?act=del&amp;type=doverride&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')">
551
						<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
552
					</a></td>
553
				</tr>
554
			</table>
555
		</td>
556
	</tr>
557
	<?php $i++; endforeach; ?>
558
	<tr style="display:none"><td></td></tr>
559
	</tbody>
560
</table>
561
</form>
562
<script type="text/javascript">
563
//<![CDATA[
564
enable_change(false);
565
//]]>
566
</script>
567
<?php include("fend.inc"); ?>
568
</body>
569
</html>
(170-170/256)