25require
'../../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
40$langs->loadLangs(array(
"install",
"other",
"admin",
"products",
"mrp"));
46if (
GETPOST(
'action',
'aZ09') ==
'donothing') {
58llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-system_perf');
62print
'<span class="opacitymedium">'.$langs->trans(
"YouMayFindPerfAdviceHere",
'https://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').
'</span>';
63print
' ';
64print
'<a href="'.$_SERVER[
"PHP_SELF"].
'">';
65print
img_picto($langs->trans(
"Reload"),
'refresh').
' ';
66print $langs->trans(
"Reload");
73print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
74print
'<strong>'.$langs->trans(
"Version").
'</strong><br>';
75print
'<div class="divsection">';
79print
"<strong>PHP</strong> - ".$langs->trans(
"Version").
": ".$phpversion.
"\n";
82print
"<br><strong>Web server</strong> - ".$langs->trans(
"Version").
": ".$_SERVER[
"SERVER_SOFTWARE"].
"<br>\n";
89print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
90print
'<strong>'.$langs->trans(
"XDebug").
'</strong><br>';
91print
'<div class="divsection">';
92$test = !function_exists(
'xdebug_is_debugger_active');
94 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NotInstalled").
' <span class="opacitymedium">'.$langs->trans(
"NotSlowedDownByThis").
'</span>';
96 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"ModuleActivated", $langs->transnoentities(
"XDebug"));
97 print
' - '.$langs->trans(
"MoreInformation").
' <a href="'.DOL_URL_ROOT.
'/admin/system/xdebug.php">XDebug admin page</a>';
104print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
105print
'<strong>'.$langs->trans(
"Syslog").
'</strong><br>';
106print
'<div class="divsection">';
109 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NotInstalled").
' <span class="opacitymedium">'.$langs->trans(
"NotSlowedDownByThis").
'</span>';
112 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"ModuleActivatedWithTooHighLogLevel", $langs->transnoentities(
"Syslog"));
114 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities(
"Syslog"),
getDolGlobalInt(
'SYSLOG_LEVEL'));
123print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
124print
'<strong>'.$langs->trans(
"DebugBar").
'</strong><br>';
125print
'<div class="divsection">';
128 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NotInstalled").
' <span class="opacitymedium">'.$langs->trans(
"NotSlowedDownByThis").
'</span>';
130 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"ModuleActivated", $langs->transnoentities(
"DebugBar"));
138print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
139print
'<strong>'.$langs->trans(
"ApplicativeCache").
'</strong><br>';
140print
'<div class="divsection">';
144 print $langs->trans(
"MemcachedAvailableAndSetup");
145 print
' '.$langs->trans(
"MoreInformation").
' <a href="'.
dol_buildpath(
'/memcached/admin/memcached.php', 1).
'">Memcached module admin page</a>';
147 print $langs->trans(
"MemcachedModuleAvailableButNotSetup");
148 print
' <a href="'.dol_buildpath(
'/memcached/admin/memcached.php', 1).
'">Memcached module admin page</a>';
151 print $langs->trans(
"MemcachedNotAvailable");
158print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
159print
'<strong>'.$langs->trans(
"OPCodeCache").
'</strong><br>';
160print
'<div class="divsection">';
162$test = function_exists(
'xcache_info');
163if (!$foundcache && $test) {
165 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"PHPModuleLoaded",
"XCache");
166 print
' '.$langs->trans(
"MoreInformation").
' <a href="'.DOL_URL_ROOT.
'/admin/system/xcache.php">Xcache admin page</a>';
168$test = function_exists(
'eaccelerator_info');
169if (!$foundcache && $test) {
171 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"PHPModuleLoaded",
"Eaccelerator");
173$test = function_exists(
'opcache_get_status');
174if (!$foundcache && $test) {
176 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"PHPModuleLoaded",
"ZendOPCache");
180$test = function_exists(
'apc_cache_info');
181if (!$foundcache && $test) {
183 if (ini_get(
'apc.enabled')) {
185 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"PHPModuleLoaded",
"APCCache");
187 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"APCCacheInstalledButDisabled");
191 print $langs->trans(
"NoOPCodeCacheFound");
198print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
199print
'<strong>'.$langs->trans(
"PreloadOPCode").
'</strong><br>';
200print
'<div class="divsection">';
201if (ini_get(
'opcache.preload')) {
202 print ini_get(
'opcache.preload');
204 print
img_picto(
'',
'minus',
'class="pictofixedwidth"').
' '.$langs->trans(
"No");
210print
'<script type="text/javascript">
211jQuery(document).ready(function() {
217 data: { token: \''.currentToken().
'\' },
218 url: \
''.DOL_URL_ROOT.
'/public/notice.php\',
221 /* crossDomain: true,*/
222 success: function () {
223 cachephpstring=getphpurl.getResponseHeader(\'Cache-Control\');
224 /* alert(\'php:\'+getphpurl.getAllResponseHeaders()); */
225 /*alert(\'php:\'+cachephpstring);*/
226 if (cachephpstring == null || cachephpstring.indexOf("no-cache") !== -1)
228 jQuery("#httpcachephpok").hide();
229 jQuery("#httpcachephpko").show();
233 jQuery("#httpcachephpok").show();
234 jQuery("#httpcachephpko").hide();
236 compphpstring=getphpurl.getResponseHeader(\'Content-Encoding\');
237 /* alert(\'php:\'+getphpurl.getAllResponseHeaders()); */
238 /*alert(\'php:\'+compphpstring);*/
239 if (compphpstring == null || (compphpstring.indexOf("gzip") == -1 && compphpstring.indexOf("deflate") == -1 && compphpstring.indexOf("br") == -1))
241 jQuery("#httpcompphpok").hide();
242 jQuery("#httpcompphpko").show();
246 jQuery("#httpcompphpok").show();
247 jQuery("#httpcompphpko").hide();
257 data: { token: \'notrequired\' },
258 url: \''.DOL_URL_ROOT.
'/includes/jquery/css/base/jquery-ui.css\',
261 /* crossDomain: true, */
262 success: function () {
263 cachecssstring=getcssurl.getResponseHeader(\'Cache-Control\');
264 /* alert(\'css:\'+getcssurl.getAllResponseHeaders()); */
265 /*alert(\'css:\'+cachecssstring);*/
266 if (cachecssstring != null && cachecssstring.indexOf("no-cache") !== -1)
268 jQuery("#httpcachecssok").hide();
269 jQuery("#httpcachecssko").show();
273 jQuery("#httpcachecssok").show();
274 jQuery("#httpcachecssko").hide();
276 compcssstring=getcssurl.getResponseHeader(\'Content-Encoding\');
277 /* alert(\'php:\'+getcssurl.getAllResponseHeaders()); */
278 /*alert(\'php:\'+compcssstring);*/
279 if (compcssstring == null || (compcssstring.indexOf("gzip") == -1 && compcssstring.indexOf("deflate") == -1 && compcssstring.indexOf("br") == -1))
281 jQuery("#httpcompcssok").hide();
282 jQuery("#httpcompcssko").show();
286 jQuery("#httpcompcssok").show();
287 jQuery("#httpcompcssko").hide();
293 var cachecssphpstring;
294 var compcssphpstring;
295 getcssphpurl = $.ajax({
298 url: \
''.DOL_URL_ROOT.
'/theme/eldy/style.css.php\',
301 /* crossDomain: true,*/
302 success: function () {
303 cachecssphpstring=getcssphpurl.getResponseHeader(\'Cache-Control\');
304 /* alert(\'cssphp:\'+getcssphpurl.getAllResponseHeaders()); */
305 /*alert(\'cssphp:\'+cachecssphpstring);*/
306 if (cachecssphpstring != null && cachecssphpstring.indexOf("no-cache") !== -1)
308 jQuery("#httpcachecssphpok").hide();
309 jQuery("#httpcachecssphpko").show();
313 jQuery("#httpcachecssphpok").show();
314 jQuery("#httpcachecssphpko").hide();
316 compcssphpstring=getcssphpurl.getResponseHeader(\'Content-Encoding\');
317 /* alert(\'php:\'+getcssphpurl.getAllResponseHeaders()); */
318 /*alert(\'php:\'+compcssphpstring);*/
319 if (compcssphpstring == null || (compcssphpstring.indexOf("gzip") == -1 && compcssphpstring.indexOf("deflate") == -1 && compcssphpstring.indexOf("br") == -1))
321 jQuery("#httpcompcssphpok").hide();
322 jQuery("#httpcompcssphpko").show();
326 jQuery("#httpcompcssphpok").show();
327 jQuery("#httpcompcssphpko").hide();
337 data: { token: \'notrequired\' },
338 url: \''.DOL_URL_ROOT.
'/theme/eldy/img/help.png\',
341 /* crossDomain: true,*/
342 success: function () {
343 cacheimgstring=getimgurl.getResponseHeader(\'Cache-Control\');
344 /* alert(\'img:\'+getimgurl.getAllResponseHeaders()); */
345 /*alert(\'img:\'+cacheimgstring);*/
346 if (cacheimgstring != null && cacheimgstring.indexOf("no-cache") !== -1)
348 jQuery("#httpcacheimgok").hide();
349 jQuery("#httpcacheimgko").show();
353 jQuery("#httpcacheimgok").show();
354 jQuery("#httpcacheimgko").hide();
356 compimgstring=getimgurl.getResponseHeader(\'Content-Encoding\');
357 /* alert(\'php:\'+getimgurl.getAllResponseHeaders()); */
358 /*alert(\'php:\'+compimgstring);*/
359 if (compimgstring == null || (compimgstring.indexOf("gzip") == -1 && compimgstring.indexOf("deflate") == -1 && compimgstring.indexOf("br") == -1))
361 jQuery("#httpcompimgok").hide();
362 jQuery("#httpcompimgko").show();
366 jQuery("#httpcompimgok").show();
367 jQuery("#httpcompimgko").hide();
377 data: { token: \'notrequired\' },
378 url: \''.DOL_URL_ROOT.
'/core/js/lib_rare.js\',
381 /* crossDomain: true,*/
382 success: function () {
383 cachejsstring=getjsurl.getResponseHeader(\'Cache-Control\');
384 /*alert(\'js:\'+getjsurl.getAllResponseHeaders());*/
385 /*alert(\'js:\'+cachejsstring);*/
386 if (cachejsstring != null && cachejsstring.indexOf("no-cache") !== -1)
388 jQuery("#httpcachejsok").hide();
389 jQuery("#httpcachejsko").show();
393 jQuery("#httpcachejsok").show();
394 jQuery("#httpcachejsko").hide();
396 compjsstring=getjsurl.getResponseHeader(\'Content-Encoding\');
397 /* alert(\'js:\'+getjsurl.getAllResponseHeaders()); */
398 /*alert(\'js:\'+compjsstring);*/
399 if (compjsstring == null || (compjsstring.indexOf("gzip") == -1 && compjsstring.indexOf("deflate") == -1 && compjsstring.indexOf("br") == -1))
401 jQuery("#httpcompjsok").hide();
402 jQuery("#httpcompjsko").show();
406 jQuery("#httpcompjsok").show();
407 jQuery("#httpcompjsko").hide();
413 var cachejsphpstring;
415 getjsphpurl = $.ajax({
418 url: \
''.DOL_URL_ROOT.
'/core/js/lib_head.js.php\',
421 /* crossDomain: true,*/
422 success: function () {
423 cachejsphpstring=getjsphpurl.getResponseHeader(\'Cache-Control\');
424 /* alert(\'jsphp:\'+getjsphpurl.getAllResponseHeaders()); */
425 /*alert(\'jsphp:\'+cachejsphpstring);*/
426 if (cachejsphpstring != null && cachejsphpstring.indexOf("no-cache") !== -1)
428 jQuery("#httpcachejsphpok").hide();
429 jQuery("#httpcachejsphpko").show();
433 jQuery("#httpcachejsphpok").show();
434 jQuery("#httpcachejsphpko").hide();
436 compjsphpstring=getjsphpurl.getResponseHeader(\'Content-Encoding\');
437 /* alert(\'php:\'+getjsphpurl.getAllResponseHeaders()); */
438 /*alert(\'php:\'+compjsphpstring);*/
439 if (compjsphpstring == null || (compjsphpstring.indexOf("gzip") == -1 && compjsphpstring.indexOf("deflate") == -1 && compjsphpstring.indexOf("br") == -1))
441 jQuery("#httpcompjsphpok").hide();
442 jQuery("#httpcompjsphpko").show();
446 jQuery("#httpcompjsphpok").show();
447 jQuery("#httpcompjsphpko").hide();
457print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
458print
'<strong>'.$langs->trans(
"HTTPCacheStaticResources").
' - ';
459print $form->textwithpicto($langs->trans(
"CacheByServer"), $langs->trans(
"CacheByServerDesc"));
460print
'</strong><br>';
461print
'<div class="divsection">';
466print
'<div id="httpcachecssok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCached",
'css (.css)').
'</div>';
467print
'<div id="httpcachecssko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCached",
'css (.css)').
'</div>';
468print
'<div id="httpcachecssphpok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCached",
'css (.css.php)').
'</div>';
469print
'<div id="httpcachecssphpko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCached",
'css (.css.php)').
'</div>';
470print
'<div id="httpcacheimgok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCached",
'img (.png)').
'</div>';
471print
'<div id="httpcacheimgko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCached",
'img (.png)').
'</div>';
472print
'<div id="httpcachejsok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCached",
'javascript (.js)').
'</div>';
473print
'<div id="httpcachejsko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCached",
'javascript (.js)').
'</div>';
474print
'<div id="httpcachejsphpok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCached",
'javascript (.js.php)').
'</div>';
475print
'<div id="httpcachejsphpko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCached",
'javascript (.js.php)').
'</div>';
480print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
481print
'<strong>'.$langs->trans(
"HTTPCacheStaticResources").
' - '.$langs->trans(
"CacheByClient").
'</strong><br>';
482print
'<div class="divsection">';
483print
'<div id="httpcachebybrowser"><span class="opacitymedium">'.img_picto(
'',
'question.png',
'class="pictofixedwidth"').
' '.$langs->trans(
"TestNotPossibleWithCurrentBrowsers").
'</span></div>';
489print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
491print $form->textwithpicto($langs->trans(
"CompressionOfResources"), $langs->trans(
"CompressionOfResourcesDesc"));
494print
'<div class="divsection">';
496print
'<div id="httpcompphpok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCompressed",
'php (.php)').
'</div>';
497print
'<div id="httpcompphpko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'php (.php)').
'</div>';
499print
'<div id="httpcompcssok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCompressed",
'css (.css)').
'</div>';
500print
'<div id="httpcompcssko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'css (.css)').
'</div>';
501print
'<div id="httpcompcssphpok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCompressed",
'css (.css.php)').
'</div>';
502print
'<div id="httpcompcssphpko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'css (.css.php)').
'</div>';
505print
'<div id="httpcompjsok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCompressed",
'javascript (.js)').
'</div>';
506print
'<div id="httpcompjsko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'javascript (.js)').
'</div>';
507print
'<div id="httpcompjsphpok">'.img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeCompressed",
'javascript (.js.php)').
'</div>';
508print
'<div id="httpcompjsphpko">'.img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"FilesOfTypeNotCompressed",
'javascript (.js.php)').
'</div>';
513print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
514print
'<strong>'.$langs->trans(
"DriverType").
'</strong>';
516print
'<div class="divsection">';
517if ($conf->db->type ==
'mysql' || $conf->db->type ==
'mysqli') {
518 $test = ($conf->db->type ==
'mysqli');
520 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouUseBestDriver", $conf->db->type);
522 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouDoNotUseBestDriver", $conf->db->type,
'mysqli');
529print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
530print
'<strong>'.$langs->trans(
"ComboListOptim").
'</strong>';
532print
'<div class="divsection">';
534$sql =
"SELECT COUNT(*) as nb";
535$sql .=
" FROM ".MAIN_DB_PREFIX.
"product as p";
536$resql = $db->query($sql);
538 $limitforoptim = 5000;
539 $num = $db->num_rows($resql);
540 $obj = $db->fetch_object($resql);
541 $nb = (int) $obj->nb;
542 if ($nb > $limitforoptim) {
544 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"),
'PRODUIT_USE_SEARCH_TO_SELECT');
546 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"),
'PRODUIT_USE_SEARCH_TO_SELECT',
getDolGlobalString(
'PRODUIT_USE_SEARCH_TO_SELECT'));
549 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"));
555$sql =
"SELECT COUNT(*) as nb";
556$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
557$resql = $db->query($sql);
559 $limitforoptim = 5000;
560 $num = $db->num_rows($resql);
561 $obj = $db->fetch_object($resql);
562 $nb = (int) $obj->nb;
563 if ($nb > $limitforoptim) {
565 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"),
'COMPANY_USE_SEARCH_TO_SELECT');
567 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"),
'COMPANY_USE_SEARCH_TO_SELECT',
getDolGlobalString(
'COMPANY_USE_SEARCH_TO_SELECT'));
570 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"));
576$sql =
"SELECT COUNT(*) as nb";
577$sql .=
" FROM ".MAIN_DB_PREFIX.
"socpeople as s";
578$resql = $db->query($sql);
580 $limitforoptim = 5000;
581 $num = $db->num_rows($resql);
582 $obj = $db->fetch_object($resql);
583 $nb = (int) $obj->nb;
584 if ($nb > $limitforoptim) {
586 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv(
"Contacts"),
'CONTACT_USE_SEARCH_TO_SELECT');
588 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"Contacts"),
'CONTACT_USE_SEARCH_TO_SELECT',
getDolGlobalString(
'CONTACT_USE_SEARCH_TO_SELECT'));
591 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"Contacts"));
597$sql =
"SELECT COUNT(*) as nb";
598$sql .=
" FROM ".MAIN_DB_PREFIX.
"projet as s";
599$resql = $db->query($sql);
601 $limitforoptim = 5000;
602 $num = $db->num_rows($resql);
603 $obj = $db->fetch_object($resql);
604 $nb = (int) $obj->nb;
605 if ($nb > $limitforoptim) {
607 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv(
"Projects"),
'PROJECT_USE_SEARCH_TO_SELECT');
609 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"Projects"),
'PROJECT_USE_SEARCH_TO_SELECT',
getDolGlobalString(
'PROJECT_USE_SEARCH_TO_SELECT'));
612 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"Projects"));
618$sql =
"SELECT COUNT(*) as nb";
619$sql .=
" FROM ".$db->prefix().
"bom_bom as s";
620$resql = $db->query($sql);
622 $limitforoptim = 5000;
623 $num = $db->num_rows($resql);
624 $obj = $db->fetch_object($resql);
626 if ($nb > $limitforoptim) {
628 print
img_picto(
'',
'warning.png',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv(
"Bom"),
'BOM_USE_SEARCH_TO_SELECT');
630 print
img_picto(
'',
'tick.png',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"Bom"),
'BOM_USE_SEARCH_TO_SELECT',
getDolGlobalString(
'BOM_USE_SEARCH_TO_SELECT'));
633 print
img_picto(
'',
'tick.png',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"Bom"));
642print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
643print
'<strong>'.$langs->trans(
"SearchOptim").
'</strong>';
645print
'<div class="divsection">';
647$sql =
"SELECT COUNT(*) as nb";
648$sql .=
" FROM ".MAIN_DB_PREFIX.
"product as p";
649$resql = $db->query($sql);
651 $limitforoptim = 100000;
652 $num = $db->num_rows($resql);
653 $obj = $db->fetch_object($resql);
654 $nb = (int) $obj->nb;
655 if ($nb > $limitforoptim) {
657 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"),
'PRODUCT_DONOTSEARCH_ANYWHERE');
658 print $langs->trans(
"YouHaveXObjectUseSearchOptimDesc");
660 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"),
'PRODUCT_DONOTSEARCH_ANYWHERE',
getDolGlobalString(
'PRODUCT_DONOTSEARCH_ANYWHERE'));
663 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ProductsOrServices"));
670$sql =
"SELECT COUNT(*) as nb";
671$sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
672$resql = $db->query($sql);
674 $limitforoptim = 100000;
675 $num = $db->num_rows($resql);
676 $obj = $db->fetch_object($resql);
677 $nb = (int) $obj->nb;
678 if ($nb > $limitforoptim) {
680 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"),
'COMPANY_DONOTSEARCH_ANYWHERE');
681 print $langs->trans(
"YouHaveXObjectUseSearchOptimDesc");
683 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"),
'COMPANY_DONOTSEARCH_ANYWHERE',
getDolGlobalString(
'COMPANY_DONOTSEARCH_ANYWHERE'));
686 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv(
"ThirdParties"));
695 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"YouHaveALargeAmountOfRecordOnLists",
getDolGlobalInt(
'MAIN_SIZE_LISTE_LIMIT'), $MAXRECOMMENDED);
697 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"MaxNbOfRecordOnListIsOk",
getDolGlobalInt(
'MAIN_SIZE_LISTE_LIMIT'), $MAXRECOMMENDED);
706print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
707print
'<strong>'.$langs->trans(
"Browser").
'</strong><br>';
708print
'<div class="divsection">';
709if (!in_array($conf->browser->name, array(
'chrome',
'opera',
'safari',
'firefox'))) {
710 print
img_picto(
'',
'warning',
'class="pictofixedwidth"').
' '.$langs->trans(
"BrowserIsKO", $conf->browser->name);
712 print
img_picto(
'',
'tick',
'class="pictofixedwidth"').
' '.$langs->trans(
"BrowserIsOK", $conf->browser->name);
719print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
720print
'<strong>'.$langs->trans(
"Options").
'</strong><br>';
721print
'<div class="divsection">';
723 print
img_picto(
'',
'tick',
'class="pictofixedwidth"');
725 print
img_picto(
'',
'minus',
'class="pictofixedwidth"');
727print $form->textwithpicto($langs->trans(
"EnableFileCache").
' ('.$langs->trans(
"Widgets").
')', $langs->trans(
"Option").
' MAIN_ACTIVATE_FILECACHE');
733 print
img_picto(
'',
'tick',
'class="pictofixedwidth"');
735 print
img_picto(
'',
'minus',
'class="pictofixedwidth"');
737print $form->textwithpicto($langs->trans(
'MAIN_ENABLE_AJAX_TOOLTIP'), $langs->trans(
"Option").
' MAIN_ENABLE_AJAX_TOOLTIP');
744 print
img_picto(
'',
'tick',
'class="pictofixedwidth"');
746 print
img_picto(
'',
'minus',
'class="pictofixedwidth"');
748print $form->textwithpicto($langs->trans(
'MAIN_CACHE_COUNT'), $langs->trans(
"Option").
' MAIN_CACHE_COUNT');
760print
img_picto(
'',
'folder',
'class="pictofixedwidth"');
761print
'<strong>'.$langs->trans(
"OtherSetup").
' ('.$langs->trans(
"Experimental").
')</strong><br>';
762print
'<div class="divsection">';
764 print
img_picto(
'',
'tick',
'class="pictofixedwidth"');
766 print
img_picto(
'',
'minus',
'class="pictofixedwidth"');
768print $form->textwithpicto($langs->trans(
'MAIN_DO_FETCH_IN_ONE_SQL_REQUEST'), $langs->trans(
"Option").
' MAIN_DO_FETCH_IN_ONE_SQL_REQUEST');
769print
' = '.getDolGlobalString(
'MAIN_DO_FETCH_IN_ONE_SQL_REQUEST',
'<span class="opacitymedium">'.$langs->trans(
"Undefined").
'</span>');
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
version_php()
Return PHP version.
dol_now($mode='gmt')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
currentToken()
Return the value of token currently saved into session with name 'token'.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.