[ 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/ -> index.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: index.php,v 1.17 2005/07/08 19:56:55 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/system/index.php,v $
  21   */
  22  
  23  /**
  24          \file       htdocs/admin/system/index.php
  25          \brief      Page accueil infos système
  26          \version    $Revision: 1.17 $
  27  */
  28  
  29  require ("./pre.inc.php");
  30  include_once $dolibarr_main_document_root."/lib/".$conf->db->type.".lib.php";
  31  
  32  $langs->load("admin");
  33  $langs->load("user");
  34  
  35  
  36  if (!$user->admin)
  37    accessforbidden();
  38  
  39  llxHeader();
  40  
  41  print_titre($langs->trans("SummarySystem"));
  42  
  43  print "<br>\n";
  44  
  45  print '<table class="noborder" width="100%">';
  46  print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
  47  print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>" . DOL_VERSION . "</td></tr>\n";
  48  print '</table>';
  49  
  50  print "<br>\n";
  51  
  52  print '<table class="noborder" width="100%">';
  53  print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
  54  // Récupère la version de l'OS
  55  ob_start(); 
  56  phpinfo();
  57  $chaine = ob_get_contents(); 
  58  ob_end_clean(); 
  59  eregi('System </td><td class="v">([^\/]*)</td>',$chaine,$reg);
  60  print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>".$reg[1]."</td></tr>\n";
  61  print '</table>';
  62  
  63  print "<br>\n";
  64  
  65  // Serveur web
  66  print '<table class="noborder" width="100%">';
  67  print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
  68  print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
  69  print "<tr $bc[1]><td>".$langs->trans("DocumentRootServer")."</td><td>" . DOL_DOCUMENT_ROOT . "</td></tr>\n";
  70  print "<tr $bc[0]><td>".$langs->trans("DataRootServer")."</td><td>" . DOL_DATA_ROOT . "</td></tr>\n";
  71  print '</table>';
  72  
  73  print "<br>\n";
  74  
  75  // Php
  76  print '<table class="noborder" width="100%">';
  77  print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
  78  print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>".phpversion()."</td></tr>\n";
  79  print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
  80  print '</table>';
  81  
  82  print "<br>\n";
  83  
  84  // Base de donnée
  85  print '<table class="noborder" width="100%">';
  86  print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
  87  
  88  if ($conf->db->type == 'mysql')
  89  {
  90  $sql = "SHOW VARIABLES LIKE 'version'";
  91  }
  92  
  93  $result = $db->query($sql);
  94  if ($result)  
  95  {
  96    $row = $db->fetch_row();
  97  }
  98  
  99  print "<tr $bc[0]><td>".$langs->trans("Version")."</td><td>" . $row[1] . "</td></tr>\n";
 100  print "<tr $bc[1]><td width=\"240\">".$langs->trans("Type")."</td><td>" . $conf->db->type . "</td></tr>\n";
 101  print "<tr $bc[0]><td>".$langs->trans("Host")."</td><td>" . $conf->db->host . "</td></tr>\n";
 102  print "<tr $bc[1]><td>".$langs->trans("User")."</td><td>" . $conf->db->user . "&nbsp;</td></tr>\n";
 103  print "<tr $bc[0]><td>".$langs->trans("Password")."</td><td>" . ereg_replace(".","*",$conf->db->pass) . "&nbsp;</td></tr>\n";
 104  print "<tr $bc[1]><td>".$langs->trans("DatabaseName")."</td><td>" . $conf->db->name . "</td></tr>\n";
 105  
 106  print '</table>';
 107  
 108  llxFooter('$Date: 2005/07/08 19:56:55 $ - $Revision: 1.17 $');
 109  ?>


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