Projet

Général

Profil

Télécharger (20,7 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / services_dnsmasq.php @ 52c67bc2

1
<?php
2
/* $Id$ */
3
/*
4
	services_dnsmasq.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6

    
7
	Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
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:	dnsforwarder
33
*/
34

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

    
42
require("guiconfig.inc");
43
require_once("functions.inc");
44
require_once("filter.inc");
45
require_once("shaper.inc");
46

    
47
$pconfig['enable'] = isset($config['dnsmasq']['enable']);
48
$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']);
49
$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']);
50
$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']);
51
$pconfig['strict_order'] = isset($config['dnsmasq']['strict_order']);
52
$pconfig['domain_needed'] = isset($config['dnsmasq']['domain_needed']);
53
$pconfig['no_private_reverse'] = isset($config['dnsmasq']['no_private_reverse']);
54
$pconfig['port'] = $config['dnsmasq']['port'];
55
$pconfig['custom_options'] = $config['dnsmasq']['custom_options'];
56

    
57
$pconfig['strictbind'] = isset($config['dnsmasq']['strictbind']);
58
if (!empty($config['dnsmasq']['interface']))
59
	$pconfig['interface'] = explode(",", $config['dnsmasq']['interface']);
60
else
61
	$pconfig['interface'] = array();
62

    
63
if (!is_array($config['dnsmasq']['hosts']))
64
	$config['dnsmasq']['hosts'] = array();
65

    
66
if (!is_array($config['dnsmasq']['domainoverrides']))
67
	$config['dnsmasq']['domainoverrides'] = array();
68

    
69

    
70
$a_hosts = &$config['dnsmasq']['hosts'];
71
$a_domainOverrides = &$config['dnsmasq']['domainoverrides'];
72

    
73
if ($_POST) {
74

    
75
	$pconfig = $_POST;
76
	unset($input_errors);
77

    
78
	$config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
79
	$config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
80
	$config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
81
	$config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
82
	$config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false;
83
	$config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false;
84
	$config['dnsmasq']['no_private_reverse'] = ($_POST['no_private_reverse']) ? true : false;
85
	$config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
86
	$config['dnsmasq']['strictbind'] = ($_POST['strictbind']) ? true : false;
87

    
88
	if ($_POST['port'])
89
		if(is_port($_POST['port']))
90
			$config['dnsmasq']['port'] = $_POST['port'];
91
		else
92
			$input_errors[] = gettext("You must specify a valid port number");
93
	else if (isset($config['dnsmasq']['port']))
94
		unset($config['dnsmasq']['port']);
95

    
96
	if (is_array($_POST['interface']))
97
		$config['dnsmasq']['interface'] = implode(",", $_POST['interface']);
98
	elseif (isset($config['dnsmasq']['interface']))
99
		unset($config['dnsmasq']['interface']);
100

    
101
	if ($config['dnsmasq']['custom_options']) {
102
		$args = '';
103
		foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c)
104
			$args .= escapeshellarg("--{$c}") . " ";
105
		exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc);
106
		if ($rc != 0)
107
			$input_errors[] = gettext("Invalid custom options");
108
	}
109

    
110
	if (!$input_errors) {
111
		write_config();
112

    
113
		$retval = 0;
114
		$retval = services_dnsmasq_configure();
115
		$savemsg = get_std_save_message($retval);
116

    
117
		// Relaod filter (we might need to sync to CARP hosts)
118
		filter_configure();
119

    
120
		if ($retval == 0)
121
			clear_subsystem_dirty('hosts');
122
	}
