[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/admin/system/ -> phpinfo.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * $Id: phpinfo.php,v 1.13 2005/08/11 18:51:38 eldy Exp $
   6   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/system/phpinfo.php,v $
   7   *
   8   * This program is free software; you can redistribute it and/or modify
   9   * it under the terms of the GNU General Public License as published by
  10   * the Free Software Foundation; either version 2 of the License, or
  11   * (at your option) any later version.
  12   *
  13   * This program is distributed in the hope that it will be useful,
  14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16   * GNU General Public License for more details.
  17   *
  18   * You should have received a copy of the GNU General Public License
  19   * along with this program; if not, write to the Free Software
  20   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21   */
  22  
  23  /**
  24          \file       htdocs/admin/system/phpinfo.php
  25          \brief      Page des infos système de php
  26          \version    $Revision: 1.13 $
  27  */
  28  
  29  require ("./pre.inc.php");
  30  
  31  $langs->load("admin");
  32  
  33  if (!$user->admin)
  34    accessforbidden();
  35  
  36  
  37  llxHeader();
  38  
  39  ob_start(); 
  40  
  41  if ($_GET["what"] == 'conf')
  42  {
  43    phpinfo(INFO_CONFIGURATION);
  44  }
  45  elseif ($_GET["what"] == 'env')
  46  {
  47    $title=$langs->trans("OSEnv");
  48    phpinfo(INFO_ENVIRONMENT);
  49  }
  50  elseif ($_GET["what"] == 'modules')
  51  {
  52    $title=$langs->trans("Modules");
  53    phpinfo(INFO_MODULES);
  54  }
  55  else
  56  {
  57    phpinfo();
  58  }
  59  
  60  $chaine = ob_get_contents(); 
  61  ob_end_clean(); 
  62  
  63  // Nettoie la sortie php pour inclusion dans une page deja existante
  64  $chaine = eregi_replace('background-color: #ffffff;','',$chaine);
  65  $chaine = eregi_replace('.*<style','<style',$chaine);
  66  $chaine = eregi_replace('<title>.*<body>','',$chaine);
  67  $chaine = eregi_replace('<title>.*<body>','',$chaine);
  68  $chaine = eregi_replace('a:link.*underline','',$chaine);
  69  $chaine = eregi_replace('table.*important; }','',$chaine);
  70  $chaine = eregi_replace('<hr />','',$chaine);
  71  $chaine = eregi_replace('</body></html>','',$chaine);
  72  $chaine = eregi_replace('body, td, th, h1, h2 {font-family: sans-serif;}','',$chaine);
  73  $chaine = eregi_replace('cellpadding="3" ','cellpadding="1" cellspacing="1"',$chaine);
  74  $chaine = eregi_replace('class="h"','class="liste_titre"',$chaine);
  75  $chaine = eregi_replace('th>','td>',$chaine);
  76  // Titres
  77  $chaine = eregi_replace('<h1>','<div class="titre">',$chaine);
  78  $chaine = eregi_replace('<h2>','<div class="titre">',$chaine);
  79  $chaine = eregi_replace('</h1>','</div><br>',$chaine);
  80  $chaine = eregi_replace('</h2>','</div>',$chaine);
  81  
  82  $chaine = eregi_replace('<td class="e">','<td class="impair">',$chaine);
  83  $chaine = eregi_replace('<td class="v">','<td class="pair">',$chaine);
  84   
  85  if (isset($title))
  86  {
  87      print_titre($title);
  88      print '<br>';
  89  }
  90  
  91  print "$chaine\n";    // Ne pas centrer la réponse php car certains tableau du bas très large rendent ceux du haut complètement à droite
  92  print "<br>\n";
  93  
  94  llxfooter('$Date: 2005/08/11 18:51:38 $ - $Revision: 1.13 $');
  95  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics