Projet

Général

Profil

Télécharger (21,1 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / services_dnsmasq.php @ 071f6059

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
		/* Update resolv.conf in case the interface bindings exclude localhost. */
120
		system_resolvconf_generate();
121

    
122
		if ($retval == 0)
123
			clear_subsystem_dirty('hosts');
124
	}
125
}
126

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

    
148
$closehead = false;
149
$pgtitle = array(gettext("Services"),gettext("DNS forwarder"));
150
$shortcut_section = "resolver";
151
include("head.inc");
152

    
153
?>
154

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

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

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