forked from OCSInventory-NG/OCSInventory-ocsreports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
var.php
182 lines (170 loc) · 5.63 KB
/
var.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php
/*
* Copyright 2005-2016 OCSInventory-NG/OCSInventory-ocsreports contributors.
* See the Contributors file for more details about them.
*
* This file is part of OCSInventory-NG/OCSInventory-ocsreports.
*
* OCSInventory-NG/OCSInventory-ocsreports is free software: you can redistribute
* it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the License,
* or (at your option) any later version.
*
* OCSInventory-NG/OCSInventory-ocsreports is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OCSInventory-NG/OCSInventory-ocsreports. if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
@session_start();
define('DOCUMENT_REAL_ROOT', dirname(__FILE__));
define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
//====================================================================================
// Default configuration dir (Logs / Data / Document root / Sql config file)
//====================================================================================
/**
* Ocsreports root folder ( /usr/share/ocsinventory-reports/ocsreports by default)
*/
define('ETC_DIR', DOCUMENT_REAL_ROOT);
/**
* Default lib directory
*/
define('VARLIB_DIR', "/var/lib/ocsinventory-reports");
/**
* Default log directory
*/
define('VARLOG_DIR', "/var/lib/ocsinventory-reports");
/**
* Database configuration infos
*/
define('CONF_MYSQL_DIR', ETC_DIR);
define('CONF_MYSQL', CONF_MYSQL_DIR . '/dbconfig.inc.php');
//====================================================================================
// Librairies / Backend / Mac address file
//====================================================================================
/**
* Mac address file
*/
define('MAC_FILE', __DIR__ . '/files/oui.txt');
/**
* Backend folder (AUTH / CAS / etc )
*/
define('BACKEND', __DIR__ . '/backend/');
/**
* Autoload composer
*/
define('COMPOSER_AUTOLOAD', __DIR__ . '/vendor/autoload.php');
/**
* Template Mail Directory
*/
define('TEMPLATE', __DIR__.'/templates/');
//====================================================================================
// GUI Options
//====================================================================================
/**
* OCS' MySQL database version
*/
define('GUI_VER', '7051');
/**
* GUI Version
*/
define('GUI_VER_SHOW', '2.9.1');
/**
* Default GUI language
*/
define('DEFAULT_LANGUAGE', 'en_GB');
define('PAG_INDEX', 'function');
define('UPDATE_JSON_URI', 'http://check-version.ocsinventory-ng.org');
define('URL_NEWS', 'http://check-version.ocsinventory-ng.org/newsfeed.json');
//====================================================================================
// Default OCS DIR
//====================================================================================
/**
* Configuration directory
*/
define('CONFIG_DIR', __DIR__ . '/config/');
/**
* Profiles directory
*/
define('PROFILES_DIR', CONFIG_DIR.'profiles/');
/**
* Computer detail configuration directory
*/
define('CD_CONFIG_DIR', CONFIG_DIR . 'computer/');
/**
* Plugins directory
*/
define('PLUGINS_DIR', __DIR__ . '/plugins/');
define('PLUGINS_GUI_DIR', '/tmp/');
/**
* Language dir
*/
define('LANGUAGE_DIR', PLUGINS_DIR . "language/");
/**
* HEADER for ocsreports
*/
define('HEADER_HTML', __DIR__ . '/require/html_header.php');
/**
* FOOTER for ocsreports
*/
define('FOOTER_HTML', __DIR__ . '/require/footer.php');
/**
* Main section directory
*/
define('MAIN_SECTIONS_DIR', PLUGINS_DIR . "main_sections/");
define('MAIN_SECTIONS_DIR_VISU', "plugins/main_sections/");
/**
* Theme options
*/
define('THEMES_DIR', __DIR__ . '/themes/');
define('DEFAULT_THEME', "OCS");
/**
* DEV Options
*/
define('DEV_OPTION', false);
//====================================================================================
// Authentication Configuration
//====================================================================================
/**
* Define the auth type :
* - 1 : Local Only
* - 2 : Local and LDAP
* - 3 : LDAP Only
* - 4 : LDAP with SSO
* - 5 : Always OK, won't ask for user and password
*
* If LDAP / SSO Basic auth is configured, please configure the LDAP Authentication
*/
define('AUTH_TYPE', 1);
/**
* Auth Insecure LDAP, skip SSL Cert (not recommended)
* Note : OCS doesn't manage certificate for Ldaps, please edit "/etc/ldap/ldap.conf" to set proper certificate
*/
define('AUTH_LDAP_SKIP_CERT', false);
//====================================================================================
// Plugins Configuration
//====================================================================================
/**
* Directory where you put extensions sources
*/
define('EXT_DL_DIR', __DIR__ . '/extensions/');
//====================================================================================
// Misc Options
//====================================================================================
define('PC4PAGE', 20);
define('CSRF', 1000);
//====================================================================================
// Demo mode config and defaults accounts logins
//====================================================================================
define('DEMO', false);
define('DEMO_LOGIN', 'demo');
define('DEMO_PASSWD', 'demo');
define('DFT_DB_CMPT', 'ocs');
define('DFT_DB_PSWD', 'ocs');
define('DFT_GUI_CMPT', 'admin');
define('DFT_GUI_PSWD', 'admin');
?>