Project

General

Profile

Download (19.1 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * system.php
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2016 Electric Sheep Fencing, LLC
7
 * All rights reserved.
8
 *
9
 * originally based on m0n0wall (http://m0n0.ch/wall)
10
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
 * All rights reserved.
12
 *
13
 * Redistribution and use in source and binary forms, with or without
14
 * modification, are permitted provided that the following conditions are met:
15
 *
16
 * 1. Redistributions of source code must retain the above copyright notice,
17
 *    this list of conditions and the following disclaimer.
18
 *
19
 * 2. Redistributions in binary form must reproduce the above copyright
20
 *    notice, this list of conditions and the following disclaimer in
21
 *    the documentation and/or other materials provided with the
22
 *    distribution.
23
 *
24
 * 3. All advertising materials mentioning features or use of this software
25
 *    must display the following acknowledgment:
26
 *    "This product includes software developed by the pfSense Project
27
 *    for use in the pfSense® software distribution. (http://www.pfsense.org/).
28
 *
29
 * 4. The names "pfSense" and "pfSense Project" must not be used to
30
 *    endorse or promote products derived from this software without
31
 *    prior written permission. For written permission, please contact
32
 *    coreteam@pfsense.org.
33
 *
34
 * 5. Products derived from this software may not be called "pfSense"
35
 *    nor may "pfSense" appear in their names without prior written
36
 *    permission of the Electric Sheep Fencing, LLC.
37
 *
38
 * 6. Redistributions of any form whatsoever must retain the following
39
 *    acknowledgment:
40
 *
41
 * "This product includes software developed by the pfSense Project
42
 * for use in the pfSense software distribution (http://www.pfsense.org/).
43
 *
44
 * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
45
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
47
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
48
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
49
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
50
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
51
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
53
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
55
 * OF THE POSSIBILITY OF SUCH DAMAGE.
56
 */
57

    
58
##|+PRIV
59
##|*IDENT=page-system-generalsetup
60
##|*NAME=System: General Setup
61
##|*DESCR=Allow access to the 'System: General Setup' page.
62
##|*MATCH=system.php*
63
##|-PRIV
64

    
65
require_once("guiconfig.inc");
66
require_once("functions.inc");
67
require_once("filter.inc");
68
require_once("shaper.inc");
69
require_once("system.inc");
70

    
71
$pconfig['hostname'] = $config['system']['hostname'];
72
$pconfig['domain'] = $config['system']['domain'];
73
list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $config['system']['dnsserver'];
74

    
75
$arr_gateways = return_gateways_array();
76

    
77
// set default columns to two if unset
78
if (!isset($config['system']['webgui']['dashboardcolumns'])) {
79
	$config['system']['webgui']['dashboardcolumns'] = 2;
80
}
81

    
82
$pconfig['dns1gw'] = $config['system']['dns1gw'];
83
$pconfig['dns2gw'] = $config['system']['dns2gw'];
84
$pconfig['dns3gw'] = $config['system']['dns3gw'];
85
$pconfig['dns4gw'] = $config['system']['dns4gw'];
86

    
87
$pconfig['dnsallowoverride'] = isset($config['system']['dnsallowoverride']);
88
$pconfig['timezone'] = $config['system']['timezone'];
89
$pconfig['timeservers'] = $config['system']['timeservers'];
90
$pconfig['language'] = $config['system']['language'];
91
$pconfig['webguicss'] = $config['system']['webgui']['webguicss'];
92
$pconfig['webguifixedmenu'] = $config['system']['webgui']['webguifixedmenu'];
93
$pconfig['dashboardcolumns'] = $config['system']['webgui']['dashboardcolumns'];
94
$pconfig['webguileftcolumnhyper'] = isset($config['system']['webgui']['webguileftcolumnhyper']);
95
$pconfig['dashboardavailablewidgetspanel'] = isset($config['system']['webgui']['dashboardavailablewidgetspanel']);
96
$pconfig['systemlogsfilterpanel'] = isset($config['system']['webgui']['systemlogsfilterpanel']);
97
$pconfig['systemlogsmanagelogpanel'] = isset($config['system']['webgui']['systemlogsmanagelogpanel']);
98
$pconfig['statusmonitoringsettingspanel'] = isset($config['system']['webgui']['statusmonitoringsettingspanel']);
99
$pconfig['webguihostnamemenu'] = $config['system']['webgui']['webguihostnamemenu'];
100
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
101

    
102
if (!$pconfig['timezone']) {
103
	if (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
104
		$pconfig['timezone'] = $g['default_timezone'];
105
	} else {
106
		$pconfig['timezone'] = "Etc/UTC";
107
	}
108
}
109

    
110
if (!$pconfig['timeservers']) {
111
	$pconfig['timeservers'] = "pool.ntp.org";
112
}
113

    
114
$changedesc = gettext("System") . ": ";
115
$changecount = 0;
116

    
117
function is_timezone($elt) {
118
	return !preg_match("/\/$/", $elt);
119
}
120

    
121
if ($pconfig['timezone'] <> $_POST['timezone']) {
122
	filter_pflog_start(true);
123
}
124

    
125
$timezonelist = system_get_timezone_list();
126

    
127
$multiwan = false;
128
$interfaces = get_configured_interface_list();
129
foreach ($interfaces as $interface) {
130
	if (interface_has_gateway($interface)) {
131
		$multiwan = true;
132
	}
133
}
134

    
135
if ($_POST) {
136

    
137
	$changecount++;
138

    
139
	unset($input_errors);
140
	$pconfig = $_POST;
141

    
142
	/* input validation */
143
	$reqdfields = explode(" ", "hostname domain");
144
	$reqdfieldsn = array(gettext("Hostname"), gettext("Domain"));
145

    
146
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
147

    
148
	if ($_POST['webguicss']) {
149
		$config['system']['webgui']['webguicss'] = $_POST['webguicss'];
150
	} else {
151
		unset($config['system']['webgui']['webguicss']);
152
	}
153

    
154
	if ($_POST['webguifixedmenu']) {
155
		$config['system']['webgui']['webguifixedmenu'] = $_POST['webguifixedmenu'];
156
	} else {
157
		unset($config['system']['webgui']['webguifixedmenu']);
158
	}
159

    
160
	if ($_POST['webguihostnamemenu']) {
161
		$config['system']['webgui']['webguihostnamemenu'] = $_POST['webguihostnamemenu'];
162
	} else {
163
		unset($config['system']['webgui']['webguihostnamemenu']);
164
	}
165

    
166
	if ($_POST['dashboardcolumns']) {
167
		$config['system']['webgui']['dashboardcolumns'] = $_POST['dashboardcolumns'];
168
	} else {
169
		unset($config['system']['webgui']['dashboardcolumns']);
170
	}
171

    
172
	if ($_POST['hostname']) {
173
		if (!is_hostname($_POST['hostname'])) {
174
			$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'.");
175
		} else {
176
			if (!is_unqualified_hostname($_POST['hostname'])) {
177
				$input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
178
			}
179
		}
180
	}
181
	if ($_POST['domain'] && !is_domain($_POST['domain'])) {
182
		$input_errors[] = gettext("The domain may only contain the characters a-z, 0-9, '-' and '.'.");
183
	}
184

    
185
	$dnslist = $ignore_posted_dnsgw = array();
186

    
187
	for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
188
		$dnsname="dns{$dnscounter}";
189
		$dnsgwname="dns{$dnscounter}gw";
190
		$dnslist[] = $_POST[$dnsname];
191

    
192
		if (($_POST[$dnsname] && !is_ipaddr($_POST[$dnsname]))) {
193
			$input_errors[] = sprintf(gettext("A valid IP address must be specified for DNS server %s."), $dnscounter);
194
		} else {
195
			if (($_POST[$dnsgwname] <> "") && ($_POST[$dnsgwname] <> "none")) {
196
				// A real gateway has been selected.
197
				if (is_ipaddr($_POST[$dnsname])) {
198
					if ((is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) {
199
						$input_errors[] = sprintf(gettext('The IPv6 gateway "%1$s" can not be specified for IPv4 DNS server "%2$s".'), $_POST[$dnsgwname], $_POST[$dnsname]);
200
					}
201
					if ((is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) {
202
						$input_errors[] = sprintf(gettext('The IPv4 gateway "%1$s" can not be specified for IPv6 DNS server "%2$s".'), $_POST[$dnsgwname], $_POST[$dnsname]);
203
					}
204
				} else {
205
					// The user selected a gateway but did not provide a DNS address. Be nice and set the gateway back to "none".
206
					$ignore_posted_dnsgw[$dnsgwname] = true;
207
				}
208
			}
209
		}
210
	}
211

    
212
	if (count(array_filter($dnslist)) != count(array_unique(array_filter($dnslist)))) {
213
		$input_errors[] = gettext('Each configured DNS server must have a unique IP address. Remove the duplicated IP.');
214
	}
215

    
216
	$direct_networks_list = explode(" ", filter_get_direct_networks_list());
217
	for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
218
		$dnsitem = "dns{$dnscounter}";
219
		$dnsgwitem = "dns{$dnscounter}gw";
220
		if ($_POST[$dnsgwitem]) {
221
			if (interface_has_gateway($_POST[$dnsgwitem])) {
222
				foreach ($direct_networks_list as $direct_network) {
223
					if (ip_in_subnet($_POST[$dnsitem], $direct_network)) {
224
						$input_errors[] = sprintf(gettext("A gateway can not be assigned to DNS '%s' server which is on a directly connected network."), $_POST[$dnsitem]);
225
					}
226
				}
227
			}
228
		}
229
	}
230

    
231
	# it's easy to have a little too much whitespace in the field, clean it up for the user before processing.
232
	$_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']);
233
	$_POST['timeservers'] = trim($_POST['timeservers']);
234
	foreach (explode(' ', $_POST['timeservers']) as $ts) {
235
		if (!is_domain($ts)) {
236
			$input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
237
		}
238
	}
239

    
240
	if (!$input_errors) {
241
		update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']);
242
		update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
243
		update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
244
		update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
245

    
246
		if ($_POST['language'] && $_POST['language'] != $config['system']['language']) {
247
			$config['system']['language'] = $_POST['language'];
248
			set_language();
249
		}
250

    
251
		unset($config['system']['webgui']['webguileftcolumnhyper']);
252
		$config['system']['webgui']['webguileftcolumnhyper'] = $_POST['webguileftcolumnhyper'] ? true : false;
253

    
254
		unset($config['system']['webgui']['dashboardavailablewidgetspanel']);
255
		$config['system']['webgui']['dashboardavailablewidgetspanel'] = $_POST['dashboardavailablewidgetspanel'] ? true : false;
256

    
257
		unset($config['system']['webgui']['systemlogsfilterpanel']);
258
		$config['system']['webgui']['systemlogsfilterpanel'] = $_POST['systemlogsfilterpanel'] ? true : false;
259

    
260
		unset($config['system']['webgui']['systemlogsmanagelogpanel']);
261
		$config['system']['webgui']['systemlogsmanagelogpanel'] = $_POST['systemlogsmanagelogpanel'] ? true : false;
262

    
263
		unset($config['system']['webgui']['statusmonitoringsettingspanel']);
264
		$config['system']['webgui']['statusmonitoringsettingspanel'] = $_POST['statusmonitoringsettingspanel'] ? true : false;
265

    
266
		/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
267
		$olddnsservers = $config['system']['dnsserver'];
268
		unset($config['system']['dnsserver']);
269
		if ($_POST['dns1']) {
270
			$config['system']['dnsserver'][] = $_POST['dns1'];
271
		}
272
		if ($_POST['dns2']) {
273
			$config['system']['dnsserver'][] = $_POST['dns2'];
274
		}
275
		if ($_POST['dns3']) {
276
			$config['system']['dnsserver'][] = $_POST['dns3'];
277
		}
278
		if ($_POST['dns4']) {
279
			$config['system']['dnsserver'][] = $_POST['dns4'];
280
		}
281

    
282
		$olddnsallowoverride = $config['system']['dnsallowoverride'];
283

    
284
		unset($config['system']['dnsallowoverride']);
285
		$config['system']['dnsallowoverride'] = $_POST['dnsallowoverride'] ? true : false;
286

    
287
		if ($_POST['dnslocalhost'] == "yes") {
288
			$config['system']['dnslocalhost'] = true;
289
		} else {
290
			unset($config['system']['dnslocalhost']);
291
		}
292

    
293
		/* which interface should the dns servers resolve through? */
294
		$outdnscounter = 0;
295
		for ($dnscounter=1; $dnscounter<5; $dnscounter++) {
296
			$dnsname="dns{$dnscounter}";
297
			$dnsgwname="dns{$dnscounter}gw";
298
			$olddnsgwname = $config['system'][$dnsgwname];
299

    
300
			if ($ignore_posted_dnsgw[$dnsgwname]) {
301
				$thisdnsgwname = "none";
302
			} else {
303
				$thisdnsgwname = $pconfig[$dnsgwname];
304
			}
305

    
306
			// "Blank" out the settings for this index, then we set them below using the "outdnscounter" index.
307
			$config['system'][$dnsgwname] = "none";
308
			$pconfig[$dnsgwname] = "none";
309
			$pconfig[$dnsname] = "";
310

    
311
			if ($_POST[$dnsname]) {
312
				// Only the non-blank DNS servers were put into the config above.
313
				// So we similarly only add the corresponding gateways sequentially to the config (and to pconfig), as we find non-blank DNS servers.
314
				// 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.
315
				$outdnscounter++;
316
				$outdnsname="dns{$outdnscounter}";
317
				$outdnsgwname="dns{$outdnscounter}gw";
318
				$pconfig[$outdnsname] = $_POST[$dnsname];
319
				if ($_POST[$dnsgwname]) {
320
					$config['system'][$outdnsgwname] = $thisdnsgwname;
321
					$pconfig[$outdnsgwname] = $thisdnsgwname;
322
				} else {
323
					// Note: when no DNS GW name is chosen, the entry is set to "none", so actually this case never happens.
324
					unset($config['system'][$outdnsgwname]);
325
					$pconfig[$outdnsgwname] = "";
326
				}
327
			}
328
			if (($olddnsgwname != "") && ($olddnsgwname != "none") && (($olddnsgwname != $thisdnsgwname) || ($olddnsservers[$dnscounter-1] != $_POST[$dnsname]))) {
329
				// A previous DNS GW name was specified. It has now gone or changed, or the DNS server address has changed.
330
				// Remove the route. Later calls will add the correct new route if needed.
331
				if (is_ipaddrv4($olddnsservers[$dnscounter-1])) {
332
					mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter-1]));
333
				} else if (is_ipaddrv6($olddnsservers[$dnscounter-1])) {
334
					mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter-1]));
335
				}
336
			}
337
		}
