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
|
All rights reserved.
|
8
|
|
9
|
Redistribution and use in source and binary forms, with or without
|
10
|
modification, are permitted provided that the following conditions are met:
|
11
|
|
12
|
1. Redistributions of source code must retain the above copyright notice,
|
13
|
this list of conditions and the following disclaimer.
|
14
|
|
15
|
2. Redistributions in binary form must reproduce the above copyright
|
16
|
notice, this list of conditions and the following disclaimer in the
|
17
|
documentation and/or other materials provided with the distribution.
|
18
|
|
19
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
21
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
22
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
23
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
POSSIBILITY OF SUCH DAMAGE.
|
29
|
*/
|
30
|
/*
|
31
|
pfSense_MODULE: dnsresolver
|
32
|
*/
|
33
|
|
34
|
##|+PRIV
|
35
|
##|*IDENT=page-services-unbound
|
36
|
##|*NAME=Services: DNS Resolver page
|
37
|
##|*DESCR=Allow access to the 'Services: DNS Resolver' page.
|
38
|
##|*MATCH=services_unbound.php*
|
39
|
##|-PRIV
|
40
|
|
41
|
require_once("guiconfig.inc");
|
42
|
require_once("unbound.inc");
|
43
|
|
44
|
if (!is_array($config['unbound'])) {
|
45
|
$config['unbound'] = array();
|
46
|
}
|
47
|
|
48
|
$a_unboundcfg =& $config['unbound'];
|
49
|
|
50
|
if (!is_array($config['unbound']['hosts'])) {
|
51
|
$config['unbound']['hosts'] = array();
|
52
|
}
|
53
|
|
54
|
$a_hosts =& $config['unbound']['hosts'];
|
55
|
|
56
|
if (!is_array($config['unbound']['domainoverrides'])) {
|
57
|
$config['unbound']['domainoverrides'] = array();
|
58
|
}
|
59
|
|
60
|
$a_domainOverrides = &$config['unbound']['domainoverrides'];
|
61
|
|
62
|
if (isset($config['unbound']['enable'])) {
|
63
|
$pconfig['enable'] = true;
|
64
|
}
|
65
|
if (isset($config['unbound']['dnssec'])) {
|
66
|
$pconfig['dnssec'] = true;
|
67
|
}
|
68
|
if (isset($config['unbound']['forwarding'])) {
|
69
|
$pconfig['forwarding'] = true;
|
70
|
}
|
71
|
if (isset($config['unbound']['regdhcp'])) {
|
72
|
$pconfig['regdhcp'] = true;
|
73
|
}
|
74
|
if (isset($config['unbound']['regdhcpstatic'])) {
|
75
|
$pconfig['regdhcpstatic'] = true;
|
76
|
}
|
77
|
if (isset($config['unbound']['txtsupport'])) {
|
78
|
$pconfig['txtsupport'] = true;
|
79
|
}
|
80
|
|
81
|
$pconfig['port'] = $config['unbound']['port'];
|
82
|
$pconfig['custom_options'] = $config['unbound']['custom_options'];
|
83
|
|
84
|
if (empty($config['unbound']['active_interface'])) {
|
85
|
$pconfig['active_interface'] = array();
|
86
|
} else {
|
87
|
$pconfig['active_interface'] = explode(",", $config['unbound']['active_interface']);
|
88
|
}
|
89
|
if (empty($config['unbound']['outgoing_interface'])) {
|
90
|
$pconfig['outgoing_interface'] = array();
|
91
|
} else {
|
92
|
$pconfig['outgoing_interface'] = explode(",", $config['unbound']['outgoing_interface']);
|
93
|
}
|
94
|
|
95
|
if ($_POST) {
|
96
|
$pconfig = $_POST;
|
97
|
unset($input_errors);
|
98
|
|
99
|
if ($_POST['apply']) {
|
100
|
$retval = services_unbound_configure();
|
101
|
$savemsg = get_std_save_message($retval);
|
102
|
if ($retval == 0) {
|
103
|
clear_subsystem_dirty('unbound');
|
104
|
}
|
105
|
/* Update resolv.conf in case the interface bindings exclude localhost. */
|
106
|
system_resolvconf_generate();
|
107
|
} else {
|
108
|
if (isset($_POST['enable']) && isset($config['dnsmasq']['enable'])) {
|
109
|
$input_errors[] = "The system dns-forwarder is still active. Disable it before enabling the DNS Resolver.";
|
110
|
}
|
111
|
|
112
|
if (empty($_POST['active_interface'])) {
|
113
|
$input_errors[] = "A single network interface needs to be selected for the DNS Resolver to bind to.";
|
114
|
}
|
115
|
|
116
|
if (empty($_POST['outgoing_interface'])) {
|
117
|
$input_errors[] = "A single outgoing network interface needs to be selected for the DNS Resolver to use for outgoing DNS requests.";
|
118
|
}
|
119
|
|
120
|
if ($_POST['port']) {
|
121
|
if (is_port($_POST['port'])) {
|
122
|
$a_unboundcfg['port'] = $_POST['port'];
|
123
|
} else {
|
124
|
$input_errors[] = gettext("You must specify a valid port number.");
|
125
|
}
|
126
|
} else if (isset($config['unbound']['port'])) {
|
127
|
unset($config['unbound']['port']);
|
128
|
}
|
129
|
|
130
|
if (isset($_POST['enable'])) {
|
131
|
$a_unboundcfg['enable'] = true;
|
132
|
} else {
|
133
|
unset($a_unboundcfg['enable']);
|
134
|
}
|
135
|
if (isset($_POST['dnssec'])) {
|
136
|
$a_unboundcfg['dnssec'] = true;
|
137
|
} else {
|
138
|
unset($a_unboundcfg['dnssec']);
|
139
|
}
|
140
|
if (isset($_POST['forwarding'])) {
|
141
|
$a_unboundcfg['forwarding'] = true;
|
142
|
} else {
|
143
|
unset($a_unboundcfg['forwarding']);
|
144
|
}
|
145
|
if (isset($_POST['regdhcp'])) {
|
146
|
$a_unboundcfg['regdhcp'] = true;
|
147
|
} else {
|
148
|
unset($a_unboundcfg['regdhcp']);
|
149
|
}
|
150
|
if (isset($_POST['regdhcpstatic'])) {
|
151
|
$a_unboundcfg['regdhcpstatic'] = true;
|
152
|
} else {
|
153
|
unset($a_unboundcfg['regdhcpstatic']);
|
154
|
}
|
155
|
if (isset($_POST['txtsupport'])) {
|
156
|
$a_unboundcfg['txtsupport'] = true;
|
157
|
} else {
|
158
|
unset($a_unboundcfg['txtsupport']);
|
159
|
}
|
160
|
if (is_array($_POST['active_interface']) && !empty($_POST['active_interface'])) {
|
161
|
$a_unboundcfg['active_interface'] = implode(",", $_POST['active_interface']);
|
162
|
}
|
163
|
|
164
|
if (is_array($_POST['outgoing_interface']) && !empty($_POST['outgoing_interface'])) {
|
165
|
$a_unboundcfg['outgoing_interface'] = implode(",", $_POST['outgoing_interface']);
|
166
|
}
|
167
|
|
168
|
$a_unboundcfg['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
|
169
|
|
170
|
if (!$input_errors) {
|
171
|
write_config("DNS Resolver configured.");
|
172
|
mark_subsystem_dirty('unbound');
|
173
|
}
|
174
|
}
|
175
|
}
|
176
|
|
177
|
if ($_GET['act'] == "del") {
|
178
|
if ($_GET['type'] == 'host') {
|
179
|
if ($a_hosts[$_GET['id']]) {
|
180
|
unset($a_hosts[$_GET['id']]);
|
181
|
write_config();
|
182
|
mark_subsystem_dirty('unbound');
|
183
|
header("Location: services_unbound.php");
|
184
|
exit;
|
185
|
}
|
186
|
} elseif ($_GET['type'] == 'doverride') {
|
187
|
if ($a_domainOverrides[$_GET['id']]) {
|
188
|
unset($a_domainOverrides[$_GET['id']]);
|
189
|
write_config();
|
190
|
mark_subsystem_dirty('unbound');
|
191
|
header("Location: services_unbound.php");
|
192
|
exit;
|
193
|
}
|
194
|
}
|
195
|
}
|
196
|
|
197
|
$closehead = false;
|
198
|
$pgtitle = array(gettext("Services"),gettext("DNS Resolver"));
|
199
|
include_once("head.inc");
|
200
|
|
201
|
?>
|
202
|
|
203
|
<script type="text/javascript">
|
204
|
//<![CDATA[
|
205
|
function enable_change(enable_over) {
|
206
|
var endis;
|
207
|
endis = !(jQuery('#enable').is(":checked") || enable_over);
|
208
|
jQuery("#active_interface,#outgoing_interface,#dnssec,#forwarding,#regdhcp,#regdhcpstatic,#dhcpfirst,#port,#txtsupport,#custom_options").prop('disabled', endis);
|
209
|
}
|
210
|
function show_advanced_dns() {
|
211
|
jQuery("#showadv").show();
|
212
|
jQuery("#showadvbox").hide();
|
213
|
}
|
214
|
//]]>
|
215
|
</script>
|
216
|
</head>
|
217
|
|
218
|
<body>
|
219
|
<?php include("fbegin.inc"); ?>
|
220
|
<form action="services_unbound.php" method="post" name="iform" id="iform">
|
221
|
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
222
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
223
|
<?php if (is_subsystem_dirty('unbound')): ?><br/>
|
224
|
<?php print_info_box_np(gettext("The configuration for the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
|
225
|
<?php endif; ?>
|
226
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="services unbound">
|
227
|
<tbody>
|
228
|
<tr>
|
229
|
<td class="tabnavtbl">
|
230
|
<?php
|
231
|
$tab_array = array();
|
232
|
$tab_array[] = array(gettext("General settings"), true, "services_unbound.php");
|
233
|
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
|
234
|
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
|
235
|
display_top_tabs($tab_array, true);
|
236
|
?>
|
237
|
</td>
|
238
|
</tr>
|
239
|
<tr>
|
240
|
<td id="mainarea">
|
241
|
<div class="tabcont">
|
242
|
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
|
243
|
<tbody>
|
244
|
<tr>
|
245
|
<td colspan="2" valign="top" class="listtopic"><?=gettext("General DNS Resolver Options");?></td>
|
246
|
</tr>
|
247
|
<tr>
|
248
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
|
249
|
<td width="78%" class="vtable"><p>
|
250
|
<input name="enable" type="checkbox" id="enable" value="yes" <?php if (isset($pconfig['enable'])) echo "checked=\"checked\"";?> onclick="enable_change(false)" />
|
251
|
<strong><?=gettext("Enable DNS Resolver");?><br />
|
252
|
</strong></p>
|
253
|
</td>
|
254
|
</tr>
|
255
|
<tr>
|
256
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Listen Port");?></td>
|
257
|
<td width="78%" class="vtable">
|
258
|
<p>
|
259
|
<input name="port" type="text" id="port" size="6" <?php if ($pconfig['port']) echo "value=\"{$pconfig['port']}\"";?> />
|
260
|
<br /><br />
|
261
|
<?=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.");?>
|
262
|
</p>
|
263
|
</td>
|
264
|
</tr>
|
265
|
<tr>
|
266
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Network Interfaces"); ?></td>
|
267
|
<td width="78%" class="vtable">
|
268
|
<?php
|
269
|
$interface_addresses = get_possible_listen_ips(true);
|
270
|
$size=count($interface_addresses)+1;
|
271
|
?>
|
272
|
<?=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.");?>
|
273
|
<br /><br />
|
274
|
<select id="active_interface" name="active_interface[]" multiple="multiple" size="3">
|
275
|
<option value="" <?php if (empty($pconfig['active_interface']) || empty($pconfig['active_interface'][0])) echo 'selected="selected"'; ?>>All</option>
|
276
|
<?php
|
277
|
foreach ($interface_addresses as $laddr):
|
278
|
$selected = "";
|
279
|
if (in_array($laddr['value'], $pconfig['active_interface']))
|
280
|
$selected = 'selected="selected"';
|
281
|
?>
|
282
|
<option value="<?=$laddr['value'];?>" <?=$selected;?>>
|
283
|
<?=htmlspecialchars($laddr['name']);?>
|
284
|
</option>
|
285
|
<?php endforeach; ?>
|
286
|
</select>
|
287
|
<br /><br />
|
288
|
</td>
|
289
|
</tr>
|
290
|
<tr>
|
291
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Outgoing Network Interfaces"); ?></td>
|
292
|
<td width="78%" class="vtable">
|
293
|
<?php
|
294
|
$interface_addresses = get_possible_listen_ips(true);
|
295
|
$size=count($interface_addresses)+1;
|
296
|
?>
|
297
|
<?=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.");?>
|
298
|
<br /><br />
|
299
|
<select id="outgoing_interface" name="outgoing_interface[]" multiple="multiple" size="3">
|
300
|
<option value="" <?php if (empty($pconfig['outgoing_interface']) || empty($pconfig['outgoing_interface'][0])) echo 'selected="selected"'; ?>>All</option>
|
301
|
<?php
|
302
|
foreach ($interface_addresses as $laddr):
|
303
|
$selected = "";
|
304
|
if (in_array($laddr['value'], $pconfig['outgoing_interface']))
|
305
|
$selected = 'selected="selected"';
|
306
|
?>
|
307
|
<option value="<?=$laddr['value'];?>" <?=$selected;?>>
|
308
|
<?=htmlspecialchars($laddr['name']);?>
|
309
|
</option>
|
310
|
<?php endforeach; ?>
|
311
|
</select>
|
312
|
<br /><br />
|
313
|
</td>
|
314
|
</tr>
|
315
|
<tr>
|
316
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("DNSSEC");?></td>
|
317
|
<td width="78%" class="vtable"><p>
|
318
|
<input name="dnssec" type="checkbox" id="dnssec" value="yes" <?php echo (isset($pconfig['dnssec']) ? "checked=\"checked\"" : "");?> />
|
319
|
<strong><?=gettext("Enable DNSSEC Support");?><br />
|
320
|
</strong></p>
|
321
|
</td>
|
322
|
</tr>
|
323
|
<tr>
|
324
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
|
325
|
<td width="78%" class="vtable"><p>
|
326
|
<input name="forwarding" type="checkbox" id="forwarding" value="yes" <?php echo (isset($pconfig['forwarding']) ? "checked=\"checked\"" : "");?> />
|
327
|
<strong><?=gettext("Enable Forwarding Mode");?></strong><br /></p>
|
328
|
</td>
|
329
|
</tr>
|
330
|
<tr>
|
331
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCP Registration");?></td>
|
332
|
<td width="78%" class="vtable"><p>
|
333
|
<input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if (isset($pconfig['regdhcp'])) echo "checked=\"checked\"";?> />
|
334
|
<strong><?=gettext("Register DHCP leases in the DNS Resolver");?><br />
|
335
|
</strong><?php printf(gettext("If this option is set, then machines that specify".
|
336
|
" their hostname when requesting a DHCP lease will be registered".
|
337
|
" in the DNS Resolver, so that their name can be resolved.".
|
338
|
" You should also set the domain in %sSystem:".
|
339
|
" General setup%s to the proper value."),'<a href="system.php">','</a>')?></p>
|
340
|
</td>
|
341
|
</tr>
|
342
|
<tr>
|
343
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Static DHCP");?></td>
|
344
|
<td width="78%" class="vtable"><p>
|
345
|
<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if (isset($pconfig['regdhcpstatic'])) echo "checked=\"checked\"";?> />
|
346
|
<strong><?=gettext("Register DHCP static mappings in the DNS Resolver");?><br />
|
347
|
</strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
|
348
|
"be registered in the DNS Resolver, so that their name can be ".
|
349
|
"resolved. You should also set the domain in %s".
|
350
|
"System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
|
351
|
</td>
|
352
|
</tr>
|
353
|
<tr>
|
354
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("TXT Comment Support");?></td>
|
355
|
<td width="78%" class="vtable"><p>
|
356
|
<input name="txtsupport" type="checkbox" id="txtsupport" value="yes" <?php echo (isset($pconfig['txtsupport']) ? "checked=\"checked\"" : "");?> />
|
357
|
<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 />
|
358
|
</strong></p>
|
359
|
</td>
|
360
|
</tr>
|
361
|
<tr>
|
362
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
|
363
|
<td width="78%" class="vtable">
|
364
|
<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
|
365
|
<input type="button" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
|
366
|
</div>
|
367
|
<div id="showadv" <?php if (empty($pconfig['custom_options'])) echo "style='display:none'"; ?>>
|
368
|
<strong><?=gettext("Advanced");?><br /></strong>
|
369
|
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=htmlspecialchars($pconfig['custom_options']);?></textarea><br />
|
370
|
<?=gettext("Enter any additional options you would like to add to the DNS Resolver configuration here, separated by a space or newline"); ?><br />
|
371
|
</div>
|
372
|
</td>
|
373
|
</tr>
|
374
|
<tr>
|
375
|
<td colspan="2">
|
376
|
<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" />
|
377
|
</td>
|
378
|
</tr>
|
379
|
</tbody>
|
380
|
</table>
|
381
|
</div>
|
382
|
</td>
|
383
|
</tr>
|
384
|
</tbody>
|
385
|
</table>
|
386
|
|
387
|
|
388
|
<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
|
389
|
</strong></span><?php printf(gettext("If the DNS Resolver is enabled, the DHCP".
|
390
|
" service (if enabled) will automatically serve the LAN IP".
|
391
|
" address as a DNS server to DHCP clients so they will use".
|
392
|
" the DNS Resolver. If Forwarding, is enabled, the DNS Resolver will use the DNS servers".
|
393
|
" entered in %sSystem: General setup%s".
|
394
|
" or those obtained via DHCP or PPP on WAN if the "Allow".
|
395
|
" DNS server list to be overridden by DHCP/PPP on WAN"".
|
396
|
" is checked."),'<a href="system.php">','</a>');?><br />
|
397
|
</span></p>
|
398
|
|
399
|
<br />
|
400
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont" summary="host overrides">
|
401
|
<tr>
|
402
|
<td colspan="5" valign="top" class="listtopic"><?=gettext("Host Overrides");?></td>
|
403
|
</tr>
|
404
|
<tr>
|
405
|
<td><br />
|
406
|
<?=gettext("Entries in this section override individual results from the forwarders.");?>
|
407
|
<?=gettext("Use these for changing DNS results or for adding custom DNS records.");?>
|
408
|
</td>
|
409
|
</tr>
|
410
|
</table>
|
411
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" summary="results">
|
412
|
<thead>
|
413
|
<tr>
|
414
|
<td width="20%" class="listhdrr"><?=gettext("Host");?></td>
|
415
|
<td width="25%" class="listhdrr"><?=gettext("Domain");?></td>
|
416
|
<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
|
417
|
<td width="30%" class="listhdr"><?=gettext("Description");?></td>
|
418
|
<td width="5%" class="list">
|
419
|
<table border="0" cellspacing="0" cellpadding="1" summary="add">
|
420
|
<tr>
|
421
|
<td width="17"></td>
|
422
|
<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>
|
423
|
</tr>
|
424
|
</table>
|
425
|
</td>
|
426
|
</tr>
|
427
|
</thead>
|
428
|
<tfoot>
|
429
|
<tr>
|
430
|
<td class="list" colspan="4"></td>
|
431
|
<td class="list">
|
432
|
<table border="0" cellspacing="0" cellpadding="1" summary="add">
|
433
|
<tr>
|
434
|
<td width="17"></td>
|
435
|
<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>
|
436
|
</tr>
|
437
|
</table>
|
438
|
</td>
|
439
|
</tr>
|
440
|
</tfoot>
|
441
|
<tbody>
|
442
|
<?php $i = 0; foreach ($a_hosts as $hostent): ?>
|
443
|
<tr>
|
444
|
<td class="listlr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
|
445
|
<?=strtolower($hostent['host']);?>
|
446
|
</td>
|
447
|
<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
|
448
|
<?=strtolower($hostent['domain']);?>
|
449
|
</td>
|
450
|
<td class="listr" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
|
451
|
<?=$hostent['ip'];?>
|
452
|
</td>
|
453
|
<td class="listbg" ondblclick="document.location='services_unbound_host_edit.php?id=<?=$i;?>';">
|
454
|
<?=htmlspecialchars($hostent['descr']);?>
|
455
|
</td>
|
456
|
<td valign="middle" class="list nowrap">
|
457
|
<table border="0" cellspacing="0" cellpadding="1" summary="icons">
|
458
|
<tr>
|
459
|
<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>
|
460
|
<td><a href="services_unbound.php?type=host&act=del&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>
|
461
|
</tr>
|
462
|
</table>
|
463
|
</tr>
|
464
|
<?php $i++; endforeach; ?>
|
465
|
<tr style="display:none"><td></td></tr>
|
466
|
</tbody>
|
467
|
</table>
|
468
|
<br />
|
469
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont" summary="domain overrides">
|
470
|
<tr>
|
471
|
<td colspan="5" valign="top" class="listtopic"><?=gettext("Domain Overrides");?></td>
|
472
|
</tr>
|
473
|
<tr>
|
474
|
<td><p><?=gettext("Entries in this area override an entire domain by specifying an".
|
475
|
" authoritative DNS server to be queried for that domain.");?></p></td>
|
476
|
</tr>
|
477
|
</table>
|
478
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" summary="results">
|
479
|
<thead>
|
480
|
<tr>
|
481
|
<td width="35%" class="listhdrr"><?=gettext("Domain");?></td>
|
482
|
<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
|
483
|
<td width="40%" class="listhdr"><?=gettext("Description");?></td>
|
484
|
<td width="5%" class="list">
|
485
|
<table border="0" cellspacing="0" cellpadding="1" summary="add">
|
486
|
<tr>
|
487
|
<td width="17" height="17"></td>
|
488
|
<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>
|
489
|
</tr>
|
490
|
</table>
|
491
|
</td>
|
492
|
</tr>
|
493
|
</thead>
|
494
|
<tfoot>
|
495
|
<tr>
|
496
|
<td class="list" colspan="3"></td>
|
497
|
<td class="list">
|
498
|
<table border="0" cellspacing="0" cellpadding="1" summary="add">
|
499
|
<tr>
|
500
|
<td width="17" height="17"></td>
|
501
|
<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>
|
502
|
</tr>
|
503
|
</table>
|
504
|
</td>
|
505
|
</tr>
|
506
|
</tfoot>
|
507
|
<tbody>
|
508
|
<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
|
509
|
<tr>
|
510
|
<td class="listlr">
|
511
|
<?=strtolower($doment['domain']);?>
|
512
|
</td>
|
513
|
<td class="listr">
|
514
|
<?=$doment['ip'];?>
|
515
|
</td>
|
516
|
<td class="listbg">
|
517
|
<?=htmlspecialchars($doment['descr']);?>
|
518
|
</td>
|
519
|
<td valign="middle" class="list nowrap">
|
520
|
<table border="0" cellspacing="0" cellpadding="1" summary="icons">
|
521
|
<tr>
|
522
|
<td valign="middle"><a href="services_unbound_domainoverride_edit.php?id=<?=$i;?>">
|
523
|
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" />
|
524
|
</a></td>
|
525
|
<td valign="middle"><a href="services_unbound.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')">
|
526
|
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
|
527
|
</a></td>
|
528
|
</tr>
|
529
|
</table>
|
530
|
</td>
|
531
|
</tr>
|
532
|
<?php $i++; endforeach; ?>
|
533
|
<tr style="display:none"><td></td></tr>
|
534
|
</tbody>
|
535
|
</table>
|
536
|
</form>
|
537
|
<script type="text/javascript">
|
538
|
//<![CDATA[
|
539
|
enable_change(false);
|
540
|
//]]>
|
541
|
</script>
|
542
|
<?php include("fend.inc"); ?>
|
543
|
</body>
|
544
|
</html>
|