1
|
<?php
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
system.php
|
5
|
part of m0n0wall (http://m0n0.ch/wall)
|
6
|
|
7
|
Copyright (C) 2003-2004 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_BUILDER_BINARIES: /bin/kill /usr/bin/tar
|
33
|
pfSense_MODULE: system
|
34
|
*/
|
35
|
|
36
|
##|+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
|
require("guiconfig.inc");
|
44
|
require_once("functions.inc");
|
45
|
require_once("filter.inc");
|
46
|
require_once("shaper.inc");
|
47
|
|
48
|
$pconfig['hostname'] = $config['system']['hostname'];
|
49
|
$pconfig['domain'] = $config['system']['domain'];
|
50
|
list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $config['system']['dnsserver'];
|
51
|
|
52
|
$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
|
|
59
|
$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
|
$pconfig['theme'] = $config['system']['theme'];
|
64
|
$pconfig['language'] = $config['system']['language'];
|
65
|
|
66
|
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
|
67
|
|
68
|
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
|
|
75
|
$changedesc = gettext("System") . ": ";
|
76
|
$changecount = 0;
|
77
|
|
78
|
function is_timezone($elt) {
|
79
|
return !preg_match("/\/$/", $elt);
|
80
|
}
|
81
|
|
82
|
if($pconfig['timezone'] <> $_POST['timezone']) {
|
83
|
filter_pflog_start(true);
|
84
|
}
|
85
|
|
86
|
exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
|
87
|
$timezonelist = array_filter($timezonelist, 'is_timezone');
|
88
|
sort($timezonelist);
|
89
|
|
90
|
$multiwan = false;
|
91
|
$interfaces = get_configured_interface_list();
|
92
|
foreach($interfaces as $interface) {
|
93
|
if(interface_has_gateway($interface)) {
|
94
|
$multiwan = true;
|
95
|
}
|
96
|
}
|
97
|
|
98
|
if ($_POST) {
|
99
|
|
100
|
$changecount++;
|
101
|
|
102
|
unset($input_errors);
|
103
|
$pconfig = $_POST;
|
104
|
|
105
|
/* input validation */
|
106
|
$reqdfields = explode(" ", "hostname domain");
|
107
|
$reqdfieldsn = array(gettext("Hostname"),gettext("Domain"));
|
108
|
|
109
|
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
110
|
|
111
|
if ($_POST['hostname'] && !is_hostname($_POST['hostname'])) {
|
112
|
$input_errors[] = gettext("The hostname may only contain the characters a-z, 0-9 and '-'.");
|
113
|
}
|
114
|
if ($_POST['domain'] && !is_domain($_POST['domain'])) {
|
115
|
$input_errors[] = gettext("The domain may only contain the characters a-z, 0-9, '-' and '.'.");
|
116
|
}
|
117
|
|
118
|
$ignore_posted_dnsgw = array();
|
119
|
|
120
|
for ($dnscounter=1; $dnscounter<5; $dnscounter++){
|
121
|
$dnsname="dns{$dnscounter}";
|
122
|
$dnsgwname="dns{$dnscounter}gw";
|
123
|
if (($_POST[$dnsname] && !is_ipaddr($_POST[$dnsname]))) {
|
124
|
$input_errors[] = gettext("A valid IP address must be specified for DNS server $dnscounter.");
|
125
|
} else {
|
126
|
if(($_POST[$dnsgwname] <> "") && ($_POST[$dnsgwname] <> "none")) {
|
127
|
// A real gateway has been selected.
|
128
|
if (is_ipaddr($_POST[$dnsname])) {
|
129
|
if ((is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
|
130
|
$input_errors[] = gettext("You can not specify IPv6 gateway '{$_POST[$dnsgwname]}' for IPv4 DNS server '{$_POST[$dnsname]}'");
|
131
|
}
|
132
|
if ((is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
|
133
|
$input_errors[] = gettext("You can not specify IPv4 gateway '{$_POST[$dnsgwname]}' for IPv6 DNS server '{$_POST[$dnsname]}'");
|
134
|
}
|
135
|
} else {
|
136
|
// The user selected a gateway but did not provide a DNS address. Be nice and set the gateway back to "none".
|
137
|
$ignore_posted_dnsgw[$dnsgwname] = true;
|
138
|
}
|
139
|
}
|
140
|
}
|
141
|
}
|
142
|
|
143
|
$direct_networks_list = explode(" ", filter_get_direct_networks_list());
|
144
|
for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
|
145
|
$dnsitem = "dns{$dnscounter}";
|
146
|
$dnsgwitem = "dns{$dnscounter}gw";
|
147
|
if ($_POST[$dnsgwitem]) {
|
148
|
if(interface_has_gateway($_POST[$dnsgwitem])) {
|
149
|
foreach($direct_networks_list as $direct_network) {
|
150
|
if(ip_in_subnet($_POST[$dnsitem], $direct_network)) {
|
151
|
$input_errors[] = sprintf(gettext("You can not assign a gateway to DNS '%s' server which is on a directly connected network."),$_POST[$dnsitem]);
|
152
|
}
|
153
|
}
|
154
|
}
|
155
|
}
|
156
|
}
|
157
|
|
158
|
$t = (int)$_POST['timeupdateinterval'];
|
159
|
if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) {
|
160
|
$input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440.");
|
161
|
}
|
162
|
# it's easy to have a little too much whitespace in the field, clean it up for the user before processing.
|
163
|
$_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']);
|
164
|
$_POST['timeservers'] = trim($_POST['timeservers']);
|
165
|
foreach (explode(' ', $_POST['timeservers']) as $ts) {
|
166
|
if (!is_domain($ts)) {
|
167
|
$input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
|
168
|
}
|
169
|
}
|
170
|
|
171
|
if (!$input_errors) {
|
172
|
update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']);
|
173
|
update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
|
174
|
|
175
|
update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
|
176
|
update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
|
177
|
update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
|
178
|
|
179
|
if($_POST['language'] && $_POST['language'] != $config['system']['language']) {
|
180
|
$config['system']['language'] = $_POST['language'];
|
181
|
set_language($config['system']['language']);
|
182
|
}
|
183
|
|
184
|
/* pfSense themes */
|
185
|
if (! $g['disablethemeselection']) {
|
186
|
update_if_changed("System Theme", $config['theme'], $_POST['theme']);
|
187
|
}
|
188
|
|
189
|
/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
|
190
|
$olddnsservers = $config['system']['dnsserver'];
|
191
|
unset($config['system']['dnsserver']);
|
192
|
if ($_POST['dns1'])
|
193
|
$config['system']['dnsserver'][] = $_POST['dns1'];
|
194
|
if ($_POST['dns2'])
|
195
|
$config['system']['dnsserver'][] = $_POST['dns2'];
|
196
|
if ($_POST['dns3'])
|
197
|
$config['system']['dnsserver'][] = $_POST['dns3'];
|
198
|
if ($_POST['dns4'])
|
199
|
$config['system']['dnsserver'][] = $_POST['dns4'];
|
200
|
|
201
|
$olddnsallowoverride = $config['system']['dnsallowoverride'];
|
202
|
|
203
|
unset($config['system']['dnsallowoverride']);
|
204
|
$config['system']['dnsallowoverride'] = $_POST['dnsallowoverride'] ? true : false;
|
205
|
|
206
|
if($_POST['dnslocalhost'] == "yes")
|
207
|
$config['system']['dnslocalhost'] = true;
|
208
|
else
|
209
|
unset($config['system']['dnslocalhost']);
|
210
|
|
211
|
/* which interface should the dns servers resolve through? */
|
212
|
$outdnscounter = 0;
|
213
|
for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
|
214
|
$dnsname="dns{$dnscounter}";
|
215
|
$dnsgwname="dns{$dnscounter}gw";
|
216
|
$olddnsgwname = $config['system'][$dnsgwname];
|
217
|
|
218
|
if ($ignore_posted_dnsgw[$dnsgwname])
|
219
|
$thisdnsgwname = "none";
|
220
|
else
|
221
|
$thisdnsgwname = $pconfig[$dnsgwname];
|
222
|
|
223
|
// "Blank" out the settings for this index, then we set them below using the "outdnscounter" index.
|
224
|
$config['system'][$dnsgwname] = "none";
|
225
|
$pconfig[$dnsgwname] = "none";
|
226
|
$pconfig[$dnsname] = "";
|
227
|
|
228
|
if ($_POST[$dnsname]) {
|
229
|
// Only the non-blank DNS servers were put into the config above.
|
230
|
// So we similarly only add the corresponding gateways sequentially to the config (and to pconfig), as we find non-blank DNS servers.
|
231
|
// This keeps the DNS server IP and corresponding gateway "lined up" when the user blanks out a DNS server IP in the middle of the list.
|
232
|
$outdnscounter++;
|
233
|
$outdnsname="dns{$outdnscounter}";
|
234
|
$outdnsgwname="dns{$outdnscounter}gw";
|
235
|
$pconfig[$outdnsname] = $_POST[$dnsname];
|
236
|
if($_POST[$dnsgwname]) {
|
237
|
$config['system'][$outdnsgwname] = $thisdnsgwname;
|
238
|
$pconfig[$outdnsgwname] = $thisdnsgwname;
|
239
|
} else {
|
240
|
// Note: when no DNS GW name is chosen, the entry is set to "none", so actually this case never happens.
|
241
|
unset($config['system'][$outdnsgwname]);
|
242
|
$pconfig[$outdnsgwname] = "";
|
243
|
}
|
244
|
}
|
245
|
if (($olddnsgwname != "") && ($olddnsgwname != "none") && (($olddnsgwname != $thisdnsgwname) || ($olddnsservers[$dnscounter-1] != $_POST[$dnsname]))) {
|
246
|
// A previous DNS GW name was specified. It has now gone or changed, or the DNS server address has changed.
|
247
|
// Remove the route. Later calls will add the correct new route if needed.
|
248
|
if (is_ipaddrv4($olddnsservers[$dnscounter-1]))
|
249
|
mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter-1]));
|
250
|
else
|
251
|
if (is_ipaddrv6($olddnsservers[$dnscounter-1]))
|
252
|
mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter-1]));
|
253
|
}
|
254
|
}
|
255
|
|
256
|
if ($changecount > 0)
|
257
|
write_config($changedesc);
|
258
|
|
259
|
$retval = 0;
|
260
|
$retval = system_hostname_configure();
|
261
|
$retval |= system_hosts_generate();
|
262
|
$retval |= system_resolvconf_generate();
|
263
|
if (isset($config['dnsmasq']['enable']))
|
264
|
$retval |= services_dnsmasq_configure();
|
265
|
elseif (isset($config['unbound']['enable']))
|
266
|
$retval |= services_unbound_configure();
|
267
|
$retval |= system_timezone_configure();
|
268
|
$retval |= system_ntp_configure();
|
269
|
|
270
|
if ($olddnsallowoverride != $config['system']['dnsallowoverride'])
|
271
|
$retval |= send_event("service reload dns");
|
272
|
|
273
|
// Reload the filter - plugins might need to be run.
|
274
|
$retval |= filter_configure();
|
275
|
|
276
|
$savemsg = get_std_save_message($retval);
|
277
|
}
|
278
|
|
279
|
unset($ignore_posted_dnsgw);
|
280
|
}
|
281
|
|
282
|
$pgtitle = array(gettext("System"),gettext("General Setup"));
|
283
|
include("head.inc");
|
284
|
|
285
|
?>
|
286
|
|
287
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
288
|
<?php
|
289
|
include("fbegin.inc");
|
290
|
if ($input_errors)
|
291
|
print_input_errors($input_errors);
|
292
|
if ($savemsg)
|
293
|
print_info_box($savemsg);
|
294
|
?>
|
295
|
<form action="system.php" method="post">
|
296
|
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="general setup">
|
297
|
<tr>
|
298
|
<td id="mainarea">
|
299
|
<div class="tabcont">
|
300
|
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
|
301
|
<tr>
|
302
|
<td colspan="2" valign="top" class="listtopic"><?=gettext("System"); ?></td>
|
303
|
</tr>
|
304
|
<tr>
|
305
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname"); ?></td>
|
306
|
<td width="78%" class="vtable"> <input name="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>" />
|
307
|
<br />
|
308
|
<span class="vexpl">
|
309
|
<?=gettext("Name of the firewall host, without domain part"); ?>
|
310
|
<br />
|
311
|
<?=gettext("e.g."); ?> <em>firewall</em>
|
312
|
</span>
|
313
|
</td>
|
314
|
</tr>
|
315
|
<tr>
|
316
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain"); ?></td>
|
317
|
<td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>" />
|
318
|
<br />
|
319
|
<span class="vexpl">
|
320
|
<?=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."); ?>
|
321
|
<br />
|
322
|
<?=gettext("e.g."); ?> <em><?=gettext("mycorp.com, home, office, private, etc."); ?></em>
|
323
|
</span>
|
324
|
</td>
|
325
|
</tr>
|
326
|
<tr>
|
327
|
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers"); ?></td>
|
328
|
<td width="78%" class="vtable">
|
329
|
<br />
|
330
|
<table summary="dns servers and gateways">
|
331
|
<tr>
|
332
|
<td><b><?=gettext("DNS Server"); ?></b></td>
|
333
|
<?php if ($multiwan): ?>
|
334
|
<td><b><?=gettext("Use gateway"); ?></b></td>
|
335
|
<?php endif; ?>
|
336
|
</tr>
|
337
|
<?php
|
338
|
for ($dnscounter=1; $dnscounter<5; $dnscounter++):
|
339
|
$fldname="dns{$dnscounter}gw";
|
340
|
?>
|
341
|
<tr>
|
342
|
<td>
|
343
|
<input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="28" value="<?php echo $pconfig['dns'.$dnscounter];?>" />
|
344
|
</td>
|
345
|
<td>
|
346
|
<?php if ($multiwan): ?>
|
347
|
<select name='<?=$fldname;?>'>
|
348
|
<?php
|
349
|
$gwname = "none";
|
350
|
$dnsgw = "dns{$dnscounter}gw";
|
351
|
if($pconfig[$dnsgw] == $gwname) {
|
352
|
$selected = "selected=\"selected\"";
|
353
|
} else {
|
354
|
$selected = "";
|
355
|
}
|
356
|
echo "<option value='$gwname' $selected>$gwname</option>\n";
|
357
|
foreach($arr_gateways as $gwname => $gwitem) {
|
358
|
//echo $pconfig[$dnsgw];
|
359
|
if((is_ipaddrv4(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv6($gwitem['gateway'])))) {
|
360
|
continue;
|
361
|
}
|
362
|
if((is_ipaddrv6(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv4($gwitem['gateway'])))) {
|
363
|
continue;
|
364
|
}
|
365
|
if($pconfig[$dnsgw] == $gwname) {
|
366
|
$selected = "selected=\"selected\"";
|
367
|
} else {
|
368
|
$selected = "";
|
369
|
}
|
370
|
echo "<option value='$gwname' $selected>$gwname - {$gwitem['friendlyiface']} - {$gwitem['gateway']}</option>\n";
|
371
|
}
|
372
|
?>
|
373
|
</select>
|
374
|
<?php endif; ?>
|
375
|
</td>
|
376
|
</tr>
|
377
|
<?php endfor; ?>
|
378
|
</table>
|
379
|
<br />
|
380
|
<span class="vexpl">
|
381
|
<?=gettext("Enter IP addresses to be used by the system for DNS resolution. " .
|
382
|
"These are also used for the DHCP service, DNS forwarder and for PPTP VPN clients."); ?>
|
383
|
<br />
|
384
|
<?php if($multiwan): ?>
|
385
|
<br />
|
386
|
<?=gettext("In addition, optionally select the gateway for each DNS server. " .
|
387
|
"When using multiple WAN connections there should be at least one unique DNS server per gateway."); ?>
|
388
|
<br />
|
389
|
<?php endif; ?>
|
390
|
<br />
|
391
|
<input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked=\"checked\""; ?> />
|
392
|
<strong>
|
393
|
<?=gettext("Allow DNS server list to be overridden by DHCP/PPP on WAN"); ?>
|
394
|
</strong>
|
395
|
<br />
|
396
|
<?php printf(gettext("If this option is set, %s will " .
|
397
|
"use DNS servers assigned by a DHCP/PPP server on WAN " .
|
398
|
"for its own purposes (including the DNS forwarder). " .
|
399
|
"However, they will not be assigned to DHCP and PPTP " .
|
400
|
"VPN clients."), $g['product_name']); ?>
|
401
|
<br />
|
402
|
<br />
|
403
|
<input name="dnslocalhost" type="checkbox" id="dnslocalhost" value="yes" <?php if ($pconfig['dnslocalhost']) echo "checked=\"checked\""; ?> />
|
404
|
<strong>
|
405
|
<?=gettext("Do not use the DNS Forwarder as a DNS server for the firewall"); ?>
|
406
|
</strong>
|
407
|
<br />
|
408
|
<?=gettext("By default localhost (127.0.0.1) will be used as the first DNS server where the DNS Forwarder or DNS Resolver is enabled and set to listen on Localhost, so system can use the local DNS service to perform lookups. ".
|
409
|
"Checking this box omits localhost from the list of DNS servers."); ?>
|
410
|
</span>
|
411
|
</td>
|
412
|
</tr>
|
413
|
<tr>
|
414
|
<td width="22%" valign="top" class="vncell"><?=gettext("Time zone"); ?></td>
|
415
|
<td width="78%" class="vtable">
|
416
|
<select name="timezone" id="timezone">
|
417
|
<?php foreach ($timezonelist as $value): ?>
|
418
|
<?php if(strstr($value, "GMT")) continue; ?>
|
419
|
<option value="<?=htmlspecialchars($value);?>" <?php if ($value == $pconfig['timezone']) echo "selected=\"selected\""; ?>>
|
420
|
<?=htmlspecialchars($value);?>
|
421
|
</option>
|
422
|
<?php endforeach; ?>
|
423
|
</select>
|
424
|
<br />
|
425
|
<span class="vexpl">
|
426
|
<?=gettext("Select the location closest to you"); ?>
|
427
|
</span>
|
428
|
</td>
|
429
|
</tr>
|
430
|
<!--
|
431
|
<tr>
|
432
|
<td width="22%" valign="top" class="vncell">Time update interval</td>
|
433
|
<td width="78%" class="vtable">
|
434
|
<input name="timeupdateinterval" type="text" class="formfld unknown" id="timeupdateinterval" size="4" value="<?=htmlspecialchars($pconfig['timeupdateinterval']);?>" />
|
435
|
<br />
|
436
|
<span class="vexpl">
|
437
|
Minutes between network time sync. 300 recommended,
|
438
|
or 0 to disable
|
439
|
</span>
|
440
|
</td>
|
441
|
</tr>
|
442
|
-->
|
443
|
<tr>
|
444
|
<td width="22%" valign="top" class="vncell"><?=gettext("NTP time server"); ?></td>
|
445
|
<td width="78%" class="vtable">
|
446
|
<input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>" />
|
447
|
<br />
|
448
|
<span class="vexpl">
|
449
|
<?=gettext("Use a space to separate multiple hosts (only one " .
|
450
|
"required). Remember to set up at least one DNS server " .
|
451
|
"if you enter a host name here!"); ?>
|
452
|
</span>
|
453
|
</td>
|
454
|
</tr>
|
455
|
<tr>
|
456
|
<td width="22%" valign="top" class="vncell"><?php echo gettext("Language");?></td>
|
457
|
<td width="78%" class="vtable">
|
458
|
<select name="language">
|
459
|
<?php
|
460
|
foreach(get_locale_list() as $lcode => $ldesc) {
|
461
|
$selected = ' selected="selected"';
|
462
|
if($lcode != $pconfig['language'])
|
463
|
$selected = '';
|
464
|
echo "<option value=\"{$lcode}\"{$selected}>{$ldesc}</option>";
|
465
|
}
|
466
|
?>
|
467
|
</select>
|
468
|
<strong>
|
469
|
<?=gettext("Choose a language for the webConfigurator"); ?>
|
470
|
</strong>
|
471
|
</td>
|
472
|
</tr>
|
473
|
<tr>
|
474
|
<td colspan="2" class="list" height="12"> </td>
|
475
|
</tr>
|
476
|
<?php if (! $g['disablethemeselection']): ?>
|
477
|
<tr>
|
478
|
<td colspan="2" valign="top" class="listtopic"><?=gettext("Theme"); ?></td>
|
479
|
</tr>
|
480
|
<tr>
|
481
|
<td width="22%" valign="top" class="vncell"> </td>
|
482
|
<td width="78%" class="vtable">
|
483
|
<select name="theme">
|
484
|
<?php
|
485
|
$files = return_dir_as_array("/usr/local/www/themes/");
|
486
|
foreach($files as $f):
|
487
|
if ((substr($f, 0, 1) == "_") && !isset($config['system']['developer']))
|
488
|
continue;
|
489
|
if ($f == "CVS")
|
490
|
continue;
|
491
|
$curtheme = "pfsense";
|
492
|
if ($config['theme'])
|
493
|
$curtheme = $config['theme'];
|
494
|
$selected = "";
|
495
|
if($f == $curtheme)
|
496
|
$selected = " selected=\"selected\"";
|
497
|
?>
|
498
|
<option <?=$selected;?>><?=$f;?></option>
|
499
|
<?php endforeach; ?>
|
500
|
</select>
|
501
|
<strong>
|
502
|
<?=gettext("This will change the look and feel of"); ?>
|
503
|
<?=$g['product_name'];?>.
|
504
|
</strong>
|
505
|
</td>
|
506
|
</tr>
|
507
|
<?php endif; ?>
|
508
|
<tr>
|
509
|
<td colspan="2" class="list" height="12"> </td>
|
510
|
</tr>
|
511
|
<tr>
|
512
|
<td width="22%" valign="top"> </td>
|
513
|
<td width="78%">
|
514
|
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
|
515
|
</td>
|
516
|
</tr>
|
517
|
</table>
|
518
|
</div>
|
519
|
</td></tr>
|
520
|
</table>
|
521
|
</form>
|
522
|
<?php include("fend.inc"); ?>
|
523
|
</body>
|
524
|
</html>
|