dolibarr  7.0.0-beta
constall.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
25 require '../../main.inc.php';
26 
27 $langs->load("admin");
28 $langs->load("user");
29 $langs->load("install");
30 
31 
32 if (!$user->admin)
34 
35 
36 /*
37  * View
38  */
39 
40 llxHeader();
41 
42 print load_fiche_titre($langs->trans("SummaryConst"),'','title_setup');
43 
44 
45 print load_fiche_titre($langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')');
46 // Parameters in conf.php file (when a parameter start with ?, it is shown only if defined)
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',
53  'separator',
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',
63  'separator',
64  'dolibarr_main_authentication',
65  'separator',
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',
74  'separator',
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_PHPEXCEL_PATH',
82  '?dolibarr_lib_GEOIP_PATH',
83  '?dolibarr_lib_ODTPHP_PATH',
84  '?dolibarr_lib_ODTPHP_PATHTOPCLZIP',
85  '?dolibarr_js_CKEDITOR',
86  '?dolibarr_js_JQUERY',
87  '?dolibarr_js_JQUERY_UI',
88  '?dolibarr_js_JQUERY_FLOT',
89  '?dolibarr_font_DOL_DEFAULT_TTF',
90  '?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
91  'separator',
92  '?dolibarr_mailing_limit_sendbyweb',
93  '?dolibarr_mailing_limit_sendbycli',
94  '?dolibarr_strict_mode'
95  );
96 $configfilelib=array(
97 // 'separator',
98  $langs->trans("URLRoot"),
99  $langs->trans("URLRoot").' (alt)',
100  $langs->trans("DocumentRootServer"),
101  $langs->trans("DocumentRootServer").' (alt)',
102  $langs->trans("DataRootServer"),
103  'separator',
104  $langs->trans("DatabaseServer"),
105  $langs->trans("DatabasePort"),
106  $langs->trans("DatabaseName"),
107  $langs->trans("DriverType"),
108  $langs->trans("DatabaseUser"),
109  $langs->trans("DatabasePassword"),
110  $langs->trans("DBStoringCharset"),
111  $langs->trans("DBSortingCharset"),
112  $langs->trans("Prefix"),
113  'separator',
114  $langs->trans("AuthenticationMode"),
115  'separator',
116  'dolibarr_main_auth_ldap_login_attribute',
117  'dolibarr_main_auth_ldap_host',
118  'dolibarr_main_auth_ldap_port',
119  'dolibarr_main_auth_ldap_version',
120  'dolibarr_main_auth_ldap_dn',
121  'dolibarr_main_auth_ldap_admin_login',
122  'dolibarr_main_auth_ldap_admin_pass',
123  'dolibarr_main_auth_ldap_debug',
124  'separator',
125  'dolibarr_lib_ADODB_PATH',
126  'dolibarr_lib_TCPDF_PATH',
127  'dolibarr_lib_FPDI_PATH',
128  'dolibarr_lib_NUSOAP_PATH',
129  'dolibarr_lib_PHPEXCEL_PATH',
130  'dolibarr_lib_GEOIP_PATH',
131  'dolibarr_lib_ODTPHP_PATH',
132  'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
133  'dolibarr_js_CKEDITOR',
134  'dolibarr_js_JQUERY',
135  'dolibarr_js_JQUERY_UI',
136  'dolibarr_js_JQUERY_FLOT',
137  'dolibarr_font_DOL_DEFAULT_TTF',
138  'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
139  'separator',
140  'Limit nb of email sent by page',
141  'Strict mode is on/off'
142  );
143 $var=true;
144 print '<table class="noborder" width="100%">';
145 print '<tr class="liste_titre"><td width="280">'.$langs->trans("Label").'</td>';
146 print '<td>'.$langs->trans("Parameter").'</td>';
147 print '<td>'.$langs->trans("Value").'</td>';
148 print '</tr>'."\n";
149 $i=0;
150 foreach($configfileparameters as $key)
151 {
152  $ignore=0;
153 
154  if ($key == 'dolibarr_main_url_root_alt' && empty(${$key})) $ignore=1;
155  if ($key == 'dolibarr_main_document_root_alt' && empty(${$key})) $ignore=1;
156 
157  if (empty($ignore))
158  {
159  $newkey = preg_replace('/^\?/','',$key);
160 
161  if (preg_match('/^\?/',$key) && empty(${$newkey}))
162  {
163  $i++;
164  continue; // We discard parametes starting with ?
165  }
166 
167  if ($newkey == 'separator' && $lastkeyshown == 'separator')
168  {
169  $i++;
170  continue;
171  }
172 
173  print '<tr class="oddeven">';
174  if ($newkey == 'separator')
175  {
176  print '<td colspan="3">&nbsp;</td>';
177  }
178  else
179  {
180  // Label
181  print "<td>".$configfilelib[$i].'</td>';
182  // Key
183  print '<td>'.$newkey.'</td>';
184  // Value
185  print "<td>";
186  if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
187  else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
188  else print ${$newkey};
189  if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
190  print "</td>";
191  }
192  print "</tr>\n";
193  $lastkeyshown=$newkey;
194  }
195  $i++;
196 }
197 print '</table>';
198 print '<br>';
199 
200 
201 
202 // Parameters in database
203 print load_fiche_titre($langs->trans("Database"));
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) print '<td>'.$langs->trans("Entity").'</td>'; // If superadmin or multicompany disabled
209 print "</tr>\n";
210 
211 $sql = "SELECT";
212 $sql.= " rowid";
213 $sql.= ", ".$db->decrypt('name')." as name";
214 $sql.= ", ".$db->decrypt('value')." as value";
215 $sql.= ", type";
216 $sql.= ", note";
217 $sql.= ", entity";
218 $sql.= " FROM ".MAIN_DB_PREFIX."const";
219 if (empty($conf->multicompany->enabled))
220 {
221  // If no multicompany mode, admins can see global and their constantes
222  $sql.= " WHERE entity IN (0,".$conf->entity.")";
223 }
224 else
225 {
226  // If multicompany mode, superadmin (user->entity=0) can see everything, admin are limited to their entities.
227  if ($user->entity) $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
228 }
229 $sql.= " ORDER BY entity, name ASC";
230 $resql = $db->query($sql);
231 if ($resql)
232 {
233  $num = $db->num_rows($resql);
234  $i = 0;
235 
236  while ($i < $num)
237  {
238  $obj = $db->fetch_object($resql);
239 
240  print '<tr class="oddeven">';
241  print '<td>'.$obj->name.'</td>'."\n";
242  print '<td>'.$obj->value.'</td>'."\n";
243  if (empty($conf->multicompany->enabled) || !$user->entity) print '<td>'.$obj->entity.'</td>'."\n"; // If superadmin or multicompany disabled
244  print "</tr>\n";
245 
246  $i++;
247  }
248 }
249 
250 print '</table>';
251 
252 
253 llxFooter();
254 
255 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
print
Draft customers invoices.
Definition: index.php:91
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->societe->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1013