Clean page of info tools
This commit is contained in:
parent
01b7b7692d
commit
f4f9a7c461
@ -73,7 +73,7 @@ print load_fiche_titre($title, '', 'title_setup');
|
||||
// Version
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").')</td><td>'.DOL_VERSION;
|
||||
// If current version differs from last upgrade
|
||||
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE))
|
||||
@ -139,7 +139,7 @@ print '<br>';
|
||||
// Session
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("SessionSavePath").'</td><td colspan="2">'.session_save_path().'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("SessionName").'</td><td colspan="2">'.session_name().'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("SessionId").'</td><td colspan="2">'.session_id().'</td></tr>'."\n";
|
||||
@ -180,7 +180,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="titlefield">'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
|
||||
print '<td>'.$langs->trans("NbOfEntries").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Address").'</td>';
|
||||
print '</tr>'."\n";
|
||||
@ -202,7 +202,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
||||
// Localisation
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="liste_titre"><td class="titlefieldcreate">'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LanguageBrowserParameter", "HTTP_ACCEPT_LANGUAGE").'</td><td>'.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CurrentUserLanguage").'</td><td>'.$langs->getDefaultLang().'</td></tr>'."\n";
|
||||
// Thousands
|
||||
@ -342,7 +342,7 @@ $configfileparameters = array(
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="titlefield">'.$langs->trans("Parameters").' ';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("Parameters").' ';
|
||||
print $langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
|
||||
@ -69,13 +69,13 @@ if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
|
||||
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$ErrorPicturePath = "../../theme/eldy/img/error.png";
|
||||
$WarningPicturePath = "../../theme/eldy/img/warning.png";
|
||||
$OkayPicturePath = "../../theme/eldy/img/tick.png";
|
||||
|
||||
print '<tr><td width="220">'.$langs->trans("Version").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Version").'</td><td>';
|
||||
|
||||
$arrayphpminversionerror = array(5, 5, 0);
|
||||
$arrayphpminversionwarning = array(5, 6, 0);
|
||||
@ -129,11 +129,8 @@ $loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="200">'.$langs->trans("Extension").'</td>';
|
||||
//print '<td align="center">'.$langs->trans("EnabledInSetup").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Loaded").'</td>';
|
||||
print '<td align="center">'.$langs->trans("FunctionTest").'</td>';
|
||||
print '<td>'.$langs->trans("Result").'</td>';
|
||||
print '<td class="titlefield">'.$langs->trans("Extension").'</td>';
|
||||
print '<td>'.$langs->trans("Test").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$functions = ["mb_check_encoding"];
|
||||
@ -141,9 +138,6 @@ $name = "MBString";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -152,9 +146,6 @@ $name = "JSON";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -163,8 +154,6 @@ $name = "GD";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -173,8 +162,6 @@ $name = "Curl";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -185,8 +172,6 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
}
|
||||
@ -196,8 +181,6 @@ $name = "IMAP";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -206,8 +189,6 @@ $name = "xDebug";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
print "</tr>";
|
||||
|
||||
@ -222,7 +203,7 @@ foreach ($phparray as $key => $value)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="220px">'.$key.'</td>';
|
||||
print '<td class="titlefield">'.$key.'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -269,69 +250,6 @@ llxFooter();
|
||||
$db->close();
|
||||
|
||||
|
||||
/**
|
||||
* Return a table column with a indicator (okay or warning), based on the given name and list
|
||||
*
|
||||
* @param string $name The name to check inside the given list
|
||||
* @param array $list A list that should contains the given name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getTableColumn($name, array $list)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$name = strtolower($name);
|
||||
$html = "<td align='center'>";
|
||||
|
||||
if (in_array($name, $list))
|
||||
{
|
||||
if ($name == 'xdebug') $html .= '<img src="../../theme/eldy/img/warning.png" title="'.$langs->trans("ModuleActivated", "xdebug").'">';
|
||||
else $html .= '<img src="../../theme/eldy/img/tick.png" title="Ok">';
|
||||
} else {
|
||||
if ($name == 'xdebug') $html .= yn(0);
|
||||
else $html .= '<img src="../../theme/eldy/img/warning.png" title="Warning">';
|
||||
}
|
||||
|
||||
$html .= "</td>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a table column with a indicator (okay or warning), based on the given functions to check
|
||||
*
|
||||
* @param array $functions A list with functions to check
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getTableColumnFunction(array $functions)
|
||||
{
|
||||
if (count($functions) < 1)
|
||||
{
|
||||
return "<td align='center'>-</td>";
|
||||
}
|
||||
|
||||
$result = true;
|
||||
$html = "<td align='center'>";
|
||||
|
||||
foreach ($functions as $function)
|
||||
{
|
||||
$result = $result && function_exists($function);
|
||||
}
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$html .= '<img src="../../theme/eldy/img/tick.png" alt="Ok">';
|
||||
} else {
|
||||
$html .= '<img src="../../theme/eldy/img/warning.png" alt="Warning">';
|
||||
}
|
||||
|
||||
$html .= "</td>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a result column with a translated result text
|
||||
*
|
||||
@ -339,7 +257,6 @@ function getTableColumnFunction(array $functions)
|
||||
* @param array $activated A list with all activated PHP extensions. Deprecated.
|
||||
* @param array $loaded A list with all loaded PHP extensions
|
||||
* @param array $functions A list with all PHP functions to check
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getResultColumn($name, array $activated, array $loaded, array $functions)
|
||||
@ -347,6 +264,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function
|
||||
global $langs;
|
||||
|
||||
$result = true;
|
||||
|
||||
//$result = $result && in_array(strtolower($name), $activated);
|
||||
$result = $result && in_array(strtolower($name), $loaded);
|
||||
|
||||
@ -356,7 +274,29 @@ function getResultColumn($name, array $activated, array $loaded, array $function
|
||||
}
|
||||
|
||||
$html = "<td>";
|
||||
$html .= $result ? $langs->trans("PHPSupport", $name) : $langs->trans("ErrorPHPDoesNotSupport", $name);
|
||||
if ($result) {
|
||||
if (strtolower($name) == 'xdebug') $html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
|
||||
else $html .= img_picto($langs->trans("Ok"), 'tick');
|
||||
if (in_array(strtolower($name), $loaded)) {
|
||||
$html .= ' '.$langs->trans("Loaded").' - ';
|
||||
} else {
|
||||
//$html .= ' '.$langs->trans("NotLoaded").' - ';
|
||||
}
|
||||
if (strtolower($name) == 'xdebug') {
|
||||
$html .= ' '.$langs->trans("ModuleActivated", "xdebug");
|
||||
} else {
|
||||
$html .= ' '.$langs->trans("PHPSupport", $name);
|
||||
}
|
||||
} else {
|
||||
if (strtolower($name) == 'xdebug') $html .= yn(0);
|
||||
else $html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
|
||||
if (in_array(strtolower($name), $loaded)) {
|
||||
$html .= ' '.$langs->trans("Loaded").' - ';
|
||||
} else {
|
||||
//$html .= ' '.$langs->trans("NotLoaded").' - ';
|
||||
}
|
||||
$html .= ' '.$langs->trans("ErrorPHPDoesNotSupport", $name);
|
||||
}
|
||||
$html .= "</td>";
|
||||
|
||||
return $html;
|
||||
|
||||
@ -43,9 +43,6 @@ if (GETPOST('action', 'aZ09') == 'donothing')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$nowstring = dol_print_date(dol_now(), 'dayhourlog');
|
||||
|
||||
llxHeader();
|
||||
|
||||
print load_fiche_titre($langs->trans("Security"), '', 'title_setup');
|
||||
@ -78,7 +75,7 @@ else {
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("ConfigFile"), '', 'folder');
|
||||
print load_fiche_titre($langs->trans("ConfigurationFile"), '', 'folder');
|
||||
|
||||
print '<strong>'.$langs->trans("dolibarr_main_prod").'</strong>: '.$dolibarr_main_prod;
|
||||
if (empty($dolibarr_main_prod)) {
|
||||
@ -90,7 +87,12 @@ print '<strong>'.$langs->trans("dolibarr_nocsrfcheck").'</strong>: '.$dolibarr_n
|
||||
if (!empty($dolibarr_nocsrfcheck)) {
|
||||
print img_picto('', 'warning').' '.$langs->trans("IfYouAreOnAProductionSetThis", 0);
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
print '<strong>'.$langs->trans("dolibarr_main_restrict_ip").'</strong>: '.$dolibarr_main_restrict_ip;
|
||||
/*if (empty($dolibarr_main_restrict_ip)) {
|
||||
print ' '.img_picto('', 'warning').' '.$langs->trans("IfYouAreOnAProductionSetThis", 1);
|
||||
}*/
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
@ -102,9 +104,17 @@ print '<strong>'.$langs->trans("PermissionsOnFilesInWebRoot").'</strong>: ';
|
||||
print 'TODO';
|
||||
print '<br>';
|
||||
|
||||
print '<strong>'.$langs->trans("PermissionsOnFile", 'conf.php').'</strong>: ';
|
||||
// TODO Check permission on file conf.php (read only for the web user)
|
||||
print 'TODO';
|
||||
print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php
|
||||
$perms = fileperms($dolibarr_main_document_root.'/'.$conffile);
|
||||
if ($perms) {
|
||||
if (($perms & 0x0004) || ($perms & 0x0002)) {
|
||||
print img_warning().' '.$langs->trans("ConfFileIsReadableOrWritableByAnyUsers");
|
||||
} else {
|
||||
print img_picto('', 'tick');
|
||||
}
|
||||
} else {
|
||||
print img_warning().' '.$langs->trans("FailedToReadFile", $conffile);
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
@ -137,14 +147,15 @@ print '<br>';
|
||||
print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup"), '', 'folder');
|
||||
|
||||
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
||||
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? 'unset' : '')." ";
|
||||
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? $langs->trans("Undefined") : '')." ";
|
||||
print '<span class="opacitymedium"> If unset: \'md5\'</span> ';
|
||||
print '<span class="opacitymedium"> - Recommanded value: \'password_hash\'</span><br>';
|
||||
print '<strong>MAIN_SECURITY_SALT</strong> = '.$conf->global->MAIN_SECURITY_SALT.'<br>';
|
||||
print '<strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans("Undefined") : '').'<br>';
|
||||
print '<br>';
|
||||
// TODO
|
||||
|
||||
print '<strong>'.$langs->trans("AntivirusEnabledOnUpload").'</strong>: ';
|
||||
print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').' ';
|
||||
print yn($conf->global->MAIN_ANTIVIRUS_COMMAND ? 1 : 0);
|
||||
if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
|
||||
print ' - '.$conf->global->MAIN_ANTIVIRUS_COMMAND;
|
||||
|
||||
@ -2095,3 +2095,4 @@ SeeLinkToOnlineDocumentation=See link to online documention on top menu for exam
|
||||
SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF.
|
||||
AskThisIDToYourBank=Contact your bank to get this ID
|
||||
AdvancedModeOnly=Permision available in Advanced permission mode only
|
||||
ConfFileIsReadableOrWritableByAnyUsers=The conf file is reabable or writable by any users. Give permission to web server user and group only.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user