23 require
'../../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
30 $langs->loadLangs(array(
"install",
"other",
"admin"));
35 if (
GETPOST(
'action',
'aZ09') ==
'donothing')
45 $form =
new Form($db);
52 print '<span class="opacitymedium">'.$langs->trans(
"YouMayFindPerfAdviceHere",
'https://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').
'</span> (<a href="'.
$_SERVER[
"PHP_SELF"].
'">'.$langs->trans(
"Reload").
'</a>)<br>';
56 print "<br><strong>PHP</strong> - ".$langs->trans(
"Version").
": ".$phpversion.
"<br>\n";
59 print "<br><strong>Web server</strong> - ".$langs->trans(
"Version").
": ".
$_SERVER[
"SERVER_SOFTWARE"].
"<br>\n";
63 print '<strong>'.$langs->trans(
"XDebug").
'</strong>: ';
64 $test = !function_exists(
'xdebug_is_enabled');
65 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotSlowedDownByThis");
67 print img_picto(
'',
'warning').
' '.$langs->trans(
"ModuleActivated", $langs->transnoentities(
"XDebug"));
68 print ' - '.$langs->trans(
"MoreInformation").
' <a href="'.DOL_URL_ROOT.
'/admin/system/xdebug.php">XDebug admin page</a>';
74 print '<strong>'.$langs->trans(
"Syslog").
'</strong>: ';
75 $test = empty($conf->syslog->enabled);
76 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotSlowedDownByThis");
78 print img_picto(
'',
'warning').
' '.$langs->trans(
"ModuleActivated", $langs->transnoentities(
"Syslog"));
85 print '<strong>'.$langs->trans(
"DebugBar").
'</strong>: ';
86 $test = empty($conf->debugbar->enabled);
87 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotSlowedDownByThis");
89 print img_picto(
'',
'warning').
' '.$langs->trans(
"ModuleActivated", $langs->transnoentities(
"DebugBar"));
96 print '<strong>'.$langs->trans(
"ApplicativeCache").
'</strong>: ';
97 $test = !empty($conf->memcached->enabled);
100 if (!empty($conf->global->MEMCACHED_SERVER))
102 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"MemcachedAvailableAndSetup");
103 print ' '.$langs->trans(
"MoreInformation").
' <a href="'.
dol_buildpath(
'/memcached/admin/memcached.php', 1).
'">Memcached module admin page</a>';
105 print img_picto(
'',
'warning').
' '.$langs->trans(
"MemcachedModuleAvailableButNotSetup");
106 print ' <a href="'.dol_buildpath(
'/memcached/admin/memcached.php', 1).
'">Memcached module admin page</a>';
108 }
else print img_picto(
'',
'warning').
' '.$langs->trans(
"MemcachedNotAvailable");
113 print '<strong>'.$langs->trans(
"OPCodeCache").
'</strong>: ';
115 $test = function_exists(
'xcache_info');
116 if (!$foundcache && $test)
119 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"PHPModuleLoaded",
"XCache");
120 print ' '.$langs->trans(
"MoreInformation").
' <a href="'.DOL_URL_ROOT.
'/admin/system/xcache.php">Xcache admin page</a>';
122 $test = function_exists(
'eaccelerator_info');
123 if (!$foundcache && $test)
126 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"PHPModuleLoaded",
"Eaccelerator");
128 $test = function_exists(
'opcache_get_status');
129 if (!$foundcache && $test)
132 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"PHPModuleLoaded",
"ZendOPCache");
136 $test = function_exists(
'apc_cache_info');
137 if (!$foundcache && $test)
140 if (ini_get(
'apc.enabled'))
143 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"APCInstalled");
145 print img_picto(
'',
'warning').
' '.$langs->trans(
"APCCacheInstalledButDisabled");
148 if (!$foundcache)
print $langs->trans(
"NoOPCodeCacheFound");
152 if (ini_get(
'opcache.preload'))
155 print '<strong>'.$langs->trans(
"PreloadOPCode").
'</strong>: ';
156 print ini_get(
'opcache.preload');
159 print '<strong>'.$langs->trans(
"PreloadOPCode").
'</strong>: ';
160 print $langs->trans(
"No");
165 print '<script type="text/javascript" language="javascript">
166 jQuery(document).ready(function() {
172 url: \''.DOL_URL_ROOT.
'/index.php\',
175 /* crossDomain: true,*/
176 success: function () {
177 cachephpstring=getphpurl.getResponseHeader(\'Cache-Control\');
178 /* alert(\'php:\'+getphpurl.getAllResponseHeaders()); */
179 /*alert(\'php:\'+cachephpstring);*/
180 if (cachephpstring == null || cachephpstring.indexOf("no-cache") !== -1)
182 jQuery("#httpcachephpok").hide();
183 jQuery("#httpcachephpko").show();
187 jQuery("#httpcachephpok").show();
188 jQuery("#httpcachephpko").hide();
190 compphpstring=getphpurl.getResponseHeader(\'Content-Encoding\');
191 /* alert(\'php:\'+getphpurl.getAllResponseHeaders()); */
192 /*alert(\'php:\'+compphpstring);*/
193 if (compphpstring == null || (compphpstring.indexOf("gzip") == -1 && compphpstring.indexOf("deflate") == -1))
195 jQuery("#httpcompphpok").hide();
196 jQuery("#httpcompphpko").show();
200 jQuery("#httpcompphpok").show();
201 jQuery("#httpcompphpko").hide();
211 url: \''.DOL_URL_ROOT.
'/includes/jquery/css/base/jquery-ui.css\',
214 /*crossDomain: true, */
215 success: function () {
216 cachecssstring=getcssurl.getResponseHeader(\'Cache-Control\');
217 /* alert(\'css:\'+getcssurl.getAllResponseHeaders()); */
218 /*alert(\'css:\'+cachecssstring);*/
219 if (cachecssstring != null && cachecssstring.indexOf("no-cache") !== -1)
221 jQuery("#httpcachecssok").hide();
222 jQuery("#httpcachecssko").show();
226 jQuery("#httpcachecssok").show();
227 jQuery("#httpcachecssko").hide();
229 compcssstring=getcssurl.getResponseHeader(\'Content-Encoding\');
230 /* alert(\'php:\'+getcssurl.getAllResponseHeaders()); */
231 /*alert(\'php:\'+compcssstring);*/
232 if (compcssstring == null || (compcssstring.indexOf("gzip") == -1 && compcssstring.indexOf("deflate") == -1))
234 jQuery("#httpcompcssok").hide();
235 jQuery("#httpcompcssko").show();
239 jQuery("#httpcompcssok").show();
240 jQuery("#httpcompcssko").hide();
246 var cachecssphpstring;
247 var compcssphpstring;
248 getcssphpurl = $.ajax({
250 url: \''.DOL_URL_ROOT.
'/theme/eldy/style.css.php\',
253 /*crossDomain: true,*/
254 success: function () {
255 cachecssphpstring=getcssphpurl.getResponseHeader(\'Cache-Control\');
256 /* alert(\'cssphp:\'+getcssphpurl.getAllResponseHeaders()); */
257 /*alert(\'cssphp:\'+cachecssphpstring);*/
258 if (cachecssphpstring != null && cachecssphpstring.indexOf("no-cache") !== -1)
260 jQuery("#httpcachecssphpok").hide();
261 jQuery("#httpcachecssphpko").show();
265 jQuery("#httpcachecssphpok").show();
266 jQuery("#httpcachecssphpko").hide();
268 compcssphpstring=getcssphpurl.getResponseHeader(\'Content-Encoding\');
269 /* alert(\'php:\'+getcssphpurl.getAllResponseHeaders()); */
270 /*alert(\'php:\'+compcssphpstring);*/
271 if (compcssphpstring == null || (compcssphpstring.indexOf("gzip") == -1 && compcssphpstring.indexOf("deflate") == -1))
273 jQuery("#httpcompcssphpok").hide();
274 jQuery("#httpcompcssphpko").show();
278 jQuery("#httpcompcssphpok").show();
279 jQuery("#httpcompcssphpko").hide();
289 url: \''.DOL_URL_ROOT.
'/theme/eldy/img/help.png\',
292 /*crossDomain: true,*/
293 success: function () {
294 cacheimgstring=getimgurl.getResponseHeader(\'Cache-Control\');
295 /* alert(\'img:\'+getimgurl.getAllResponseHeaders()); */
296 /*alert(\'img:\'+cacheimgstring);*/
297 if (cacheimgstring != null && cacheimgstring.indexOf("no-cache") !== -1)
299 jQuery("#httpcacheimgok").hide();
300 jQuery("#httpcacheimgko").show();
304 jQuery("#httpcacheimgok").show();
305 jQuery("#httpcacheimgko").hide();
307 compimgstring=getimgurl.getResponseHeader(\'Content-Encoding\');
308 /* alert(\'php:\'+getimgurl.getAllResponseHeaders()); */
309 /*alert(\'php:\'+compimgstring);*/
310 if (compimgstring == null || (compimgstring.indexOf("gzip") == -1 && compimgstring.indexOf("deflate") == -1))
312 jQuery("#httpcompimgok").hide();
313 jQuery("#httpcompimgko").show();
317 jQuery("#httpcompimgok").show();
318 jQuery("#httpcompimgko").hide();
328 url: \''.DOL_URL_ROOT.
'/core/js/lib_rare.js\',
331 /* crossDomain: true,*/
332 success: function () {
333 cachejsstring=getjsurl.getResponseHeader(\'Cache-Control\');
334 /*alert(\'js:\'+getjsurl.getAllResponseHeaders());*/
335 /*alert(\'js:\'+cachejsstring);*/
336 if (cachejsstring != null && cachejsstring.indexOf("no-cache") !== -1)
338 jQuery("#httpcachejsok").hide();
339 jQuery("#httpcachejsko").show();
343 jQuery("#httpcachejsok").show();
344 jQuery("#httpcachejsko").hide();
346 compjsstring=getjsurl.getResponseHeader(\'Content-Encoding\');
347 /* alert(\'js:\'+getjsurl.getAllResponseHeaders()); */
348 /*alert(\'js:\'+compjsstring);*/
349 if (compjsstring == null || (compjsstring.indexOf("gzip") == -1 && compjsstring.indexOf("deflate") == -1))
351 jQuery("#httpcompjsok").hide();
352 jQuery("#httpcompjsko").show();
356 jQuery("#httpcompjsok").show();
357 jQuery("#httpcompjsko").hide();
363 var cachejsphpstring;
365 getjsphpurl = $.ajax({
367 url: \''.DOL_URL_ROOT.
'/core/js/lib_head.js.php\',
370 /* crossDomain: true,*/
371 success: function () {
372 cachejsphpstring=getjsphpurl.getResponseHeader(\'Cache-Control\');
373 /* alert(\'jsphp:\'+getjsphpurl.getAllResponseHeaders()); */
374 /*alert(\'jsphp:\'+cachejsphpstring);*/
375 if (cachejsphpstring != null && cachejsphpstring.indexOf("no-cache") !== -1)
377 jQuery("#httpcachejsphpok").hide();
378 jQuery("#httpcachejsphpko").show();
382 jQuery("#httpcachejsphpok").show();
383 jQuery("#httpcachejsphpko").hide();
385 compjsphpstring=getjsphpurl.getResponseHeader(\'Content-Encoding\');
386 /* alert(\'php:\'+getjsphpurl.getAllResponseHeaders()); */
387 /*alert(\'php:\'+compjsphpstring);*/
388 if (compjsphpstring == null || (compjsphpstring.indexOf("gzip") == -1 && compjsphpstring.indexOf("deflate") == -1))
390 jQuery("#httpcompjsphpok").hide();
391 jQuery("#httpcompjsphpko").show();
395 jQuery("#httpcompjsphpok").show();
396 jQuery("#httpcompjsphpko").hide();
406 print '<strong>'.$langs->trans(
"HTTPCacheStaticResources").
' - ';
407 print $form->textwithpicto($langs->trans(
"CacheByServer"), $langs->trans(
"CacheByServerDesc"));
408 print ':</strong><br>';
413 print '<div id="httpcachecssok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCached",
'css (.css)').
'</div>';
414 print '<div id="httpcachecssko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCached",
'css (.css)').
'</div>';
415 print '<div id="httpcachecssphpok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCached",
'css (.css.php)').
'</div>';
416 print '<div id="httpcachecssphpko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCached",
'css (.css.php)').
'</div>';
417 print '<div id="httpcacheimgok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCached",
'img (.png)').
'</div>';
418 print '<div id="httpcacheimgko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCached",
'img (.png)').
'</div>';
419 print '<div id="httpcachejsok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCached",
'javascript (.js)').
'</div>';
420 print '<div id="httpcachejsko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCached",
'javascript (.js)').
'</div>';
421 print '<div id="httpcachejsphpok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCached",
'javascript (.js.php)').
'</div>';
422 print '<div id="httpcachejsphpko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCached",
'javascript (.js.php)').
'</div>';
424 print '<strong>'.$langs->trans(
"HTTPCacheStaticResources").
' - ';
425 print $langs->trans(
"CacheByClient").
':</strong><br>';
426 print $langs->trans(
"TestNotPossibleWithCurrentBrowsers").
'<br>';
432 print $form->textwithpicto($langs->trans(
"CompressionOfResources"), $langs->trans(
"CompressionOfResourcesDesc"));
436 print '<div id="httpcompphpok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCompressed",
'php (.php)').
'</div>';
437 print '<div id="httpcompphpko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'php (.php)').
'</div>';
439 print '<div id="httpcompcssok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCompressed",
'css (.css)').
'</div>';
440 print '<div id="httpcompcssko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'css (.css)').
'</div>';
441 print '<div id="httpcompcssphpok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCompressed",
'css (.css.php)').
'</div>';
442 print '<div id="httpcompcssphpko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'css (.css.php)').
'</div>';
445 print '<div id="httpcompjsok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCompressed",
'javascript (.js)').
'</div>';
446 print '<div id="httpcompjsko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'javascript (.js)').
'</div>';
447 print '<div id="httpcompjsphpok">'.img_picto(
'',
'tick.png').
' '.$langs->trans(
"FilesOfTypeCompressed",
'javascript (.js.php)').
'</div>';
448 print '<div id="httpcompjsphpko">'.img_picto(
'',
'warning.png').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'javascript (.js.php)').
'</div>';
452 print '<strong>'.$langs->trans(
"DriverType").
'</strong>: ';
454 if ($conf->db->type ==
'mysql' || $conf->db->type ==
'mysqli')
456 $test = ($conf->db->type ==
'mysqli');
459 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"YouUseBestDriver", $conf->db->type);
461 print img_picto(
'',
'warning.png').
' '.$langs->trans(
"YouDoNotUseBestDriver", $conf->db->type,
'mysqli');
468 print '<strong>'.$langs->trans(
"SearchOptim").
'</strong>: ';
471 $sql =
"SELECT COUNT(*) as nb";
472 $sql .=
" FROM ".MAIN_DB_PREFIX.
"product as p";
473 $resql = $db->query($sql);
476 $limitforoptim = 100000;
477 $num = $db->num_rows(
$resql);
478 $obj = $db->fetch_object(
$resql);
480 if ($nb > $limitforoptim)
482 if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
484 print img_picto(
'',
'warning.png').
' '.$langs->trans(
"YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"),
'PRODUCT_DONOTSEARCH_ANYWHERE');
486 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"));
489 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"));
497 $sql =
"SELECT COUNT(*) as nb";
498 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
499 $resql = $db->query($sql);
502 $limitforoptim = 10000;
503 $num = $db->num_rows(
$resql);
504 $obj = $db->fetch_object(
$resql);
506 if ($nb > $limitforoptim)
508 if (empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE))
510 print img_picto(
'',
'warning.png').
' '.$langs->trans(
"YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"),
'COMPANY_DONOTSEARCH_ANYWHERE');
512 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"));
515 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"));
523 print '<strong>'.$langs->trans(
"Browser").
'</strong>:<br>';
524 if (!in_array($conf->browser->name, array(
'chrome',
'opera',
'safari',
'firefox')))
526 print img_picto(
'',
'warning.png').
' '.$langs->trans(
"BrowserIsKO", $conf->browser->name);
528 print img_picto(
'',
'tick.png').
' '.$langs->trans(
"BrowserIsOK", $conf->browser->name);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_now($mode= 'auto')
Return date for now.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
version_php()
Return PHP version.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->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)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.