dolibarr/htdocs/admin/system/index.php

116 lines
4.1 KiB
PHP
Raw Normal View History

<?php
2004-07-27 18:30:19 +02:00
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
2003-08-27 13:44:00 +02:00
*
* 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.
*
* $Id$
* $Source$
*/
/*! \file htdocs/admin/system/index.php
\brief Page accueil infos syst<EFBFBD>me
\version $Revision$
*/
// \todo eldy Choix du menu <20> garder fixe <20> finir.
// Ceci va servir pour garder le menu fixe quelquesoit les liens cliqu<71>s
// dans ce menu. Cela permet d'appeler des pages en dehors sans perdre
// le menu qui nous int<6E>resse.
//session_start();
//$fix_top_menu="accueil";
//$fix_left_menu="system";
//session_register("fix_top_menu");
//session_register("fix_left_menu");
require("./pre.inc.php");
2004-09-14 22:04:31 +02:00
include_once $dolibarr_main_document_root."/lib/".$conf->db->type.".lib.php";
$langs->load("admin");
$langs->load("user");
2003-08-27 13:44:00 +02:00
if (!$user->admin)
accessforbidden();
2003-08-27 13:44:00 +02:00
llxHeader();
print_titre($langs->trans("SummarySystem"));
print "<br>\n";
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Version")."</td><td>" . DOL_VERSION . "</td></tr>\n";
print '</table>';
print "<br>\n";
2003-08-27 13:44:00 +02:00
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
// R<>cup<75>re la version de l'OS
2004-07-27 18:30:19 +02:00
ob_start();
phpinfo();
2004-07-27 18:30:19 +02:00
$chaine = ob_get_contents();
ob_end_clean();
eregi('System </td><td class="v">([^\/]*)</td>',$chaine,$reg);
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Version")."</td><td>".$reg[1]."</td></tr>\n";
print '</table>';
print "<br>\n";
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("DocumentRootServer")."</td><td>" . DOL_DOCUMENT_ROOT . "</td></tr>\n";
2004-11-22 10:36:11 +01:00
print "<tr $bc[1]><td>".$langs->trans("DataRootServer")."</td><td>" . DOL_DATA_ROOT . "</td></tr>\n";
print '</table>';
2003-08-27 13:44:00 +02:00
print "<br>\n";
2003-08-27 13:44:00 +02:00
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Version")."</td><td>".phpversion()."</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
print '</table>';
2003-08-27 13:44:00 +02:00
print "<br>\n";
2003-08-27 13:44:00 +02:00
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
2004-09-14 22:04:31 +02:00
if ($conf->db->type == 'mysql')
2004-09-06 21:45:23 +02:00
{
$sql = "SHOW VARIABLES LIKE 'version'";
2004-09-06 21:45:23 +02:00
}
$result = $db->query($sql);
if ($result)
{
$row = $db->fetch_row();
}
2004-09-06 21:45:23 +02:00
print "<tr $bc[0]><td>".$langs->trans("Version")."</td><td>" . $row[1] . "</td></tr>\n";
print "<tr $bc[1]><td width=\"240\">".$langs->trans("Type")."</td><td>" . $conf->db->type . "</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("Host")."</td><td>" . $conf->db->host . "</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("User")."</td><td>" . $conf->db->user . "&nbsp;</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("Password")."</td><td>" . $conf->db->pass . "&nbsp;</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("DatabaseName")."</td><td>" . $conf->db->name . "</td></tr>\n";
2003-08-27 13:44:00 +02:00
print '</table>';
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>