Project

General

Profile

Download (16.1 KB) Statistics
| Branch: | Tag: | Revision:
1 04ad7c7c Scott Ullrich
<?php
2 62d01225 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	system.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6 04ad7c7c Scott Ullrich
7 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9 04ad7c7c Scott Ullrich
10 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12 04ad7c7c Scott Ullrich
13 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15 04ad7c7c Scott Ullrich
16 5b237745 Scott Ullrich
	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 04ad7c7c Scott Ullrich
20 5b237745 Scott Ullrich
	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 1d333258 Scott Ullrich
/*
32
	pfSense_BUILDER_BINARIES:	/bin/kill	/usr/bin/tar
33
	pfSense_MODULE:	system
34
*/
35 5b237745 Scott Ullrich
36 6b07c15a Matthew Grooms
##|+PRIV
37
##|*IDENT=page-system-generalsetup
38
##|*NAME=System: General Setup page
39
##|*DESCR=Allow access to the 'System: General Setup' page.
40
##|*MATCH=system.php*
41
##|-PRIV
42
43 5b237745 Scott Ullrich
require("guiconfig.inc");
44 7a927e67 Scott Ullrich
require_once("functions.inc");
45
require_once("filter.inc");
46
require_once("shaper.inc");
47 5b237745 Scott Ullrich
48
$pconfig['hostname'] = $config['system']['hostname'];
49
$pconfig['domain'] = $config['system']['domain'];
50 93e0800d Scott Ullrich
list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $config['system']['dnsserver'];
51 0d8a219e Scott Ullrich
52 e180a6e3 Scott Ullrich
$pconfig['dns1gwint'] = $config['system']['dns1gwint'];
53
$pconfig['dns2gwint'] = $config['system']['dns2gwint'];
54 93e0800d Scott Ullrich
$pconfig['dns3gwint'] = $config['system']['dns3gwint'];
55
$pconfig['dns4gwint'] = $config['system']['dns4gwint'];
56 e180a6e3 Scott Ullrich
57 5b237745 Scott Ullrich
$pconfig['dnsallowoverride'] = isset($config['system']['dnsallowoverride']);
58
$pconfig['timezone'] = $config['system']['timezone'];
59
$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
60
$pconfig['timeservers'] = $config['system']['timeservers'];
61 f0f7a3eb Scott Ullrich
$pconfig['theme'] = $config['system']['theme'];
62 5b237745 Scott Ullrich
63 3f9f70cb jim-p
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
64
65 5b237745 Scott Ullrich
if (!isset($pconfig['timeupdateinterval']))
66
	$pconfig['timeupdateinterval'] = 300;
67
if (!$pconfig['timezone'])
68
	$pconfig['timezone'] = "Etc/UTC";
69
if (!$pconfig['timeservers'])
70
	$pconfig['timeservers'] = "pool.ntp.org";
