1<?php 2/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20/** 21 * \file htdocs/admin/system/index.php 22 * \brief Home page of system information 23 */ 24 25require '../../main.inc.php'; 26require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; 27 28// Load translation files required by the page 29$langs->loadLangs(array("admin", "user", "install")); 30 31if (!$user->admin) accessforbidden(); 32 33 34/* 35 * Actions 36 */ 37 38// None 39 40 41/* 42 * View 43 */ 44 45llxHeader(); 46 47print load_fiche_titre($langs->trans("SummarySystem"), '', 'title_setup'); 48 49 50print '<table class="noborder centpercent">'; 51print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n"; 52$dolversion = version_dolibarr(); 53print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dolversion."</td></tr>\n"; 54print '</table>'; 55 56print "<br>\n"; 57 58print '<table class="noborder centpercent">'; 59print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n"; 60$osversion = version_os(); 61print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$osversion."</td></tr>\n"; 62print '</table>'; 63 64print "<br>\n"; 65 66// Serveur web 67print '<table class="noborder centpercent">'; 68print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n"; 69$apacheversion = version_webserver(); 70print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$apacheversion."</td></tr>\n"; 71print '</table>'; 72 73print "<br>\n"; 74 75// Php 76print '<table class="noborder centpercent">'; 77print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("PHP")."</td></tr>\n"; 78$phpversion = version_php(); 79print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n"; 80print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n"; 81print '</table>'; 82 83print "<br>\n"; 84 85// Database 86print '<table class="noborder centpercent">'; 87print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n"; 88$dblabel = $db::LABEL; 89$dbversion = $db->getVersion(); 90print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dblabel." ".$dbversion."</td></tr>\n"; 91print '</table>'; 92// Add checks on database options 93if ($db->type == 'pgsql') 94{ 95 // Check option standard_conforming_strings is on 96 $paramarray = $db->getServerParametersValues('standard_conforming_strings'); 97 // if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1) 98 // { 99 // $langs->load("errors"); 100 // } 101} 102print '<br>'; 103 104// Browser 105print '<table class="noborder centpercent">'; 106print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n"; 107print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>".$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n"; 108print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(($conf->browser->layout != 'phone') ? $langs->trans("No") : $langs->trans("Yes"))."</td></tr>\n"; 109print '</table>'; 110print '<br>'; 111 112 113//print "<br>\n"; 114print info_admin($langs->trans("SystemInfoDesc")).'<br>'; 115 116// End of page 117llxFooter(); 118$db->close(); 119