338

    
339
		if ($changecount > 0) {
340
			write_config($changedesc);
341
		}
342

    
343
		$retval = 0;
344
		$retval = system_hostname_configure();
345
		$retval |= system_hosts_generate();
346
		$retval |= system_resolvconf_generate();
347
		if (isset($config['dnsmasq']['enable'])) {
348
			$retval |= services_dnsmasq_configure();
349
		} elseif (isset($config['unbound']['enable'])) {
350
			$retval |= services_unbound_configure();
351
		}
352
		$retval |= system_timezone_configure();
353
		$retval |= system_ntp_configure();
354

    
355
		if ($olddnsallowoverride != $config['system']['dnsallowoverride']) {
356
			$retval |= send_event("service reload dns");
357
		}
358

    
359
		// Reload the filter - plugins might need to be run.
360
		$retval |= filter_configure();
361

    
362
		$savemsg = get_std_save_message($retval);
363
	}
364

    
365
	unset($ignore_posted_dnsgw);
366
}
367

    
368
$pgtitle = array(gettext("System"), gettext("General Setup"));
369
include("head.inc");
370

    
371
if ($input_errors) {
372
	print_input_errors($input_errors);
373
}
374

    
375
if ($savemsg) {
376
	print_info_box($savemsg, 'success');
377
}
378
?>
379
<div id="container">
380
<?php
381

    
382
$form = new Form;
383
$section = new Form_Section('System');
384
$section->addInput(new Form_Input(
385
	'hostname',
386
	'Hostname',
387
	'text',
388
	$pconfig['hostname'],
389
	['placeholder' => 'pfSense']
390
))->setHelp('Name of the firewall host, without domain part');
391
$section->addInput(new Form_Input(
392
	'domain',
393
	'Domain',
394
	'text',
395
	$pconfig['domain'],
396
	['placeholder' => 'mycorp.com, home, office, private, etc.']
397
))->setHelp('Do not use \'local\' as a domain name. It will cause local '.
398
	'hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve '.
399
	'local hosts not running mDNS.');