71 04ad7c7c Scott Ullrich
72 79eaddf4 Renato Botelho
$changedesc = gettext("System") . ": ";
73 62d01225 Bill Marquette
$changecount = 0;
74 417c6042 Bill Marquette
75 5b237745 Scott Ullrich
function is_timezone($elt) {
76
	return !preg_match("/\/$/", $elt);
77
}
78
79 aa1ab1da Scott Ullrich
if($pconfig['timezone'] <> $_POST['timezone']) {
80
	/* restart firewall log dumper helper */
81
	require_once("functions.inc");
82 87c20eb5 Bill Marquette
	$pid = `ps awwwux | grep -v "grep" | grep "tcpdump -v -l -n -e -ttt -i pflog0"  | awk '{ print $2 }'`;
83 aa1ab1da Scott Ullrich
	if($pid) {
84 1d333258 Scott Ullrich
		mwexec("/bin/kill $pid");
85 aa1ab1da Scott Ullrich
		usleep(1000);
86
	}		
87
	filter_pflog_start();
88
}
89
90 5b237745 Scott Ullrich
exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
91
$timezonelist = array_filter($timezonelist, 'is_timezone');
92
sort($timezonelist);
93
94 77446beb Matthew Grooms
$multiwan = false;
95 7922db8a Seth Mos
$interfaces = get_configured_interface_list();
96
foreach($interfaces as $interface) {
97
	if(interface_has_gateway($interface)) {
98 77446beb Matthew Grooms
		$multiwan = true;
99 7922db8a Seth Mos
	}
100
}
101 77446beb Matthew Grooms
102 5b237745 Scott Ullrich
if ($_POST) {
103
104 c668c964 Scott Ullrich
	$changecount++;
105 e180a6e3 Scott Ullrich
	
106 5b237745 Scott Ullrich
	unset($input_errors);
107
	$pconfig = $_POST;
108
109
	/* input validation */
110 ec5a5d65 Scott Dale
	$reqdfields = split(" ", "hostname domain");
111 38fb1109 Vinicius Coque
	$reqdfieldsn = array(gettext("Hostname"),gettext("Domain"));
112 04ad7c7c Scott Ullrich
113 5b237745 Scott Ullrich
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
114 04ad7c7c Scott Ullrich
115 5b237745 Scott Ullrich
	if ($_POST['hostname'] && !is_hostname($_POST['hostname'])) {
116 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("The hostname may only contain the characters a-z, 0-9 and '-'.");
117 5b237745 Scott Ullrich
	}
118
	if ($_POST['domain'] && !is_domain($_POST['domain'])) {
119 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("The domain may only contain the characters a-z, 0-9, '-' and '.'.");
120 5b237745 Scott Ullrich
	}
121
	if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2']))) {
122 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS server.");
123 5b237745 Scott Ullrich
	}
124 93e0800d Scott Ullrich
	if (($_POST['dns3'] && !is_ipaddr($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddr($_POST['dns4']))) {
125 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS server.");
126 93e0800d Scott Ullrich
	}	
127 04ad7c7c Scott Ullrich
	if ($_POST['webguiport'] && (!is_numericint($_POST['webguiport']) ||
128 5b237745 Scott Ullrich
			($_POST['webguiport'] < 1) || ($_POST['webguiport'] > 65535))) {
129 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("A valid TCP/IP port must be specified for the webConfigurator port.");
130 5b237745 Scott Ullrich
	}
131 04ad7c7c Scott Ullrich
132 985fc0fb Ermal Lu?i
	$direct_networks_list = explode(" ", filter_get_direct_networks_list());
133 c98d28e1 Seth Mos
	for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
134
		$dnsitem = "dns{$dnscounter}";
135
		$dnsgwitem = "dns{$dnscounter}gwint";
136
		if ($_POST[$dnsgwitem]) {
137
			if(interface_has_gateway($_POST[$dnsgwitem])) {
138
				foreach($direct_networks_list as $direct_network) {
139
					if(ip_in_subnet($_POST[$dnsitem], $direct_network)) {
140 7465d12c Carlos Eduardo Ramos
						$input_errors[] = gettext("You can not assign a gateway to DNS '{$_POST[$dnsitem]}' server which is on a directly connected network.");
141 c98d28e1 Seth Mos
					}
142
				}
143
			}
144
		}
145
	}
146
147 5b237745 Scott Ullrich
	$t = (int)$_POST['timeupdateinterval'];
148
	if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) {
149 7465d12c Carlos Eduardo Ramos
		$input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440.");
150 5b237745 Scott Ullrich
	}
151
	foreach (explode(' ', $_POST['timeservers']) as $ts) {
152
		if (!is_domain($ts)) {
153 7465d12c Carlos Eduardo Ramos
			$input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
154 5b237745 Scott Ullrich
		}
155
	}
