2004-10-19 20:58:50 +02:00
|
|
|
|
<?php
|
2002-04-30 12:51:35 +02:00
|
|
|
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2005-07-08 22:19:51 +02:00
|
|
|
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
2002-04-30 12:51:35 +02:00
|
|
|
|
*
|
|
|
|
|
|
* $Id$
|
|
|
|
|
|
* $Source$
|
|
|
|
|
|
*
|
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
|
*
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
*
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
*/
|
2004-09-04 13:19:13 +02:00
|
|
|
|
|
2005-07-08 22:19:51 +02:00
|
|
|
|
/**
|
|
|
|
|
|
\file htdocs/admin/system/phpinfo.php
|
2004-10-19 20:58:50 +02:00
|
|
|
|
\brief Page des infos syst<EFBFBD>me de php
|
2004-09-04 13:19:13 +02:00
|
|
|
|
\version $Revision$
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2003-03-11 15:20:02 +01:00
|
|
|
|
require("./pre.inc.php");
|
|
|
|
|
|
|
2004-09-04 13:19:13 +02:00
|
|
|
|
$langs->load("admin");
|
|
|
|
|
|
|
2004-02-15 01:04:02 +01:00
|
|
|
|
if (!$user->admin)
|
|
|
|
|
|
accessforbidden();
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-03-11 15:20:02 +01:00
|
|
|
|
llxHeader();
|
2004-02-12 01:23:11 +01:00
|
|
|
|
|
2004-10-19 20:58:50 +02:00
|
|
|
|
ob_start();
|
2004-02-12 01:23:11 +01:00
|
|
|
|
|
2004-08-21 01:18:32 +02:00
|
|
|
|
if ($_GET["what"] == 'conf')
|
2003-03-11 15:20:02 +01:00
|
|
|
|
{
|
|
|
|
|
|
phpinfo(INFO_CONFIGURATION);
|
|
|
|
|
|
}
|
2004-08-21 01:18:32 +02:00
|
|
|
|
elseif ($_GET["what"] == 'env')
|
2003-03-11 15:20:02 +01:00
|
|
|
|
{
|
2005-07-08 22:19:51 +02:00
|
|
|
|
$title=$langs->trans("OSEnv");
|
2003-03-11 15:20:02 +01:00
|
|
|
|
phpinfo(INFO_ENVIRONMENT);
|
|
|
|
|
|
}
|
2004-08-21 01:18:32 +02:00
|
|
|
|
elseif ($_GET["what"] == 'modules')
|
2003-03-11 15:20:02 +01:00
|
|
|
|
{
|
2005-07-08 22:19:51 +02:00
|
|
|
|
$title=$langs->trans("Modules");
|
2003-03-11 15:20:02 +01:00
|
|
|
|
phpinfo(INFO_MODULES);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
phpinfo();
|
|
|
|
|
|
}
|
2004-02-12 01:23:11 +01:00
|
|
|
|
|
2004-10-19 20:58:50 +02:00
|
|
|
|
$chaine = ob_get_contents();
|
|
|
|
|
|
ob_end_clean();
|
2004-02-12 01:23:11 +01:00
|
|
|
|
|
2005-07-08 22:19:51 +02:00
|
|
|
|
// Nettoie la sortie php pour inclusion dans une page deja existante
|
2004-03-14 17:09:14 +01:00
|
|
|
|
$chaine = eregi_replace('background-color: #ffffff;','',$chaine);
|
2004-02-12 01:23:11 +01:00
|
|
|
|
$chaine = eregi_replace('.*<style','<style',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('<title>.*<body>','',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('<title>.*<body>','',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('a:link.*underline','',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('table.*important; }','',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('<hr />','',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('</body></html>','',$chaine);
|
2004-02-15 01:04:02 +01:00
|
|
|
|
$chaine = eregi_replace('body, td, th, h1, h2 {font-family: sans-serif;}','',$chaine);
|
2005-07-08 22:19:51 +02:00
|
|
|
|
$chaine = eregi_replace('cellpadding="3" ','cellpadding="1" cellspacing="1"',$chaine);
|
|
|
|
|
|
$chaine = eregi_replace('class="h"','class="liste_titre"',$chaine);
|
2006-03-26 00:32:29 +01:00
|
|
|
|
$chaine = eregi_replace('<th colspan="2">','<td>',$chaine);
|
2005-07-08 22:19:51 +02:00
|
|
|
|
$chaine = eregi_replace('th>','td>',$chaine);
|
|
|
|
|
|
// Titres
|
2006-03-26 00:32:29 +01:00
|
|
|
|
$chaine = eregi_replace('<h1([^>]*)>','<div class="titre">',$chaine);
|
2005-07-08 22:19:51 +02:00
|
|
|
|
$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);
|
|
|
|
|
|
|
2005-08-11 20:51:38 +02:00
|
|
|
|
if (isset($title))
|
2005-07-08 22:19:51 +02:00
|
|
|
|
{
|
|
|
|
|
|
print_titre($title);
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
}
|
2004-02-12 01:23:11 +01:00
|
|
|
|
|
2004-10-19 20:58:50 +02:00
|
|
|
|
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
|
2004-02-12 01:23:11 +01:00
|
|
|
|
print "<br>\n";
|
|
|
|
|
|
|
2005-07-08 22:51:19 +02:00
|
|
|
|
llxfooter('$Date$ - $Revision$');
|
2002-04-30 12:51:35 +02:00
|
|
|
|
?>
|