26require
'../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
34$langs->loadLangs(array(
"install",
"other",
"admin"));
36$action =
GETPOST(
'action',
'aZ09');
51if ($action ==
'getlastversion') {
52 $result =
getURLContent(
'https://sourceforge.net/projects/dolibarr/rss');
54 if (function_exists(
'simplexml_load_string')) {
55 if (LIBXML_VERSION < 20900) {
58 libxml_disable_entity_loader(
true);
61 $sfurl = simplexml_load_string($result[
'content'],
'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
63 setEventMessages($langs->trans(
"ErrorPHPDoesNotSupport",
"xml"),
null,
'errors');
75$title = $langs->trans(
"InfoDolibarr");
82print
'<div class="div-table-responsive-no-min">';
83print
'<table class="noborder centpercent">';
84print
'<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans(
"Version").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>'.
"\n";
85print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentVersion").
' ('.$langs->trans(
"Programs").
')</td><td>'.DOL_VERSION;
89 if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) {
90 print
' '.img_warning($langs->trans(
"RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_INSTALL));
94 if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) {
95 print
' '.img_warning($langs->trans(
"RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
99$version = DOL_VERSION;
100if (preg_match(
'/[a-z]+/i', $version)) {
101 $version =
'develop';
103print
' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.
'/ChangeLog" target="_blank" rel="noopener noreferrer external">'.$langs->trans(
"SeeChangeLog").
'</a>';
106if (function_exists(
'curl_init')) {
107 $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
108 print
' - ';
109 if ($action ==
'getlastversion') {
112 while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) {
113 $title = $sfurl->channel[0]->item[$i]->title;
115 if (preg_match(
'/([0-9]+\.([0-9\.]+))/', $title, $reg)) {
116 $newversion = $reg[1];
117 $newversionarray = explode(
'.', $newversion);
118 $versionarray = explode(
'.', $version);
121 $version = $newversion;
128 print $langs->trans(
"LastStableVersion").
' : <b>'.(($version !=
'0.0') ? $version : $langs->trans(
"Unknown")).
'</b>';
129 if ($version !=
'0.0') {
130 print
' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.
'/ChangeLog" target="_blank" rel="noopener noreferrer external">'.$langs->trans(
"SeeChangeLog").
'</a>';
133 print $langs->trans(
"LastStableVersion").
' : <b>'.$langs->trans(
"UpdateServerOffline").
'</b>';
136 print $langs->trans(
"LastStableVersion").
' : <a href="'.$_SERVER[
"PHP_SELF"].
'?action=getlastversion" class="butAction smallpaddingimp">'.$langs->trans(
"Check").
'</a>';
143$version = DOL_VERSION;
144if (preg_match(
'/[a-z]+/i', $version)) {
145 $version =
'develop';
148print
'</td></tr>'.
"\n";
149print
'<tr class="oddeven"><td>'.$langs->trans(
"VersionLastUpgrade").
' ('.$langs->trans(
"Database").
')</td><td>'.
getDolGlobalString(
'MAIN_VERSION_LAST_UPGRADE').
'</td></tr>'.
"\n";
150print
'<tr class="oddeven"><td>'.$langs->trans(
"VersionLastInstall").
'</td><td>'.
getDolGlobalString(
'MAIN_VERSION_LAST_INSTALL').
'</td></tr>'.
"\n";
156print
'<div class="div-table-responsive-no-min">';
157print
'<table class="noborder centpercent">';
158print
'<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans(
"Session").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>'.
"\n";
159print
'<tr class="oddeven"><td>'.$langs->trans(
"SessionSavePath").
'</td><td>'.session_save_path().
'</td></tr>'.
"\n";
160print
'<tr class="oddeven"><td>'.$langs->trans(
"SessionName").
'</td><td>'.session_name().
'</td></tr>'.
"\n";
161print
'<tr class="oddeven"><td>'.$langs->trans(
"SessionId").
'</td><td>'.session_id().
'</td></tr>'.
"\n";
162print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentSessionTimeOut").
' (session.gc_maxlifetime)</td>';
164print ini_get(
'session.gc_maxlifetime').
' '.$langs->trans(
"seconds");
165print
'<!-- session.gc_maxlifetime = '.ini_get(
"session.gc_maxlifetime").
' -->'.
"\n";
166print
'<!-- session.gc_probability = '.ini_get(
"session.gc_probability").
' -->'.
"\n";
167print
'<!-- session.gc_divisor = '.ini_get(
"session.gc_divisor").
' -->'.
"\n";
168print $form->textwithpicto(
'', $langs->trans(
"SessionExplanation", ini_get(
"session.gc_probability"), ini_get(
"session.gc_divisor")));
170print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentTheme").
'</td><td>'.$conf->theme.
'</td></tr>'.
"\n";
171print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentMenuHandler").
'</td><td>';
172print $conf->standard_menu;
173print
'</td></tr>'.
"\n";
174print
'<tr class="oddeven"><td>'.$langs->trans(
"Screen").
'</td><td>';
175print $_SESSION[
'dol_screenwidth'].
' x '.$_SESSION[
'dol_screenheight'];
176print
'</td></tr>'.
"\n";
177print
'<tr class="oddeven"><td>'.$langs->trans(
"Session").
'</td><td class="wordbreak">';
179foreach ($_SESSION as $key => $val) {
183 if (is_array($val)) {
184 print $key.
' => array(...)';
190print
'</td></tr>'.
"\n";
197if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) {
200 print
'<div class="div-table-responsive-no-min">';
201 print
'<table class="noborder centpercent">';
202 print
'<tr class="liste_titre">';
203 print
'<td class="titlefieldcreate">'.$langs->trans(
"LanguageFilesCachedIntoShmopSharedMemory").
'</td>';
204 print
'<td>'.$langs->trans(
"NbOfEntries").
'</td>';
205 print
'<td class="right">'.$langs->trans(
"Address").
'</td>';
208 foreach ($shmoparray as $key => $val) {
209 print
'<tr class="oddeven"><td>'.$key.
'</td>';
210 print
'<td>'.count($val).
'</td>';
211 print
'<td class="right">'.dol_getshmopaddress($key).
'</td>';
222print
'<div class="div-table-responsive-no-min">';
223print
'<table class="noborder centpercent">';
224print
'<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans(
"LocalisationDolibarrParameters").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>'.
"\n";
225print
'<tr class="oddeven"><td>'.$langs->trans(
"LanguageBrowserParameter",
"HTTP_ACCEPT_LANGUAGE").
'</td><td>'.$_SERVER[
"HTTP_ACCEPT_LANGUAGE"].
'</td></tr>'.
"\n";
226print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentUserLanguage").
'</td><td>'.$langs->getDefaultLang().
'</td></tr>'.
"\n";
228$thousand = $langs->transnoentitiesnoconv(
"SeparatorThousand");
229if ($thousand ==
'SeparatorThousand') {
232if ($thousand ==
'None') {
235print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentValueSeparatorThousand").
'</td><td>'.($thousand ==
' ' ? $langs->transnoentitiesnoconv(
"Space") : $thousand).
'</td></tr>'.
"\n";
237$dec = $langs->transnoentitiesnoconv(
"SeparatorDecimal");
238print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentValueSeparatorDecimal").
'</td><td>'.$dec.
'</td></tr>'.
"\n";
240print
'<tr class="oddeven"><td> => price2num(1233.56+1)</td><td>'.price2num(1233.56 + 1,
'2').
'</td></tr>'.
"\n";
241print
'<tr class="oddeven"><td> => price2num('.
"'1".$thousand.
"234".$dec.
"56')</td><td>".
price2num(
"1".$thousand.
"234".$dec.
"56",
'2').
"</td></tr>\n";
242if (($thousand !=
',' && $thousand !=
'.') || ($thousand !=
' ')) {
243 print
'<tr class="oddeven"><td> => price2num('.
"'1 234.56')</td><td>".
price2num(
"1 234.56",
'2').
"</td>";
246print
'<tr class="oddeven"><td> => price(1234.56)</td><td>'.price(1234.56).
'</td></tr>'.
"\n";
251if ($conf->db->type ==
'mysql' || $conf->db->type ==
'mysqli') {
252 print
'<tr class="oddeven"><td>'.$langs->trans(
"MySQLTimeZone").
' (database)</td><td>';
253 $sql =
"SHOW VARIABLES where variable_name = 'system_time_zone'";
254 $resql = $db->query($sql);
256 $obj = $db->fetch_object($resql);
257 print $form->textwithtooltip($obj->Value, $langs->trans(
'TZHasNoEffect'), 2, 1,
img_info(
''));
259 print
'</td></tr>'.
"\n";
261$txt = $langs->trans(
"OSTZ").
' (variable system TZ): '.(!empty($_ENV[
"TZ"]) ? $_ENV[
"TZ"] : $langs->trans(
"NotDefined")).
'<br>'.
"\n";
262$txt .= $langs->trans(
"PHPTZ").
' (date_default_timezone_get() / php.ini date.timezone): '.(
getServerTimeZoneString().
" / ".(ini_get(
"date.timezone") ? ini_get(
"date.timezone") : $langs->trans(
"NotDefined"))).
"<br>\n";
263$txt .= $langs->trans(
"Dolibarr constant MAIN_SERVER_TZ").
': '.(!
getDolGlobalString(
'MAIN_SERVER_TZ') ? $langs->trans(
"NotDefined") : $conf->global->MAIN_SERVER_TZ);
264print
'<tr class="oddeven"><td>'.$langs->trans(
"CurrentTimeZone").
'</td><td>';
268$daylight = round($c - $b);
270$val = ($a >= 0 ?
'+' :
'').$a;
271$val .=
' ('.($a ==
'unknown' ?
'unknown' : ($a >= 0 ?
'+' :
'').($a * 3600)).
')';
272$val .=
' '.getServerTimeZoneString();
273$val .=
' '.$langs->trans(
"DaylingSavingTime").
': '.(is_null($daylight) ?
'unknown' : ($a == $c ?
yn($daylight) :
yn(0).($daylight ?
' ('.$langs->trans(
'YesInSummer').
')' :
'')));
274print $form->textwithtooltip($val, $txt, 2, 1,
img_info(
''));
275print
'</td></tr>'.
"\n";
276print
'<tr class="oddeven"><td> => '.$langs->trans(
"CurrentHour").
'</td><td>'.
dol_print_date(
dol_now(
'gmt'),
'dayhour',
'tzserver').
'</td></tr>'.
"\n";
277print
'<tr class="oddeven"><td> => dol_print_date(0,"dayhourtext")</td><td>'.dol_print_date(0,
"dayhourtext").
'</td>';
278print
'<tr class="oddeven"><td> => dol_get_first_day(1970,1,false)</td><td>'.dol_get_first_day(1970, 1,
false).
' (=> dol_print_date() or idate() of this value = '.
dol_print_date(
dol_get_first_day(1970, 1,
false),
'dayhour').
')</td>';
279print
'<tr class="oddeven"><td> => dol_get_first_day(1970,1,true)</td><td>'.dol_get_first_day(1970, 1,
true).
' (=> dol_print_date() or idate() of this value = '.
dol_print_date(
dol_get_first_day(1970, 1,
true),
'dayhour').
')</td>';
281$tz = (int) $_SESSION[
'dol_tz'] + (
int) $_SESSION[
'dol_dst'];
282print
'<tr class="oddeven"><td>'.$langs->trans(
"ClientTZ").
'</td><td>'.($tz ? ($tz >= 0 ?
'+' :
'').$tz :
'').
' ('.($tz >= 0 ?
'+' :
'').($tz * 60 * 60).
')';
283print
' '.$_SESSION[
'dol_tz_string'];
284print
' '.$langs->trans(
"DaylingSavingTime").
': ';
285if ($_SESSION[
'dol_dst'] > 0) {
290if (!empty($_SESSION[
'dol_dst_first'])) {
293print
'</td></tr>'.
"\n";
294print
'</td></tr>'.
"\n";
295print
'<tr class="oddeven"><td> => '.$langs->trans(
"ClientHour").
'</td><td>'.
dol_print_date(
dol_now(
'gmt'),
'dayhour',
'tzuser').
'</td></tr>'.
"\n";
297$filesystemencoding = ini_get(
"unicode.filesystem_encoding");
298print
'<tr class="oddeven"><td>'.$langs->trans(
"File encoding").
' (php.ini unicode.filesystem_encoding)</td><td>'.$filesystemencoding.
'</td></tr>'.
"\n";
300$tmp = ini_get(
"unicode.filesystem_encoding");
301if (empty($tmp) && !empty($_SERVER[
"WINDIR"])) {
308 $tmp = $conf->global->MAIN_FILESYSTEM_ENCODING;
310print
'<tr class="oddeven"><td> => '.$langs->trans(
"File encoding").
'</td><td>'.$tmp.
'</td></tr>'.
"\n";
319$configfileparameters = array(
320 'dolibarr_main_prod' =>
'Production mode (Hide all error messages)',
321 'dolibarr_main_instance_unique_id' => $langs->trans(
"InstanceUniqueID"),
323 'dolibarr_main_url_root' => $langs->trans(
"URLRoot"),
324 '?dolibarr_main_url_root_alt' => $langs->trans(
"URLRoot").
' (alt)',
325 'dolibarr_main_document_root'=> $langs->trans(
"DocumentRootServer"),
326 '?dolibarr_main_document_root_alt' => $langs->trans(
"DocumentRootServer").
' (alt)',
327 'dolibarr_main_data_root' => $langs->trans(
"DataRootServer"),
329 'dolibarr_main_db_host' => $langs->trans(
"DatabaseServer"),
330 'dolibarr_main_db_port' => $langs->trans(
"DatabasePort"),
331 'dolibarr_main_db_name' => $langs->trans(
"DatabaseName"),
332 'dolibarr_main_db_type' => $langs->trans(
"DriverType"),
333 'dolibarr_main_db_user' => $langs->trans(
"DatabaseUser"),
334 'dolibarr_main_db_pass' => $langs->trans(
"DatabasePassword"),
335 'dolibarr_main_db_character_set' => $langs->trans(
"DBStoringCharset"),
336 'dolibarr_main_db_collation' => $langs->trans(
"DBSortingCollation"),
337 '?dolibarr_main_db_prefix' => $langs->trans(
"DatabasePrefix"),
338 'dolibarr_main_db_readonly' => $langs->trans(
"ReadOnlyMode"),
340 'dolibarr_main_authentication' => $langs->trans(
"AuthenticationMode"),
341 '?multicompany_transverse_mode'=> $langs->trans(
"MultiCompanyMode"),
343 '?dolibarr_main_auth_ldap_login_attribute' =>
'dolibarr_main_auth_ldap_login_attribute',
344 '?dolibarr_main_auth_ldap_host' =>
'dolibarr_main_auth_ldap_host',
345 '?dolibarr_main_auth_ldap_port' =>
'dolibarr_main_auth_ldap_port',
346 '?dolibarr_main_auth_ldap_version' =>
'dolibarr_main_auth_ldap_version',
347 '?dolibarr_main_auth_ldap_dn' =>
'dolibarr_main_auth_ldap_dn',
348 '?dolibarr_main_auth_ldap_admin_login' =>
'dolibarr_main_auth_ldap_admin_login',
349 '?dolibarr_main_auth_ldap_admin_pass' =>
'dolibarr_main_auth_ldap_admin_pass',
350 '?dolibarr_main_auth_ldap_debug' =>
'dolibarr_main_auth_ldap_debug',
352 '?dolibarr_lib_FPDF_PATH' =>
'dolibarr_lib_FPDF_PATH',
353 '?dolibarr_lib_TCPDF_PATH' =>
'dolibarr_lib_TCPDF_PATH',
354 '?dolibarr_lib_FPDI_PATH' =>
'dolibarr_lib_FPDI_PATH',
355 '?dolibarr_lib_TCPDI_PATH' =>
'dolibarr_lib_TCPDI_PATH',
356 '?dolibarr_lib_NUSOAP_PATH' =>
'dolibarr_lib_NUSOAP_PATH',
357 '?dolibarr_lib_GEOIP_PATH' =>
'dolibarr_lib_GEOIP_PATH',
358 '?dolibarr_lib_ODTPHP_PATH' =>
'dolibarr_lib_ODTPHP_PATH',
359 '?dolibarr_lib_ODTPHP_PATHTOPCLZIP' =>
'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
360 '?dolibarr_js_CKEDITOR' =>
'dolibarr_js_CKEDITOR',
361 '?dolibarr_js_JQUERY' =>
'dolibarr_js_JQUERY',
362 '?dolibarr_js_JQUERY_UI' =>
'dolibarr_js_JQUERY_UI',
363 '?dolibarr_font_DOL_DEFAULT_TTF' =>
'dolibarr_font_DOL_DEFAULT_TTF',
364 '?dolibarr_font_DOL_DEFAULT_TTF_BOLD' =>
'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
366 'dolibarr_main_restrict_os_commands' =>
'Restrict CLI commands for backups',
367 'dolibarr_main_restrict_ip' =>
'Restrict access to some IPs only',
368 '?dolibarr_mailing_limit_sendbyweb' =>
'Limit nb of email sent by page',
369 '?dolibarr_mailing_limit_sendbycli' =>
'Limit nb of email sent by cli',
370 '?dolibarr_mailing_limit_sendbyday' =>
'Limit nb of email sent per day',
371 '?dolibarr_strict_mode' =>
'Strict mode is on/off',
372 '?dolibarr_nocsrfcheck' =>
'Disable CSRF security checks'
375print
'<div class="div-table-responsive-no-min">';
376print
'<table class="noborder centpercent">';
377print
'<tr class="liste_titre">';
378print
'<td class="titlefieldcreate">'.$langs->trans(
"Parameters").
' ';
379print $langs->trans(
"ConfigurationFile").
' ('.$conffiletoshowshort.
')';
381print
'<td>'.$langs->trans(
"Parameter").
'</td>';
382print
'<td>'.$langs->trans(
"Value").
'</td>';
385foreach ($configfileparameters as $key => $value) {
388 if (empty($ignore)) {
389 $newkey = preg_replace(
'/^\?/',
'', $key);
391 if (preg_match(
'/^\?/', $key) && empty(${$newkey})) {
392 if ($newkey !=
'multicompany_transverse_mode' || !isModEnabled(
'multicompany')) {
396 if (strpos($newkey,
'separator') !==
false && $lastkeyshown ==
'separator') {
400 print
'<tr class="oddeven">';
401 if (strpos($newkey,
'separator') !==
false) {
402 print
'<td colspan="3"> </td>';
405 print
"<td>".$value.
'</td>';
407 print
'<td>'.$newkey.
'</td>';
410 if (in_array($newkey, array(
'dolibarr_main_db_pass',
'dolibarr_main_auth_ldap_admin_pass'))) {
411 if (empty($dolibarr_main_prod)) {
412 print
'<!-- '.${$newkey}.
' -->';
417 } elseif ($newkey ==
'dolibarr_main_url_root' && preg_match(
'/__auto__/', ${$newkey})) {
418 print ${$newkey}.
' => '.constant(
'DOL_MAIN_URL_ROOT');
419 } elseif ($newkey ==
'dolibarr_main_document_root_alt') {
420 $tmparray = explode(
',', $dolibarr_main_document_root_alt);
422 foreach ($tmparray as $value2) {
427 if (!is_readable($value2)) {
428 $langs->load(
"errors");
429 print
' '.img_warning($langs->trans(
"ErrorCantReadDir", $value2));
433 } elseif ($newkey ==
'dolibarr_main_instance_unique_id') {
435 global $dolibarr_main_cookie_cryptkey, $dolibarr_main_instance_unique_id;
436 $valuetoshow = $dolibarr_main_instance_unique_id ? $dolibarr_main_instance_unique_id : $dolibarr_main_cookie_cryptkey;
437 if (empty($dolibarr_main_prod)) {
438 print
'<!-- '.$dolibarr_main_instance_unique_id.
' (this will not be visible if $dolibarr_main_prod = 1 -->';
440 print
' <span class="opacitymedium">'.$langs->trans(
"ThisValueCanBeReadBecauseInstanceIsNotInProductionMode").
'</span>';
443 print
' <span class="opacitymedium">'.$langs->trans(
"SeeConfFile").
'</span>';
445 if (empty($valuetoshow)) {
446 print
img_warning(
"EditConfigFileToAddEntry",
'dolibarr_main_instance_unique_id');
449 print
'<tr class="oddeven"><td></td><td> => '.$langs->trans(
"HashForPing").
'</td><td>'.md5(
'dolibarr'.$valuetoshow).
'</td></tr>'.
"\n";
450 } elseif ($newkey ==
'dolibarr_main_prod') {
453 $valuetoshow = ${$newkey};
454 if (empty($valuetoshow)) {
455 print
img_warning($langs->trans(
'SwitchThisForABetterSecurity', 1));
457 } elseif ($newkey ==
'dolibarr_nocsrfcheck') {
460 $valuetoshow = ${$newkey};
461 if (!empty($valuetoshow)) {
462 print
img_warning($langs->trans(
'SwitchThisForABetterSecurity', 0));
464 } elseif ($newkey ==
'dolibarr_main_db_readonly') {
467 $valuetoshow = ${$newkey};
468 if (!empty($valuetoshow)) {
469 print
img_warning($langs->trans(
'ReadOnlyMode', 1));
472 print(empty(${$newkey}) ?
'' : ${$newkey});
474 if ($newkey ==
'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) {
475 print
' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.
')';
480 $lastkeyshown = $newkey;
490print
'<div class="div-table-responsive-no-min">';
491print
'<table class="noborder">';
492print
'<tr class="liste_titre">';
493print
'<td class="titlefield">'.$langs->trans(
"Parameters").
' '.$langs->trans(
"Database").
'</td>';
494print
'<td>'.$langs->trans(
"Value").
'</td>';
495if (!isModEnabled(
'multicompany') || !$user->entity) {
496 print
'<td class="center width="80px"">'.$langs->trans(
"Entity").
'</td>';
502$sql .=
", ".$db->decrypt(
'name').
" as name";
503$sql .=
", ".$db->decrypt(
'value').
" as value";
507$sql .=
" FROM ".MAIN_DB_PREFIX.
"const";
508if (!isModEnabled(
'multicompany')) {
510 $sql .=
" WHERE entity IN (0,".$conf->entity.
")";
514 $sql .=
" WHERE entity IN (".$db->sanitize($user->entity.
",".$conf->entity).
")";
517$sql .=
" ORDER BY entity, name ASC";
518$resql = $db->query($sql);
520 $num = $db->num_rows($resql);
524 $obj = $db->fetch_object($resql);
526 print
'<tr class="oddeven">';
527 print
'<td class="tdoverflowmax600" title="'.dol_escape_htmltag($obj->name).
'">'.
dol_escape_htmltag($obj->name).
'</td>'.
"\n";
528 print
'<td class="tdoverflowmax300">';
530 if (empty($dolibarr_main_prod)) {
531 print
'<!-- '.$obj->value.
' -->';
538 if (!isModEnabled(
'multicompany') || !$user->entity) {
539 print
'<td class="center" width="80px">'.$obj->entity.
'</td>'.
"\n";
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
getServerTimeZoneString()
Return server timezone string.
getServerTimeZoneInt($refgmtdate='now')
Return server timezone int.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_stringtotime($string, $gm=1)
Convert a string date into a GM Timestamps date Warning: YYYY-MM-DDTHH:MM:SS+02:00 (RFC3339) is not s...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
isASecretKey($keyname)
Return if string has a name dedicated to store a secret.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_info($titlealt='default')
Show info logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
getURLContent($url, $postorget='GET', $param='', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0, $ssl_verifypeer=-1)
Function to get a content from an URL (use proxy if proxy defined).
dol_listshmop()
Return list of contents of all memory area shared.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.