156
157
	if (!$input_errors) {
158 9eab73da Bill Marquette
		update_if_changed("hostname", $config['system']['hostname'], strtolower($_POST['hostname']));
159
		update_if_changed("domain", $config['system']['domain'], strtolower($_POST['domain']));
160 79f8694f Bill Marquette
161 9eab73da Bill Marquette
		update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
162
		update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
163
		update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
164 04ad7c7c Scott Ullrich
165 f0f7a3eb Scott Ullrich
		/* pfSense themes */
166 7321c93c Chris Buechler
		if (! $g['disablethemeselection']) {
167
			update_if_changed("System Theme", $config['theme'], $_POST['theme']);	
168
		}
169 f0f7a3eb Scott Ullrich
170 4fbf63aa Bill Marquette
		/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
171 5b237745 Scott Ullrich
		unset($config['system']['dnsserver']);
172
		if ($_POST['dns1'])
173
			$config['system']['dnsserver'][] = $_POST['dns1'];
174
		if ($_POST['dns2'])
175
			$config['system']['dnsserver'][] = $_POST['dns2'];
176 93e0800d Scott Ullrich
		if ($_POST['dns3'])
177
			$config['system']['dnsserver'][] = $_POST['dns3'];
178
		if ($_POST['dns4'])
179
			$config['system']['dnsserver'][] = $_POST['dns4'];
180 04ad7c7c Scott Ullrich
181 07bd3f83 Scott Ullrich
		$olddnsallowoverride = $config['system']['dnsallowoverride'];
182 20b90e0a Scott Ullrich
183 0d8a219e Scott Ullrich
		unset($config['system']['dnsallowoverride']);
184 5b237745 Scott Ullrich
		$config['system']['dnsallowoverride'] = $_POST['dnsallowoverride'] ? true : false;
185 e180a6e3 Scott Ullrich
186 3f9f70cb jim-p
		if($_POST['dnslocalhost'] == "yes")
187
			$config['system']['dnslocalhost'] = true;
188
		else
189
			unset($config['system']['dnslocalhost']);
190
191 e180a6e3 Scott Ullrich
		/* which interface should the dns servers resolve through? */
192
		if($_POST['dns1gwint']) 
193
			$config['system']['dns1gwint'] = $pconfig['dns1gwint'];
194
		else 
195
			unset($config['system']['dns1gwint']);
196 3537ac27 Seth Mos
197 e180a6e3 Scott Ullrich
		if($_POST['dns2gwint']) 
198
			$config['system']['dns2gwint'] = $pconfig['dns2gwint'];
199
		else
200
			unset($config['system']['dns2gwint']);
201 3537ac27 Seth Mos
202 93e0800d Scott Ullrich
		if($_POST['dns3gwint']) 
203 5aaf13c4 Seth Mos
			$config['system']['dns3gwint'] = $pconfig['dns3gwint'];
204 93e0800d Scott Ullrich
		else 
205
			unset($config['system']['dns3gwint']);
206 3537ac27 Seth Mos
207 93e0800d Scott Ullrich
		if($_POST['dns4gwint']) 
208
			$config['system']['dns4gwint'] = $pconfig['dns4gwint'];
209
		else
210
			unset($config['system']['dns4gwint']);
211 04ad7c7c Scott Ullrich
212 62d01225 Bill Marquette
		if ($changecount > 0)
213
			write_config($changedesc);
214 04ad7c7c Scott Ullrich
215 5b237745 Scott Ullrich
		$retval = 0;
216 3cfdba5f Scott Ullrich
		$retval = system_hostname_configure();
217
		$retval |= system_hosts_generate();
218
		$retval |= system_resolvconf_generate();
219
		$retval |= services_dnsmasq_configure();
220
		$retval |= system_timezone_configure();
221
		$retval |= system_ntp_configure();
222
223
		if ($olddnsallowoverride != $config['system']['dnsallowoverride'])
224 b8292903 Ermal
			$retval |= send_event("service reload dns");
225 3cfdba5f Scott Ullrich
226 e7d967d8 Scott Ullrich
		// Reload the filter - plugins might need to be run.
227 0027de0a Ermal Lu?i
		$retval |= filter_configure();
228 e7d967d8 Scott Ullrich
		
229 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
230
	}
