PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/admin/system/index.php

https://github.com/asterix14/dolibarr
PHP | 129 lines | 59 code | 27 blank | 43 comment | 7 complexity | f47626d2cbff2d7cfec0fed5dde3483a MD5 | raw file
Possible License(s): LGPL-2.0
  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@dolibarr.fr>
  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 2 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 <http://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * \file htdocs/admin/system/index.php
  21. * \brief Home page of system information
  22. */
  23. require("../../main.inc.php");
  24. require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
  25. $langs->load("admin");
  26. $langs->load("user");
  27. $langs->load("install");
  28. if (! $user->admin) accessforbidden();
  29. /*
  30. * Actions
  31. */
  32. // None
  33. /*
  34. * View
  35. */
  36. llxHeader();
  37. print_fiche_titre($langs->trans("SummarySystem"),'','setup');
  38. print '<table class="noborder" width="100%">';
  39. print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
  40. $dolversion=version_dolibarr();
  41. print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dolversion."</td></tr>\n";
  42. print '</table>';
  43. print "<br>\n";
  44. print '<table class="noborder" width="100%">';
  45. print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
  46. $osversion=version_os();
  47. print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$osversion."</td></tr>\n";
  48. print '</table>';
  49. print "<br>\n";
  50. // Serveur web
  51. print '<table class="noborder" width="100%">';
  52. print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
  53. $apacheversion=version_webserver();
  54. print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$apacheversion."</td></tr>\n";
  55. print '</table>';
  56. print "<br>\n";
  57. // Php
  58. print '<table class="noborder" width="100%">';
  59. print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
  60. $phpversion=version_php();
  61. print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
  62. print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
  63. print '</table>';
  64. print "<br>\n";
  65. // Database
  66. print '<table class="noborder" width="100%">';
  67. print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
  68. $dblabel=$db->getLabel();
  69. $dbversion=$db->getVersion();
  70. print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>" .$dblabel." ".$dbversion."</td></tr>\n";
  71. print '</table>';
  72. // Add checks on database options
  73. if ($db->type == 'pgsql')
  74. {
  75. // Check option standard_conforming_strings is on
  76. $paramarray=$db->getServerParametersValues('standard_conforming_strings');
  77. if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1)
  78. {
  79. $langs->load("errors");
  80. //print '<div class="error">'.$langs->trans("ErrorDatabaseParameterWrong",'standard_conforming_strings','on').'</div>';
  81. }
  82. // Check option backslash_quote is on
  83. /*$paramarray=$db->getServerParametersValues('backslash_quote');
  84. if ($paramarray['backslash_quote'] != 'on' && $paramarray['backslash_quote'] != 1)
  85. {
  86. $langs->load("errors");
  87. print '<div class="error">'.$langs->trans("ErrorDatabaseParameterWrong",'backslash_quote','on').'</div>';
  88. }*/
  89. }
  90. print '<br>';
  91. // Browser
  92. print '<table class="noborder" width="100%">';
  93. print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n";
  94. print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>" .$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n";
  95. 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";
  96. print '</table>';
  97. print '<br>';
  98. //print "<br>\n";
  99. print info_admin($langs->trans("SystemInfoDesc")).'<br>';
  100. llxFooter();
  101. $db->close();
  102. ?>