123
}
124

    
125
if ($_GET['act'] == "del") {
126
	if ($_GET['type'] == 'host') {
127
		if ($a_hosts[$_GET['id']]) {
128
			unset($a_hosts[$_GET['id']]);
129
			write_config();
130
			mark_subsystem_dirty('hosts');
131
			header("Location: services_dnsmasq.php");
132
			exit;
133
		}
134
	}
135
	elseif ($_GET['type'] == 'doverride') {
136
		if ($a_domainOverrides[$_GET['id']]) {
137
			unset($a_domainOverrides[$_GET['id']]);
138
			write_config();
139
			mark_subsystem_dirty('hosts');
140
			header("Location: services_dnsmasq.php");
141
			exit;
142
		}
143
	}
144
}
145

    
146
$pgtitle = array(gettext("Services"),gettext("DNS forwarder"));
147
$shortcut_section = "resolver";
148
include("head.inc");
149

    
150
?>
151

    
152
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
153

    
154
<script type="text/JavaScript">
155
<!--
156
function enable_change(enable_over) {
157
	var endis;
158
	endis = !(document.iform.enable.checked || enable_over);
159
	document.iform.regdhcp.disabled = endis;
160
	document.iform.regdhcpstatic.disabled = endis;
161
	document.iform.dhcpfirst.disabled = endis;
162
}
163
function show_advanced_dns() {
164
	document.getElementById("showadvbox").innerHTML='';
165
	aodiv = document.getElementById('showadv');
166
	aodiv.style.display = "block";
167
}
168
//-->
169
</script>
170

    
171
<?php include("fbegin.inc"); ?>
172
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
173
<?php if ($input_errors) print_input_errors($input_errors); ?>
174
<?php if ($savemsg) print_info_box($savemsg); ?>
175
<?php if (is_subsystem_dirty('hosts')): ?><p>
176
<?php print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
177
<?php endif; ?>
178
<table width="100%" border="0" cellpadding="6" cellspacing="0">
179
	<tr>
180
		<td colspan="2" valign="top" class="listtopic"><?=gettext("General DNS Forwarder Options");?></td>
181
	</tr>
182
	<tr>
183
		<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
184
		<td width="78%" class="vtable"><p>
185
			<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked=\"checked\"";?> onclick="enable_change(false)"/>
186
			<strong><?=gettext("Enable DNS forwarder");?><br />
187
			</strong></p></td>
188
		</tr>
189
	<tr>
190
		<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCP Registration");?></td>
191
		<td width="78%" class="vtable"><p>
192
			<input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if ($pconfig['regdhcp'] == "yes") echo "checked=\"checked\"";?>/>
193
			<strong><?=gettext("Register DHCP leases in DNS forwarder");?><br />
194
			</strong><?php printf(gettext("If this option is set, then machines that specify".
195
			" their hostname when requesting a DHCP lease will be registered".
196
			" in the DNS forwarder, so that their name can be resolved.".
197
			" You should also set the domain in %sSystem:".
198
			" General setup%s to the proper value."),'<a href="system.php">','</a>')?></p>
199
		</td>
200
	</tr>
201
	<tr>
202
		<td width="22%" valign="top" class="vncellreq"><?=gettext("Static DHCP");?></td>
203
		<td width="78%" class="vtable"><p>
204
			<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked=\"checked\"";?>/>
205
			<strong><?=gettext("Register DHCP static mappings in DNS forwarder");?><br />
206
			</strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
207
					"be registered in the DNS forwarder, so that their name can be ".
208
					"resolved. You should also set the domain in %s".
209
					"System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
210
		</td>
211
	</tr>
212
	<tr>
213
		<td width="22%" valign="top" class="vncellreq"><?=gettext("Prefer DHCP");?></td>
214
		<td width="78%" class="vtable"><p>
215
			<input name="dhcpfirst" type="checkbox" id="dhcpfirst" value="yes" <?php if ($pconfig['dhcpfirst'] == "yes") echo "checked=\"checked\"";?>/>
216
			<strong><?=gettext("Resolve DHCP mappings first");?><br />
217
			</strong><?php printf(gettext("If this option is set, then DHCP mappings will ".
218
					"be resolved before the manual list of names below. This only ".
219
					"affects the name given for a reverse lookup (PTR)."));?></p>
