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