231
}
232 4df96eff Scott Ullrich
233 7465d12c Carlos Eduardo Ramos
$pgtitle = array(gettext("System"),gettext("General Setup"));
234 4df96eff Scott Ullrich
include("head.inc");
235
236 5b237745 Scott Ullrich
?>
237 4df96eff Scott Ullrich
238 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
239 f0f7a3eb Scott Ullrich
<?php
240 77446beb Matthew Grooms
	include("fbegin.inc");
241
	if ($input_errors)
242
		print_input_errors($input_errors);
243
	if ($savemsg)
244
		print_info_box($savemsg);
245 f0f7a3eb Scott Ullrich
?>
246 77446beb Matthew Grooms
	<form action="system.php" method="post">
247
		<table width="100%" border="0" cellpadding="6" cellspacing="0">
248 27b07eda Ermal Lu?i
                        <tr>
249
                                <td id="mainarea">
250
                                        <div class="tabcont">
251
			<table width="100%" border="0" cellpadding="6" cellspacing="0">
252 77446beb Matthew Grooms
			<tr>
253 7465d12c Carlos Eduardo Ramos
				<td colspan="2" valign="top" class="listtopic"><?=gettext("System"); ?></td>
254 77446beb Matthew Grooms
			</tr>
255
			<tr>
256 7465d12c Carlos Eduardo Ramos
				<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname"); ?></td>
257 77446beb Matthew Grooms
				<td width="78%" class="vtable"> <input name="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>">
258
					<br/>
259
					<span class="vexpl">
260 22a11a58 Larry Gilbert
						<?=gettext("Name of the firewall host, without domain part"); ?>
261 10e41b74 gnhb
						<br/>
262 7465d12c Carlos Eduardo Ramos
						<?=gettext("e.g."); ?> <em>firewall</em>
263 77446beb Matthew Grooms
					</span>
264
				</td>
265
			</tr>
266
			<tr>
267 7465d12c Carlos Eduardo Ramos
				<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain"); ?></td>
268 77446beb Matthew Grooms
				<td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
269
					<br/>
270
					<span class="vexpl">
271 7465d12c Carlos Eduardo Ramos
						<?=gettext("Do not use 'local' as a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS."); ?>
272 10e41b74 gnhb
						<br/>
273 7465d12c Carlos Eduardo Ramos
						<?=gettext("e.g."); ?> <em><?=gettext("mycorp.com, home, office, private, etc."); ?></em>
274 77446beb Matthew Grooms
					</span>
275
				</td>
276
			</tr>
277
			<tr>
278 7465d12c Carlos Eduardo Ramos
				<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers"); ?></td>
279 77446beb Matthew Grooms
				<td width="78%" class="vtable">
280
					<p>
281
						<table>
282
							<tr>
283 7465d12c Carlos Eduardo Ramos
								<td><b><?=gettext("DNS Server"); ?></b></td>
284 77446beb Matthew Grooms
								<?php if ($multiwan): ?>
285 7465d12c Carlos Eduardo Ramos
								<td><b><?=gettext("Use gateway"); ?></b></td>
286 77446beb Matthew Grooms
								<?php endif; ?>
287
							</tr>
288
							<?php
289
								for ($dnscounter=1; $dnscounter<5; $dnscounter++):
290
									$fldname="dns{$dnscounter}gwint";
291
							?>
292
							<tr>
293
								<td>
294
									<input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="20" value="<?php echo $pconfig['dns'.$dnscounter];?>">
295
								</td>
296
								<td>
297 a077b479 Ermal Luçi
<?php if ($multiwan): ?>
298 3537ac27 Seth Mos
									<select name='<?=$fldname;?>'>
299 77446beb Matthew Grooms
										<?php
300 7922db8a Seth Mos
											$interface = "none";
301 3537ac27 Seth Mos
											$dnsgw = "dns{$dnscounter}gwint";
