Project

General

Profile

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