From 65ebccc2f5af8cfe6b388145e3fa4d50747bcd68 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Mon, 7 Feb 2011 11:48:53 +0000 Subject: [PATCH] Code homogenization and correct some display error --- htdocs/admin/system/dolibarr.php | 71 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index fc68150819d..2ab6e648d7d 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -50,12 +50,11 @@ $var=true; print ''; print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; print '
'.$langs->trans("Version").''.$langs->trans("Value").'
".$langs->trans("VersionLastInstall")."".$conf->global->MAIN_VERSION_LAST_INSTALL."
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
".$langs->trans("VersionLastUpgrade")."".$conf->global->MAIN_VERSION_LAST_UPGRADE; -print "
'.$langs->trans("VersionLastUpgrade").''.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
".$langs->trans("VersionProgram")."".DOL_VERSION; +print '
'.$langs->trans("VersionProgram").''.DOL_VERSION; // If current version differs from last upgrade if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) { @@ -67,7 +66,7 @@ else // Compare version with last upgrade database version if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE)); } -print "
'; print '
'; @@ -76,20 +75,20 @@ $var=true; print ''; print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; print '
'.$langs->trans("Session").''.$langs->trans("Value").'
".$langs->trans("SessionSavePath").''.session_save_path()."
'.$langs->trans("SessionSavePath").''.session_save_path().'
".$langs->trans("SessionName").''.session_name()."
'.$langs->trans("SessionName").''.session_name().'
".$langs->trans("SessionId").''.session_id()."
'.$langs->trans("SessionId").''.session_id().'
".$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); +print '
'.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "
".$langs->trans("CurrentTheme").''.$conf->theme."
'.$langs->trans("CurrentTheme").''.$conf->theme.'
".$langs->trans("CurrentMenuHandler").''.$conf->top_menu."
'.$langs->trans("CurrentMenuHandler").''.$conf->top_menu.'
'; print '
'; @@ -110,10 +109,10 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S foreach($shmoparray as $key => $val) { $var=!$var; - print "".$key.''; - print ''.sizeof($val).""; + print ''.$key.''; + print ''.sizeof($val).''; print ''.dol_getshmopaddress($key).''; - print "\n"; + print ''."\n"; } print ''; @@ -126,9 +125,9 @@ $var=true; print ''; print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; /*$var=!$var; print "\n"; $var=!$var; @@ -143,14 +142,14 @@ $var=!$var; $thousand=$langs->trans("SeparatorThousand"); if ($thousand == 'SeparatorThousand') $thousand=' '; // ' ' does not work on trans method if ($thousand == 'None') $thousand=''; -print "\n"; +print ''."\n"; // Decimals $var=!$var; $dec=$langs->trans("SeparatorDecimal"); -print "\n"; +print ''."\n"; // Show results of functions to see if everything works $var=!$var; -print ""; +print ''; $var=!$var; print ""; if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) @@ -160,56 +159,56 @@ if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) print "\n"; } $var=!$var; -print ""; +print ''; //print ''."\n"; // Timezone // PHP server $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php if (function_exists('date_default_timezone_get')) { $var=!$var; - print "\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php + print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php } $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print ""; +print ''; $var=!$var; -print ""; +print ''; $var=!$var; -print ""; +print ''; # Parent company $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; #print "\n"; -print "\n"; +print ''."\n"; # Client $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; $var=!$var; -print "\n"; +print ''."\n"; #print "\n"; $var=!$var; $filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 -print "\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php $var=!$var; $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp)) $tmp='utf-8'; // By default for other if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_FILESYSTEM_ENCODING; -print "\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php print '
'.$langs->trans("LocalisationDolibarrParameters").''.$langs->trans("Value").'
".$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE")."".$_SERVER["HTTP_ACCEPT_LANGUAGE"]."
'.$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE").''.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'
".$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang()."
'.$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang().'
".$langs->trans("LanguageBrowserParameter","LANG")."".$_ENV["LANG"]."
".$langs->trans("CurrentValueSeparatorThousand")."".($thousand==' '?$langs->trans("Space"):$thousand)."
'.$langs->trans("CurrentValueSeparatorThousand").''.($thousand==' '?$langs->trans("Space"):$thousand).'
".$langs->trans("CurrentValueSeparatorDecimal")."".$dec."
'.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.'
=> price2num(1233.56+1)'.price2num(1233.56+1,'2')."
=> price2num(1233.56+1)'.price2num(1233.56+1,'2').'
=> price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2')."
=> price(1234.56)'.price(1234.56)."
=> price(1234.56)'.price(1234.56).'
'.$langs->trans("TimeZone").''.$langs->trans("Value").'
".$langs->trans("OSTZ")." (variable system TZ)".$_ENV["TZ"]."
'.$langs->trans("OSTZ").' (variable system TZ)'.$_ENV["TZ"].'
".$langs->trans("PHPTZ")." (php.ini date.timezone)".ini_get("date.timezone")."
'.$langs->trans("PHPTZ").' (php.ini date.timezone)'.ini_get("date.timezone").'
=> ".$langs->trans("CurrentTimeZone").""; // Timezone server PHP + print '
=> '.$langs->trans("CurrentTimeZone").''; // Timezone server PHP print date_default_timezone_get(); - print "
=> ".$langs->trans("PHPServerOffsetWithGreenwich")."".(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970))."
=> '.$langs->trans("PHPServerOffsetWithGreenwich").''.(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970)).'
=> ".$langs->trans("CurrentHour")."".dol_print_date(dol_now(),'dayhour','tzserver')."
=> '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
=> dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext")."
=> dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").'
=> dol_get_first_day(1970,1,false)'.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').")
=> dol_get_first_day(1970,1,false)'.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').')
=> dol_get_first_day(1970,1,true)'.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').")
=> dol_get_first_day(1970,1,true)'.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').')
".$langs->trans("CompanyTZ")."".$langs->trans("FeatureNotYetAvailable")."
'.$langs->trans("CompanyTZ").''.$langs->trans("FeatureNotYetAvailable").'
=> ".$langs->trans("CompanyHour")."".dol_print_date(dol_now('tzuser'),'dayhour')."
=> ".$langs->trans("CompanyHour")."".$langs->trans("FeatureNotYetAvailable")."
=> '.$langs->trans("CompanyHour").''.$langs->trans("FeatureNotYetAvailable").'
".$langs->trans("ClientTZ")."".($_SESSION['dol_tz']>=0?'+':'').$_SESSION['dol_tz']."
'.$langs->trans("ClientTZ").''.($_SESSION['dol_tz']>=0?'+':'').$_SESSION['dol_tz'].'
=> ".$langs->trans("ClientOffsetWithGreenwich")."".($_SESSION['dol_tz']>=0?'+':'').($_SESSION['dol_tz']*60*60)."
=> '.$langs->trans("ClientOffsetWithGreenwich").''.($_SESSION['dol_tz']>=0?'+':'').($_SESSION['dol_tz']*60*60).'
=> ".$langs->trans("ClientHour")."".dol_print_date(dol_now(),'dayhour','tzuser')."
=> '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').'
=> ".$langs->trans("ClientHour")."".$langs->trans("FeatureNotYetAvailable")."
".$langs->trans("File encoding")." (php.ini unicode.filesystem_encoding)".$filesystemencoding."
'.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.'
=> ".$langs->trans("File encoding")."".$tmp."
=> '.$langs->trans("File encoding").''.$tmp.'
'; print '
';