25 require
'../../main.inc.php';
28 $langs->loadLangs(array(
"install",
"user",
"admin"));
45 print
load_fiche_titre($langs->trans(
"ConfigurationFile").
' ('.$conffiletoshowshort.
')');
47 $configfileparameters = array(
48 'dolibarr_main_url_root',
49 'dolibarr_main_url_root_alt',
50 'dolibarr_main_document_root',
51 'dolibarr_main_document_root_alt',
52 'dolibarr_main_data_root',
54 'dolibarr_main_db_host',
55 'dolibarr_main_db_port',
56 'dolibarr_main_db_name',
57 'dolibarr_main_db_type',
58 'dolibarr_main_db_user',
59 'dolibarr_main_db_pass',
60 'dolibarr_main_db_character_set',
61 'dolibarr_main_db_collation',
62 '?dolibarr_main_db_prefix',
64 'dolibarr_main_authentication',
66 '?dolibarr_main_auth_ldap_login_attribute',
67 '?dolibarr_main_auth_ldap_host',
68 '?dolibarr_main_auth_ldap_port',
69 '?dolibarr_main_auth_ldap_version',
70 '?dolibarr_main_auth_ldap_dn',
71 '?dolibarr_main_auth_ldap_admin_login',
72 '?dolibarr_main_auth_ldap_admin_pass',
73 '?dolibarr_main_auth_ldap_debug',
75 '?dolibarr_lib_ADODB_PATH',
76 '?dolibarr_lib_FPDF_PATH',
77 '?dolibarr_lib_TCPDF_PATH',
78 '?dolibarr_lib_FPDI_PATH',
79 '?dolibarr_lib_TCPDI_PATH',
80 '?dolibarr_lib_NUSOAP_PATH',
81 '?dolibarr_lib_GEOIP_PATH',
82 '?dolibarr_lib_ODTPHP_PATH',
83 '?dolibarr_lib_ODTPHP_PATHTOPCLZIP',
84 '?dolibarr_js_CKEDITOR',
85 '?dolibarr_js_JQUERY',
86 '?dolibarr_js_JQUERY_UI',
87 '?dolibarr_font_DOL_DEFAULT_TTF',
88 '?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
90 '?dolibarr_mailing_limit_sendbyweb',
91 '?dolibarr_mailing_limit_sendbycli',
92 '?dolibarr_mailing_limit_sendbyday',
93 '?dolibarr_strict_mode'
95 $configfilelib = array(
97 $langs->trans(
"URLRoot"),
98 $langs->trans(
"URLRoot").
' (alt)',
99 $langs->trans(
"DocumentRootServer"),
100 $langs->trans(
"DocumentRootServer").
' (alt)',
101 $langs->trans(
"DataRootServer"),
103 $langs->trans(
"DatabaseServer"),
104 $langs->trans(
"DatabasePort"),
105 $langs->trans(
"DatabaseName"),
106 $langs->trans(
"DriverType"),
107 $langs->trans(
"DatabaseUser"),
108 $langs->trans(
"DatabasePassword"),
109 $langs->trans(
"DBStoringCharset"),
110 $langs->trans(
"DBSortingCharset"),
111 $langs->trans(
"Prefix"),
113 $langs->trans(
"AuthenticationMode"),
115 'dolibarr_main_auth_ldap_login_attribute',
116 'dolibarr_main_auth_ldap_host',
117 'dolibarr_main_auth_ldap_port',
118 'dolibarr_main_auth_ldap_version',
119 'dolibarr_main_auth_ldap_dn',
120 'dolibarr_main_auth_ldap_admin_login',
121 'dolibarr_main_auth_ldap_admin_pass',
122 'dolibarr_main_auth_ldap_debug',
124 'dolibarr_lib_ADODB_PATH',
125 'dolibarr_lib_TCPDF_PATH',
126 'dolibarr_lib_FPDI_PATH',
127 'dolibarr_lib_NUSOAP_PATH',
128 'dolibarr_lib_GEOIP_PATH',
129 'dolibarr_lib_ODTPHP_PATH',
130 'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
131 'dolibarr_js_CKEDITOR',
132 'dolibarr_js_JQUERY',
133 'dolibarr_js_JQUERY_UI',
134 'dolibarr_font_DOL_DEFAULT_TTF',
135 'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
137 'Limit nb of email sent by page',
138 'Strict mode is on/off'
141 print
'<table class="noborder centpercent">';
142 print
'<tr class="liste_titre"><td width="280">'.$langs->trans(
"Label").
'</td>';
143 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
144 print
'<td>'.$langs->trans(
"Value").
'</td>';
147 foreach ($configfileparameters as $key) {
150 if ($key ==
'dolibarr_main_url_root_alt' && empty(${$key})) {
153 if ($key ==
'dolibarr_main_document_root_alt' && empty(${$key})) {
157 if (empty($ignore)) {
158 $newkey = preg_replace(
'/^\?/',
'', $key);
160 if (preg_match(
'/^\?/', $key) && empty(${$newkey})) {
165 if ($newkey ==
'separator' && $lastkeyshown ==
'separator') {
170 print
'<tr class="oddeven">';
171 if ($newkey ==
'separator') {
172 print
'<td colspan="3"> </td>';
175 print
"<td>".$configfilelib[$i].
'</td>';
177 print
'<td>'.$newkey.
'</td>';
180 if ($newkey ==
'dolibarr_main_db_pass') {
181 print preg_replace(
'/./i',
'*', ${$newkey});
182 } elseif ($newkey ==
'dolibarr_main_url_root' && preg_match(
'/__auto__/', ${$newkey})) {
183 print ${$newkey}.
' => '.constant(
'DOL_MAIN_URL_ROOT');
187 if ($newkey ==
'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) {
188 print
' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.
')';
193 $lastkeyshown = $newkey;
204 print
'<table class="noborder">';
205 print
'<tr class="liste_titre">';
206 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
207 print
'<td>'.$langs->trans(
"Value").
'</td>';
208 if (empty($conf->multicompany->enabled) || !$user->entity) {
209 print
'<td>'.$langs->trans(
"Entity").
'</td>';
215 $sql .=
", ".$db->decrypt(
'name').
" as name";
216 $sql .=
", ".$db->decrypt(
'value').
" as value";
220 $sql .=
" FROM ".MAIN_DB_PREFIX.
"const";
221 if (empty($conf->multicompany->enabled)) {
223 $sql .=
" WHERE entity IN (0,".$conf->entity.
")";
227 $sql .=
" WHERE entity IN (".$db->sanitize($user->entity.
",".$conf->entity).
")";
230 $sql .=
" ORDER BY entity, name ASC";
231 $resql = $db->query($sql);
233 $num = $db->num_rows(
$resql);
237 $obj = $db->fetch_object(
$resql);
239 print
'<tr class="oddeven">';
240 print
'<td>'.$obj->name.
'</td>'.
"\n";
241 print
'<td>'.$obj->value.
'</td>'.
"\n";
242 if (empty($conf->multicompany->enabled) || !$user->entity) {
243 print
'<td>'.$obj->entity.
'</td>'.
"\n";