400
$form->add($section);
401

    
402
$section = new Form_Section('DNS Server Settings');
403

    
404
for ($i=1; $i<5; $i++) {
405
//	if (!isset($pconfig['dns'.$i]))
406
//		continue;
407

    
408
	$group = new Form_Group('DNS Server ' . $i);
409

    
410
	$group->add(new Form_Input(
411
		'dns' . $i,
412
		'DNS Server',
413
		'text',
414
		$pconfig['dns'. $i]
415
	))->setHelp(($i == 4) ? 'Address':null);
416

    
417
	$help = "Enter IP addresses to be used by the system for DNS resolution. " .
418
		"These are also used for the DHCP service, DNS forwarder and for PPTP VPN clients.";
419

    
420
	if ($multiwan)	{
421
		$options = array('none' => 'none');
422

    
423
		foreach ($arr_gateways as $gwname => $gwitem) {
424
			if ((is_ipaddrv4(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv6($gwitem['gateway'])))) {
425
				continue;
426
			}
427

    
428
			if ((is_ipaddrv6(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv4($gwitem['gateway'])))) {
429
				continue;
430
			}
431

    
432
			$options[$gwname] = $gwname.' - '.$gwitem['friendlyiface'].' - '.$gwitem['gateway'];
433
		}
434

    
435
		$group->add(new Form_Select(
436
			'dns' . $i . 'gw',
437
			'Gateway',
438
			$pconfig['dns' . $i . 'gw'],
439
			$options
440
		))->setHelp(($i == 4) ? 'Gateway':null);;
441

    
442
		$help .= '<br/>'. "In addition, optionally select the gateway for each DNS server. " .
443
			"When using multiple WAN connections there should be at least one unique DNS server per gateway.";
444
	}
445

    
446
	if ($i == 4) {
447
		$group->setHelp($help);
448
	}
449

    
450
	$section->add($group);
451
}
452

    
453
$section->addInput(new Form_Checkbox(
454
	'dnsallowoverride',
455
	'DNS Server Override',
456
	'Allow DNS server list to be overridden by DHCP/PPP on WAN',
457
	$pconfig['dnsallowoverride']
458
))->setHelp(sprintf(gettext('If this option is set, %s will use DNS servers '.
459
	'assigned by a DHCP/PPP server on WAN for its own purposes (including '.
460
	'the DNS forwarder). However, they will not be assigned to DHCP and PPTP '.
461
	'VPN clients.'), $g['product_name']));
