]>
Commit | Line | Data |
---|---|---|
20b87346 ER |
1 | <?php |
2 | /* | |
3 | * Eventum setup for PLD Linux. | |
4 | * | |
5 | * This configuration file sets up system paths for eventum. | |
6 | * You shouldn't be needing to change anything in this file. | |
7 | * All changes should go to /etc/eventum/config.php | |
8 | * But, if You do need to change something in this config, please let us know! | |
9 | */ | |
10 | ||
11 | ini_set('allow_url_fopen', 0); | |
12 | ini_set("display_errors", 0); | |
20b87346 ER |
13 | set_time_limit(0); |
14 | // prevent session from messing up the browser cache | |
15 | ini_set('session.cache_limiter', 'nocache'); | |
16 | ||
17 | // definitions of path related variables | |
08437ed1 ER |
18 | define("APP_PATH", '/usr/share/eventum/htdocs/'); |
19 | define("APP_INC_PATH", "/usr/share/eventum/include/"); | |
20 | define("APP_PEAR_PATH", APP_INC_PATH . "pear/"); | |
21 | define("APP_TPL_PATH", "/usr/share/eventum/templates/"); | |
22 | define("APP_SMARTY_PATH", "/usr/share/pear/Smarty/"); | |
23 | define("APP_JPGRAPH_PATH", APP_INC_PATH . "jpgraph/"); | |
24 | define("APP_LOG_PATH", "/var/log/eventum/"); | |
25 | define("APP_LOCKS_PATH", "/var/run/eventum/"); | |
20b87346 ER |
26 | ini_set("include_path", ".:" . APP_PEAR_PATH); |
27 | ||
08437ed1 ER |
28 | define("APP_SETUP_PATH", APP_PATH); |
29 | define("APP_SETUP_FILE", "/etc/eventum/setup.php"); | |
20b87346 | 30 | |
08437ed1 ER |
31 | define("APP_ERROR_LOG", APP_LOG_PATH . "errors.log"); |
32 | define("APP_CLI_LOG", APP_LOG_PATH . "cli.log"); | |
33 | define("APP_IRC_LOG", APP_LOG_PATH . "irc_bot.log"); | |
34 | define("APP_LOGIN_LOG", APP_LOG_PATH . "login_attempts.log"); | |
20b87346 | 35 | |
08437ed1 | 36 | define("APP_VERSION", "%{APP_VERSION}%"); |
20b87346 ER |
37 | |
38 | // define the user_id of system user | |
08437ed1 | 39 | define("APP_SYSTEM_USER_ID", 1); |
20b87346 | 40 | |
08437ed1 | 41 | define("APP_BENCHMARK", false); |
20b87346 ER |
42 | |
43 | # include site config | |
44 | include_once '/etc/eventum/config.php'; | |
45 | ||
46 | if (APP_BENCHMARK) { | |
47 | // always benchmark the scripts | |
48 | include_once("Benchmark/Timer.php"); | |
49 | $bench = new Benchmark_Timer; | |
50 | $bench->start(); | |
51 | } | |
52 | ||
53 | include_once(APP_INC_PATH . "class.misc.php"); | |
54 | ||
55 | if (isset($_GET)) { | |
56 | $HTTP_POST_VARS = $_POST; | |
57 | $HTTP_GET_VARS = $_GET; | |
58 | $HTTP_SERVER_VARS = $_SERVER; | |
59 | $HTTP_ENV_VARS = $_ENV; | |
60 | $HTTP_POST_FILES = $_FILES; | |
61 | // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global... | |
62 | if (isset($_SESSION)) { | |
63 | $HTTP_SESSION_VARS = $_SESSION; | |
64 | } | |
65 | $HTTP_COOKIE_VARS = $_COOKIE; | |
66 | } | |
67 | ||
68 | // fix magic_quote_gpc'ed values (i wish i knew who is the person behind this) | |
69 | $HTTP_GET_VARS =& Misc::dispelMagicQuotes($HTTP_GET_VARS); | |
70 | $HTTP_POST_VARS =& Misc::dispelMagicQuotes($HTTP_POST_VARS); | |
71 | ||
72 | // handle the language preferences now | |
08437ed1 | 73 | include_once(APP_INC_PATH . "class.language.php"); |
20b87346 ER |
74 | Language::setPreference(); |
75 | ||
76 | // set charset | |
77 | header("Content-Type: text/html; charset=" . APP_CHARSET); | |
78 | ||
79 | /* vim: set expandtab tabstop=4 shiftwidth=4: */ | |
80 | ?> |