220
		</td>
221
	</tr>
222
	<tr>
223
		<td rowspan="3" width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
224
		<td width="78%" class="vtable"><p>
225
			<input name="strict_order" type="checkbox" id="strict_order" value="yes" <?php if ($pconfig['strict_order'] == "yes") echo "checked=\"checked\"";?>/>
226
			<strong><?=gettext("Query DNS servers sequentially");?><br />
227
			</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
228
					"query the DNS servers sequentially in the order specified (<i>System - General Setup - DNS Servers</i>), ".
229
					"rather than all at once in parallel. ".
230
					""), $g['product_name']); ?></p>
231
		</td>
232
	</tr>
233
	<tr>
234
		<td width="78%" class="vtable"><p>
235
			<input name="domain_needed" type="checkbox" id="domain_needed" value="yes" <?php if ($pconfig['domain_needed'] == "yes") echo "checked=\"checked\"";?>/>
236
			<strong><?=gettext("Require domain");?><br />
237
			</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
238
					"not forward A or AAAA queries for plain names, without dots or domain parts, to upstream name servers.  ".
239
					"If the name is not known from /etc/hosts or DHCP then a \"not found\" answer is returned. ".
240
					""), $g['product_name']); ?></p>
241
		</td>
242
	</tr>
243
	<tr>
244
		<td width="78%" class="vtable"><p>
245
			<input name="no_private_reverse" type="checkbox" id="no_private_reverse" value="yes" <?php if ($pconfig['no_private_reverse'] == "yes") echo "checked=\"checked\"";?>/>
246
			<strong><?=gettext("Do not forward private reverse lookups");?><br />
247
			</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
248
					"not forward reverse DNS lookups (PTR) for private addresses (RFC 1918) to upstream name servers.  ".
249
					"Any entries in the Domain Overrides section forwarding private \"n.n.n.in-addr.arpa\" names to a specific server are still forwarded. ".
250
					"If the IP to name is not known from /etc/hosts, DHCP or a specific domain override then a \"not found\" answer is immediately returned. ".
251
					""), $g['product_name']); ?></p>
252
		</td>
253
	</tr>
254
	<tr>
255
		<td width="22%" valign="top" class="vncellreq"><?=gettext("Listen Port");?></td>
256
		<td width="78%" class="vtable"><p>
257
			<input name="port" type="text" id="port" size="6" <?php if ($pconfig['port']) echo "value=\"{$pconfig['port']}\"";?>/>
258
			<br /><br />
259
			<?=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.");?></p>
260
		</td>
261
	</tr>
262
	<tr>
263
		<td width="22%" valign="top" rowspan="2" class="vncellreq"><?=gettext("Interfaces"); ?></td>
264
		<td width="78%" class="vtable">
265
		<?php
266
			$interface_addresses = get_possible_listen_ips(true);
267
			$size=count($interface_addresses)+1;
268
		?>
269
			<?=gettext("Interface IPs used by the DNS Forwarder 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.");?>
270
			<br /><br />
271
			<select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?php echo $size; ?>">
272
				<option value="" <?php if (empty($pconfig['interface'])) echo 'selected="selected"'; ?>>All</option>
273
			<?php  foreach ($interface_addresses as $laddr):
274
					$selected = "";
275
					if (in_array($laddr['value'], $pconfig['interface']))
276
						$selected = 'selected="selected"';
277
			?>
278
				<option value="<?=$laddr['value'];?>" <?=$selected;?>>
279
					<?=htmlspecialchars($laddr['name']);?>
280
				</option>
281
			<?php endforeach; ?>
282
			</select>
283
			<br /><br />
284
		</td>
285
	</tr>
286
	<tr>
287
		<td width="78%" class="vtable"><p>
