1 |
65e2c06c
|
Erik
|
<?php
|
2 |
09221bc3
|
Renato Botelho
|
/*
|
3 |
ac24dc24
|
Renato Botelho
|
* config.gui.inc
|
4 |
|
|
*
|
5 |
|
|
* part of pfSense (https://www.pfsense.org)
|
6 |
38809d47
|
Renato Botelho do Couto
|
* Copyright (c) 2004-2013 BSD Perimeter
|
7 |
|
|
* Copyright (c) 2013-2016 Electric Sheep Fencing
|
8 |
8f2f85c3
|
Luiz Otavio O Souza
|
* Copyright (c) 2014-2022 Rubicon Communications, LLC (Netgate)
|
9 |
ac24dc24
|
Renato Botelho
|
* All rights reserved.
|
10 |
|
|
*
|
11 |
|
|
* originally part of m0n0wall (http://m0n0.ch/wall)
|
12 |
c5d81585
|
Renato Botelho
|
* Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
13 |
ac24dc24
|
Renato Botelho
|
* All rights reserved.
|
14 |
|
|
*
|
15 |
b12ea3fb
|
Renato Botelho
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
16 |
|
|
* you may not use this file except in compliance with the License.
|
17 |
|
|
* You may obtain a copy of the License at
|
18 |
ac24dc24
|
Renato Botelho
|
*
|
19 |
b12ea3fb
|
Renato Botelho
|
* http://www.apache.org/licenses/LICENSE-2.0
|
20 |
ac24dc24
|
Renato Botelho
|
*
|
21 |
b12ea3fb
|
Renato Botelho
|
* Unless required by applicable law or agreed to in writing, software
|
22 |
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
23 |
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
24 |
|
|
* See the License for the specific language governing permissions and
|
25 |
|
|
* limitations under the License.
|
26 |
ac24dc24
|
Renato Botelho
|
*/
|
27 |
65e2c06c
|
Erik
|
|
28 |
06f61915
|
Ermal Lu?i
|
require_once("globals.inc");
|
29 |
|
|
|
30 |
65e2c06c
|
Erik
|
/* do not load this file twice. */
|
31 |
1e0b1727
|
Phil Davis
|
if ($config_parsed == true) {
|
32 |
65e2c06c
|
Erik
|
return;
|
33 |
1e0b1727
|
Phil Davis
|
} else {
|
34 |
1883455a
|
Ermal
|
$config_parsed = true;
|
35 |
1e0b1727
|
Phil Davis
|
}
|
36 |
65e2c06c
|
Erik
|
|
37 |
|
|
/* include globals from notices.inc /utility/XML parser files */
|
38 |
|
|
require_once('config.lib.inc');
|
39 |
|
|
require_once("notices.inc");
|
40 |
|
|
require_once("util.inc");
|
41 |
470fddb1
|
Renato Botelho
|
require_once("Net/IPv6.php");
|
42 |
1e0b1727
|
Phil Davis
|
if (file_exists("/cf/conf/use_xmlreader")) {
|
43 |
093bcebc
|
Scott Ullrich
|
require_once("xmlreader.inc");
|
44 |
1e0b1727
|
Phil Davis
|
} else {
|
45 |
093bcebc
|
Scott Ullrich
|
require_once("xmlparse.inc");
|
46 |
1e0b1727
|
Phil Davis
|
}
|
47 |
65e2c06c
|
Erik
|
require_once("crypt.inc");
|
48 |
|
|
|
49 |
|
|
/* if /debugging exists, lets set $debugging
|
50 |
|
|
so we can output more information */
|
51 |
1e0b1727
|
Phil Davis
|
if (file_exists("/debugging")) {
|
52 |
65e2c06c
|
Erik
|
$debugging = true;
|
53 |
|
|
$g['debug'] = true;
|
54 |
|
|
}
|
55 |
|
|
|
56 |
|
|
$config = parse_config();
|
57 |
|
|
|
58 |
1ad2dc5b
|
Ermal LUÇI
|
/* set timezone */
|
59 |
ecaca752
|
Renato Botelho
|
if (isset($config['system']['timezone']) &&
|
60 |
|
|
!empty($config['system']['timezone'])) {
|
61 |
|
|
$timezone = $config['system']['timezone'];
|
62 |
|
|
} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
|
63 |
|
|
$timezone = $g['default_timezone'];
|
64 |
|
|
} else {
|
65 |
1e0b1727
|
Phil Davis
|
$timezone = "Etc/UTC";
|
66 |
|
|
}
|
67 |
1ad2dc5b
|
Ermal LUÇI
|
date_default_timezone_set("$timezone");
|
68 |
|
|
|
69 |
1e0b1727
|
Phil Davis
|
if ($config_parsed == true) {
|
70 |
65e2c06c
|
Erik
|
/* process packager manager custom rules */
|
71 |
1e0b1727
|
Phil Davis
|
if (is_dir("/usr/local/pkg/parse_config")) {
|
72 |
65e2c06c
|
Erik
|
run_plugins("/usr/local/pkg/parse_config/");
|
73 |
|
|
}
|
74 |
|
|
}
|
75 |
|
|
|
76 |
9b1ff028
|
Seth Mos
|
?>
|