462

    
463
$section->addInput(new Form_Checkbox(
464
	'dnslocalhost',
465
	'Disable DNS Forwarder',
466
	'Do not use the DNS Forwarder as a DNS server for the firewall',
467
	$pconfig['dnslocalhost']
468
))->setHelp('By default localhost (127.0.0.1) will be used as the first DNS '.
469
	'server where the DNS Forwarder or DNS Resolver is enabled and set to '.
470
	'listen on Localhost, so system can use the local DNS service to perform '.
471
	'lookups. Checking this box omits localhost from the list of DNS servers.');
472

    
473
$form->add($section);
474

    
475
$section = new Form_Section('Localization');
476
$section->addInput(new Form_Select(
477
	'timezone',
478
	'Timezone',
479
	$pconfig['timezone'],
480
	array_combine($timezonelist, $timezonelist)
481
))->setHelp('Select the timezone or location within the timezone to be used by this system.');
482
$section->addInput(new Form_Input(
483
	'timeservers',
484
	'Timeservers',
485
	'text',
486
	$pconfig['timeservers']
487
))->setHelp('Use a space to separate multiple hosts (only one required). '.
488
	'Remember to set up at least one DNS server if a host name is entered here!');
489
$section->addInput(new Form_Select(
490
	'language',
491
	'Language',
492
	$pconfig['language'],
493
	get_locale_list()
494
))->setHelp('Choose a language for the webConfigurator');
495

    
496
$form->add($section);
497

    
498
$section = new Form_Section('webConfigurator');
499

    
500
gen_webguicss_field($section, $pconfig['webguicss']);
501
gen_webguifixedmenu_field($section, $pconfig['webguifixedmenu']);
502
gen_webguihostnamemenu_field($section, $pconfig['webguihostnamemenu']);
503
gen_dashboardcolumns_field($section, $pconfig['dashboardcolumns']);
504
gen_associatedpanels_fields(
505
	$section,
506
	$pconfig['dashboardavailablewidgetspanel'],
507
	$pconfig['systemlogsfilterpanel'],
508
	$pconfig['systemlogsmanagelogpanel'],
509
	$pconfig['statusmonitoringsettingspanel']);
510
gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
511

    
512
$form->add($section);
513

    
514
print $form;
515

    
516
$csswarning = sprintf(gettext("%sUser-created themes are unsupported, use at your own risk."), "<br />");
517

    
518
?>
519
</div>
520

    
521
<script>
522
//<![CDATA[
523
events.push(function() {
524

    
525
	function setThemeWarning() {
526
		if ($('#webguicss').val().startsWith("pfSense")) {
527
			$('#csstxt').html("").addClass("text-default");
528
		} else {
529
			$('#csstxt').html("<?=$csswarning?>").addClass("text-danger");
530
		}
531
	}
532

    
533
	$('#webguicss').change(function() {
534
		setThemeWarning();
535
	});
536

    
537
	setThemeWarning();
538
});
539
//]]>
540
</script>
541

    
542
<?php
543
include("foot.inc");
544
?>
(184-184/225)