302
											if($pconfig[$dnsgw] == $interface) {
303
												$selected = "selected";
304 7922db8a Seth Mos
											} else {
305 77446beb Matthew Grooms
												$selected = "";
306 7922db8a Seth Mos
											}
307 3537ac27 Seth Mos
											echo "<option value='$interface' $selected>". ucwords($interface) ."</option>\n";
308 7922db8a Seth Mos
											foreach($interfaces as $interface) {
309
												if(interface_has_gateway($interface)) {
310 3537ac27 Seth Mos
													if($pconfig[$dnsgw] == $interface) {
311
														$selected = "selected";
312 7922db8a Seth Mos
													} else {
313
														$selected = "";
314
													}
315 8ac4df97 Scott Ullrich
													$friendly_interface = convert_friendly_interface_to_friendly_descr($interface);
316
													echo "<option value='$interface' $selected>". ucwords($friendly_interface) ."</option>\n";
317 7922db8a Seth Mos
												}
318
											}
319 77446beb Matthew Grooms
										?>
320
									</select>
321 a077b479 Ermal Luçi
<?php endif; ?>
322 77446beb Matthew Grooms
								</td>
323
							</tr>
324
							<?php endfor; ?>
325
						</table>
326
						<br>
327
						<span class="vexpl">
328 29645da6 Carlos Eduardo Ramos
							<?=gettext("IP addresses: these are also used for the DHCP " .
329 f0d1af93 Carlos Eduardo Ramos
							"service, DNS forwarder and for PPTP VPN clients."); ?>
330 77446beb Matthew Grooms
							<br/>
331
							<?php if($multiwan): ?>
332
							<br/>
333 29645da6 Carlos Eduardo Ramos
							<?=gettext("In addition, select the gateway for each DNS server. " .
334 f0d1af93 Carlos Eduardo Ramos
							"You should have a unique DNS server per gateway."); ?>
335 77446beb Matthew Grooms
							<br/>
336
							<?php endif; ?>
337
							<br/>
338
							<input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked"; ?>>
339
							<strong>
340 ad5b5f61 Renato Botelho
								<?=gettext("Allow DNS server list to be overridden by DHCP/PPP on WAN"); ?>
341 77446beb Matthew Grooms
							</strong>
342
							<br/>
343 ea6be4a7 Erik Fonnesbeck
							<?php printf(gettext("If this option is set, %s will " .
344 f49a012c Renato Botelho
							"use DNS servers assigned by a DHCP/PPP server on WAN " .
345
							"for its own purposes (including the DNS forwarder). " .
346
							"However, they will not be assigned to DHCP and PPTP " .
347
							"VPN clients."), $g['product_name']); ?>
348 3f9f70cb jim-p
							<br />
349
							<br />
350
							<input name="dnslocalhost" type="checkbox" id="dnslocalhost" value="yes" <?php if ($pconfig['dnslocalhost']) echo "checked"; ?> />
351
							<strong>
352
								<?=gettext("Do not use the DNS Forwarder as a DNS server for the firewall"); ?>
353
							</strong>
354
							<br />
355
							<?=gettext("By default localhost (127.0.0.1) will be used as the first DNS server where the DNS forwarder is enabled, so system can use the DNS forwarder to perform lookups. ".
356
							"Checking this box omits localhost from the list of DNS servers."); ?>
357 77446beb Matthew Grooms
						</span>
358
					</p>
359
				</td>
360
			</tr>
361
			<tr>
362 7465d12c Carlos Eduardo Ramos
				<td width="22%" valign="top" class="vncell"><?=gettext("Time zone"); ?></td>
363 77446beb Matthew Grooms
				<td width="78%" class="vtable">
364
					<select name="timezone" id="timezone">
365
						<?php foreach ($timezonelist as $value): ?>
366 5c1f3ed2 sullrich
						<?php if(strstr($value, "GMT")) continue; ?>
367 77446beb Matthew Grooms
						<option value="<?=htmlspecialchars($value);?>" <?php if ($value == $pconfig['timezone']) echo "selected"; ?>>
368
							<?=htmlspecialchars($value);?>