288
			<input name="strictbind" type="checkbox" id="strictbind" value="yes" <?php if ($pconfig['strictbind'] == "yes") echo "checked=\"checked\"";?>/>
289
			<strong><?=gettext("Strict Interface Binding");?></strong>
290
			<br />
291
			<?= gettext("If this option is set, the DNS forwarder will only bind to the interfaces containing the IP addresses selected above, rather than binding to all interfaces and discarding queries to other addresses."); ?>
292
			<br /><br />
293
			<?= gettext("NOTE: This option does NOT work with IPv6. If set, dnsmasq will not bind to IPv6 addresses."); ?>
294
			</p>
295
		</td>
296
	</tr>
297
	<tr>
298
		<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
299
		<td width="78%" class="vtable">
300
			<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
301
				<input type="button" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?>
302
			</div>
303
			<div id="showadv" <?php if (empty($pconfig['custom_options'])) echo "style='display:none'"; ?>>
304
				<strong><?=gettext("Advanced");?><br /></strong>
305
				<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=htmlspecialchars($pconfig['custom_options']);?></textarea><br/>
306
				<?=gettext("Enter any additional options you would like to add to the dnsmasq configuration here, separated by a space or newline"); ?><br/>
307
			</div>
308
		</td>
309
	</tr>
310
	<tr>
311
		<td colspan="2">
312
			<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"/>
313
		</td>
314
	</tr>
