dolibarr/htdocs/admin/system/index.php

123 lines
4.4 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-2010 Laurent Destailleur <eldy@users.sourceforge.net>
2010-02-12 11:16:18 +01:00
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
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
/**
* \file htdocs/admin/system/index.php
2010-02-12 11:16:18 +01:00
* \brief Page accueil infos systeme
* \version $Id$
*/
require("../../main.inc.php");
2009-03-09 22:59:29 +01:00
include_once(DOL_DOCUMENT_ROOT."/lib/databases/".$conf->db->type.".lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.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";
2009-03-09 22:59:29 +01:00
$dolversion=version_dolibarr();
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dolversion."</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";
2009-08-20 03:40:32 +02:00
$osversion=version_os();
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$osversion."</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";
2009-03-09 22:59:29 +01:00
$apacheversion=version_webserver();
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$apacheversion."</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";
$phpversion=version_php();
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
// Database
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
2009-10-26 02:33:00 +01:00
$dblabel=$db->getLabel();
$dbversion=$db->getVersion();
2009-10-26 02:29:00 +01:00
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>" .$dblabel." ".$dbversion."</td></tr>\n";
2003-08-27 13:44:00 +02:00
print '</table>';
// Add checks on database options
if ($db->type == 'pgsql')
{
// Check option standard_conforming_strings is on
$paramarray=$db->getServerParametersValues('standard_conforming_strings');
if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1)
{
$langs->load("errors");
print '<div class="error">'.$langs->trans("ErrorDatabaseParameterWrong",'standard_conforming_strings','on').'</div>';
}
2010-05-09 16:08:42 +02:00
// Check option standard_conforming_strings is on
/*$paramarray=$db->getServerParametersValues('backslash_quote');
if ($paramarray['backslash_quote'] != 'on' && $paramarray['backslash_quote'] != 1)
{
$langs->load("errors");
print '<div class="error">'.$langs->trans("ErrorDatabaseParameterWrong",'backslash_quote','on').'</div>';
}*/
}
print '<br>';
// Browser
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n";
print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>" .$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n";
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(empty($conf->browser->phone)?$langs->trans("No"):$conf->browser->phone)."</td></tr>\n";
print '</table>';
print '<br>';
2005-06-11 13:11:17 +02:00
llxFooter('$Date$ - $Revision$');
2003-08-27 13:44:00 +02:00
?>