Adaptation look des phpinfo au style Dolibarr.

This commit is contained in:
Laurent Destailleur
2005-07-08 20:19:51 +00:00
parent 9c67fba5f4
commit f2902ffcf3
3 changed files with 25 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* $Id$
* $Source$
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
/*! \file htdocs/admin/system/phpinfo.php
/**
\file htdocs/admin/system/phpinfo.php
\brief Page des infos syst<73>me de php
\version $Revision$
*/
@@ -44,10 +44,12 @@ if ($_GET["what"] == 'conf')
}
elseif ($_GET["what"] == 'env')
{
$title=$langs->trans("OSEnv");
phpinfo(INFO_ENVIRONMENT);
}
elseif ($_GET["what"] == 'modules')
{
$title=$langs->trans("Modules");
phpinfo(INFO_MODULES);
}
else
@@ -58,7 +60,7 @@ else
$chaine = ob_get_contents();
ob_end_clean();
# Nettoie la sortie php pour inclusion dans une page deja existante
// Nettoie la sortie php pour inclusion dans une page deja existante
$chaine = eregi_replace('background-color: #ffffff;','',$chaine);
$chaine = eregi_replace('.*<style','<style',$chaine);
$chaine = eregi_replace('<title>.*<body>','',$chaine);
@@ -68,6 +70,23 @@ $chaine = eregi_replace('table.*important; }','',$chaine);
$chaine = eregi_replace('<hr />','',$chaine);
$chaine = eregi_replace('</body></html>','',$chaine);
$chaine = eregi_replace('body, td, th, h1, h2 {font-family: sans-serif;}','',$chaine);
$chaine = eregi_replace('cellpadding="3" ','cellpadding="1" cellspacing="1"',$chaine);
$chaine = eregi_replace('class="h"','class="liste_titre"',$chaine);
$chaine = eregi_replace('th>','td>',$chaine);
// Titres
$chaine = eregi_replace('<h1>','<div class="titre">',$chaine);
$chaine = eregi_replace('<h2>','<div class="titre">',$chaine);
$chaine = eregi_replace('</h1>','</div><br>',$chaine);
$chaine = eregi_replace('</h2>','</div>',$chaine);
$chaine = eregi_replace('<td class="e">','<td class="impair">',$chaine);
$chaine = eregi_replace('<td class="v">','<td class="pair">',$chaine);
if ($title)
{
print_titre($title);
print '<br>';
}
print "$chaine\n"; // Ne pas centrer la r<>ponse php car certains tableau du bas tr<74>s large rendent ceux du haut compl<70>tement <20> droite
print "<br>\n";