369
						</option>
370
						<?php endforeach; ?>
371 f0f7a3eb Scott Ullrich
					</select>
372 77446beb Matthew Grooms
					<br/>
373
					<span class="vexpl">
374 7465d12c Carlos Eduardo Ramos
						<?=gettext("Select the location closest to you"); ?>
375 77446beb Matthew Grooms
					</span>
376
				</td>
377
			</tr>
378
<!--
379
			<tr>
380
				<td width="22%" valign="top" class="vncell">Time update interval</td>
381
				<td width="78%" class="vtable">
382
					<input name="timeupdateinterval" type="text" class="formfld unknown" id="timeupdateinterval" size="4" value="<?=htmlspecialchars($pconfig['timeupdateinterval']);?>">
383
					<br/>
384
					<span class="vexpl">
385
						Minutes between network time sync. 300 recommended,
386
						or 0 to disable
387
					</span>
388
				</td>
389
			</tr>
390
-->
391
			<tr>
392 7465d12c Carlos Eduardo Ramos
				<td width="22%" valign="top" class="vncell"><?=gettext("NTP time server"); ?></td>
393 77446beb Matthew Grooms
				<td width="78%" class="vtable">
394
					<input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>">
395
					<br/>
396
					<span class="vexpl">
397 f0d1af93 Carlos Eduardo Ramos
						<?=gettext("Use a space to separate multiple hosts (only one " .
398
						"required). Remember to set up at least one DNS server " .
399
						"if you enter a host name here!"); ?>
400 77446beb Matthew Grooms
					</span>
401
				</td>
402
			</tr>
403
			<tr>
404
				<td colspan="2" class="list" height="12">&nbsp;</td>
405
			</tr>
406 8b289232 Chris Buechler
			<?php if (! $g['disablethemeselection']): ?>
407 77446beb Matthew Grooms
			<tr>
408 7465d12c Carlos Eduardo Ramos
				<td colspan="2" valign="top" class="listtopic"><?=gettext("Theme"); ?></td>
409 77446beb Matthew Grooms
			</tr>
410
			<tr>
411
				<td width="22%" valign="top" class="vncell">&nbsp;</td>
412
				<td width="78%" class="vtable">
413
					<select name="theme">
414
						<?php
415
							$files = return_dir_as_array("/usr/local/www/themes/");
416
							foreach($files as $f):
417
								if ((substr($f, 0, 1) == "_") && !isset($config['system']['developer']))
418
									continue;
419
								if ($f == "CVS")
420
									continue;
421
								$curtheme = "pfsense";
422
								if ($config['theme'])
423
									$curtheme = $config['theme'];
424
								$selected = "";
425
								if($f == $curtheme)
426
									$selected = " SELECTED";
427
						?>
428
						<option <?=$selected;?>><?=$f;?></option>
429
						<?php endforeach; ?>
430
					</select>
431
					<strong>
432 7465d12c Carlos Eduardo Ramos
						<?=gettext("This will change the look and feel of"); ?>
433 77446beb Matthew Grooms
						<?=$g['product_name'];?>.
434
					</strong>
435
				</td>
436
			</tr>
437 8b289232 Chris Buechler
			<?php endif; ?>
438 306f082a Scott Ullrich
			<tr>
439
				<td colspan="2" class="list" height="12">&nbsp;</td>
440
			</tr>			
441 77446beb Matthew Grooms
			<tr>
442
				<td width="22%" valign="top">&nbsp;</td>
443
				<td width="78%">
444 e454bcd3 Vinicius Coque
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
445 f0f7a3eb Scott Ullrich
				</td>
446 77446beb Matthew Grooms
			</tr>
447
		</table>
448 27b07eda Ermal Lu?i
		</div>
449
		</td></tr>
450
		</table>
451 77446beb Matthew Grooms
	</form>
452 5b237745 Scott Ullrich
<?php include("fend.inc"); ?>
453 2f3f316c Scott Ullrich
</body>
454
</html>