dolibarr/htdocs/admin/system/index.php

202 lines
6.6 KiB
PHP
Raw Normal View History

<?php
2007-01-05 15:39:50 +01:00
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 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.
*/
2005-06-11 13:11:17 +02:00
/**
2007-01-05 15:39:50 +01:00
\file htdocs/admin/system/index.php
\brief Page accueil infos syst<EFBFBD>me
2008-06-05 19:40:36 +02:00
\version $Id$
*/
require("./pre.inc.php");
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
$langs->load("admin");
$langs->load("user");
$langs->load("install");
if (!$user->admin)
accessforbidden();
2008-06-05 19:40:36 +02:00
/*
* View
*/
2003-08-27 13:44:00 +02:00
llxHeader();
print_fiche_titre($langs->trans("SummarySystem"),'','setup');
//print "<br>\n";
print info_admin($langs->trans("SystemInfoDesc")).'<br>';
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
2007-12-19 11:28:37 +01:00
print "<tr $bc[0]><td width=\"280\">".$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);
2007-12-19 11:28:37 +01:00
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$reg[1]."</td></tr>\n";
print '</table>';
print "<br>\n";
2005-07-02 15:19:18 +02:00
// Serveur web
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
2007-12-19 11:28:37 +01:00
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
print '</table>';
2003-08-27 13:44:00 +02:00
print "<br>\n";
2003-08-27 13:44:00 +02:00
2005-07-02 15:19:18 +02:00
// Php
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
2007-12-19 11:28:37 +01:00
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".phpversion()."</td></tr>\n";
2005-06-11 13:11:17 +02:00
print "<tr $bc[1]><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
2005-07-02 15:19:18 +02:00
// Base de donn<6E>e
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>" . $db->getVersion() . "</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("DatabaseServer")."</td><td>" . $conf->db->host . "</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("DatabaseName")."</td><td>" . $conf->db->name . "</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("DriverType")."</td><td>" . $conf->db->type . "</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("User")."</td><td>" . $conf->db->user . "</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("Password")."</td><td>" . $langs->trans("NotAvailable") . "</td></tr>\n";
print "<tr $bc[0]><td>".$langs->trans("DBStoringCharset")."</td><td>" . $db->getDefaultCharacterSetDatabase() . "</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("DBSortingCharset")."</td><td>" . $db->getDefaultCollationDatabase() . "</td></tr>\n";
2003-08-27 13:44:00 +02:00
print '</table>';
print '<br>';
// conf.php file
$configfileparameters=array(
// 'separator',
'dolibarr_main_url_root',
'dolibarr_main_document_root',
'dolibarr_main_data_root',
'separator',
'dolibarr_main_db_host',
'dolibarr_main_db_port',
'dolibarr_main_db_name',
'dolibarr_main_db_type',
'dolibarr_main_db_user',
'dolibarr_main_db_pass',
2007-12-19 11:28:37 +01:00
'dolibarr_main_db_character_set',
'dolibarr_main_db_collation',
'separator',
'character_set_client',
'separator',
'dolibarr_main_authentication',
'separator',
'dolibarr_main_auth_ldap_login_attribute',
'dolibarr_main_auth_ldap_host',
'dolibarr_main_auth_ldap_port',
'dolibarr_main_auth_ldap_version',
'dolibarr_main_auth_ldap_dn',
'dolibarr_main_auth_ldap_admin_login',
'dolibarr_main_auth_ldap_admin_pass',
'dolibarr_main_auth_ldap_debug',
'separator',
'dolibarr_smarty_libs_dir',
'dolibarr_smarty_compile',
'dolibarr_smarty_cache'
);
$configfilelib=array(
// 'separator',
$langs->trans("URLRoot"),
$langs->trans("DocumentRootServer"),
$langs->trans("DataRootServer"),
'separator',
$langs->trans("DatabaseServer"),
$langs->trans("DatabasePort"),
$langs->trans("DatabaseName"),
$langs->trans("DriverType"),
$langs->trans("User"),
$langs->trans("Password"),
2007-12-19 11:28:37 +01:00
$langs->trans("DBStoringCharset"),
$langs->trans("DBSortingCharset"),
'separator',
2007-12-19 11:28:37 +01:00
$langs->trans("HTMLCharset"),
'separator',
$langs->trans("AuthenticationMode"),
'separator',
'dolibarr_main_auth_ldap_login_attribute',
'dolibarr_main_auth_ldap_host',
'dolibarr_main_auth_ldap_port',
'dolibarr_main_auth_ldap_version',
'dolibarr_main_auth_ldap_dn',
'dolibarr_main_auth_ldap_admin_login',
'dolibarr_main_auth_ldap_admin_pass',
'dolibarr_main_auth_ldap_debug',
'separator',
$langs->trans("SmartyLibs"),
$langs->trans("SmartyCompile"),
$langs->trans("SmartyCache")
);
$var=true;
print '<table class="noborder" width="100%">';
2007-12-19 11:28:37 +01:00
print '<tr class="liste_titre"><td width="280">'.$langs->trans("ConfigurationFile").'</td>';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print '</tr>'."\n";
$i=0;
foreach($configfileparameters as $key)
{
$var=!$var;
print "<tr ".$bc[$var].">";
if ($key == 'separator')
{
print '<td colspan="3">&nbsp;</td>';
}
else
{
print "<td>".$configfilelib[$i].'</td><td>'.$key.'</td>';
print "<td>";
if ($key == 'dolibarr_main_db_pass') print eregi_replace('.','*',${$key});
else print ${$key};
2007-12-19 11:28:37 +01:00
// TODO Afficher charset effectif de base $db
if ($key == 'dolibarr_main_db_charset')
{
}
print "</td>";
}
print "</tr>\n";
$i++;
}
print '</table>';
print '<br>';
2003-08-27 13:44:00 +02:00
2005-06-11 13:11:17 +02:00
llxFooter('$Date$ - $Revision$');
2003-08-27 13:44:00 +02:00
?>