315
</table>
316

    
317
<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
318
</strong></span><?php printf(gettext("If the DNS forwarder is enabled, the DHCP".
319
" service (if enabled) will automatically serve the LAN IP".
320
" address as a DNS server to DHCP clients so they will use".
321
" the forwarder. The DNS forwarder will use the DNS servers".
322
" entered in %sSystem: General setup%s".
323
" or those obtained via DHCP or PPP on WAN if the &quot;Allow".
324
" DNS server list to be overridden by DHCP/PPP on WAN&quot;".
325
" is checked. If you don't use that option (or if you use".
326
" a static IP address on WAN), you must manually specify at".
327
" least one DNS server on the %sSystem:".
328
"General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br />
329
</span></p>
330

    
331
&nbsp;<br />
332
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont">
333
<tr>
334
	<td colspan="5" valign="top" class="listtopic"><?=gettext("Host Overrides");?></td>
335
</tr>
336
<tr>
337
	<td><br/>
338
	<?=gettext("Entries in this section override individual results from the forwarders.");?>
339
	<?=gettext("Use these for changing DNS results or for adding custom DNS records.");?>
340
	</td>
341
</tr>
342
</table>
343
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable">
344
	<thead>
345
	<tr>
346
		<td width="20%" class="listhdrr"><?=gettext("Host");?></td>
347
		<td width="25%" class="listhdrr"><?=gettext("Domain");?></td>
348
		<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
349
		<td width="25%" class="listhdr"><?=gettext("Description");?></td>
350
		<td width="10%" class="list">
351
			<table border="0" cellspacing="0" cellpadding="1">
352
				<tr>
353
					<td width="17"></td>
354
					<td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
355
				</tr>
356
			</table>
357
		</td>
358
	</tr>
359
	</thead>
360
	<tfoot>
361
	<tr>
362
		<td class="list" colspan="4"></td>
363
		<td class="list">
364
			<table border="0" cellspacing="0" cellpadding="1">
365
				<tr>
366
					<td width="17"></td>
367
					<td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
368
				</tr>
369
			</table>
370
		</td>
371
	</tr>
372
	</tfoot>
373
	<tbody>
374
	<?php $i = 0; foreach ($a_hosts as $hostent): ?>
375
	<tr>
376
		<td class="listlr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
377
			<?=strtolower($hostent['host']);?>&nbsp;
378
		</td>
379
		<td class="listr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
380
			<?=strtolower($hostent['domain']);?>&nbsp;
381
		</td>
382
		<td class="listr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
383
			<?=$hostent['ip'];?>&nbsp;
384
		</td>
385
		<td class="listbg" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
386
			<?=htmlspecialchars($hostent['descr']);?>&nbsp;
387
		</td>
388
		<td valign="middle" nowrap="nowrap" class="list">
389
			<table border="0" cellspacing="0" cellpadding="1">
390
				<tr>
391
					<td valign="middle"><a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a></td>
392
					<td><a href="services_dnsmasq.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" alt="" width="17" height="17" border="0"/></a></td>
393
				</tr>
394
			</table>
395
		</td>
396
	</tr>
397
	<?php if ($hostent['aliases']['item'] && is_array($hostent['aliases']['item'])): ?>
398
	<?php foreach ($hostent['aliases']['item'] as $alias): ?>
399
	<tr>
400
		<td class="listlr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
401
			<?=strtolower($alias['host']);?>&nbsp;
402
		</td>
403
		<td class="listr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
404
			<?=strtolower($alias['domain']);?>&nbsp;
405
		</td>
406
		<td class="listr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
407
			Alias for <?=$hostent['host'] ? $hostent['host'] . '.' . $hostent['domain'] : $hostent['domain'];?>&nbsp;
408
		</td>
409
		<td class="listbg" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
410
			<?=htmlspecialchars($alias['description']);?>&nbsp;
411
		</td>
412
		<td valign="middle" nowrap="nowrap" class="list">
413
			<a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a>
414
		</td>
415
	</tr>
416
	<?php endforeach; ?>
417
	<?php endif; ?>
418
	<?php $i++; endforeach; ?>
419
	</tbody>
420
</table>
421
<br/>
422
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont">
423
<tr>
424
	<td colspan="5" valign="top" class="listtopic"><?=gettext("Domain Overrides");?></td>
425
</tr>
426
	<tr>
427
		<td><p><?=gettext("Entries in this area override an entire domain by specifying an".
428
		" authoritative DNS server to be queried for that domain.");?></p></td>
429
	</tr>
430
</table>
431
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable">
432
	<thead>
433
	<tr>
434
		<td width="35%" class="listhdrr"><?=gettext("Domain");?></td>
435
		<td width="20%" class="listhdrr"><?=gettext("IP");?></td>
436
		<td width="35%" class="listhdr"><?=gettext("Description");?></td>
437
		<td width="10%" class="list">
438
			<table border="0" cellspacing="0" cellpadding="1">
439
				<tr>
440
					<td width="17" height="17"></td>
441
					<td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
442
				</tr>
443
			</table>
444
		</td>
445
	</tr>
446
	</thead>
447
	<tfoot>
448
	<tr>
449
		<td class="list" colspan="3"></td>
450
		<td class="list">
451
		<table border="0" cellspacing="0" cellpadding="1">
452
			<tr>
453
				<td width="17" height="17"></td>
454
				<td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
455
			</tr>
456
		</table>
457
		</td>
458
	</tr>
459
	</tfoot>
460
	<tbody>
461
	<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
462
	<tr>
463
		<td class="listlr">
464
			<?=strtolower($doment['domain']);?>&nbsp;
465
		</td>
466
		<td class="listr">
467
			<?=$doment['ip'];?>&nbsp;
468
		</td>
469
		<td class="listbg">
470
			<?=htmlspecialchars($doment['descr']);?>&nbsp;
471
		</td>
472
		<td valign="middle" nowrap="nowrap" class="list"> <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a>
473
			&nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" alt="" width="17" height="17" border="0"/></a></td>
474
	</tr>
475
	<?php $i++; endforeach;
476
		if ($i == 0) echo "<tr><td></td></tr>"; ?>
477
	</tbody>
478
</table>
479
</form>
480
<script type="text/JavaScript">
481
<!--
482
enable_change(false);
483
//-->
484
</script>
485
<?php include("fend.inc"); ?>
486
</body>
487
</html>
(154-154/246)