-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathconfig.php
41 lines (35 loc) · 1.16 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// $res = 0;
// if (! $res && file_exists("../main.inc.php")) {
// $res = @include("../main.inc.php");
// }
// if (! $res && file_exists("../../main.inc.php")) {
// $res = @include("../../main.inc.php");
// }
// if (! $res && file_exists("../../../main.inc.php")) {
// $res = @include("../../../main.inc.php");
// }
// if (! $res) {
// die("Main include failed");
// }
if(is_file('../main.inc.php'))$dir = '../';
else if(is_file('../../../main.inc.php'))$dir = '../../../';
else $dir = '../../';
if(!defined('INC_FROM_DOLIBARR') && defined('INC_FROM_CRON_SCRIPT')) {
include($dir."master.inc.php");
}
elseif(!defined('INC_FROM_DOLIBARR')) {
include($dir."main.inc.php");
} else {
global $dolibarr_main_db_host, $dolibarr_main_db_name, $dolibarr_main_db_user, $dolibarr_main_db_pass;
}
if(!defined('DB_HOST')) {
define('DB_HOST',$dolibarr_main_db_host);
define('DB_NAME',$dolibarr_main_db_name);
define('DB_USER',$dolibarr_main_db_user);
define('DB_PASS',$dolibarr_main_db_pass);
define('DB_DRIVER',$dolibarr_main_db_type);
}
if(!dol_include_once('/abricot/inc.core.php')) {
require __DIR__.'/class/listview.class.php'; // why not ? ;)
}