forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX use $conf->browser object + clean code
- Loading branch information
Showing
1 changed file
with
7 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2005-2023 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2007 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2007-2012 Regis Houssin <[email protected]> | ||
* Copyright (C) 2007-2024 Regis Houssin <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -24,13 +24,11 @@ | |
|
||
// Load Dolibarr environment | ||
require '../../main.inc.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; | ||
|
||
// Load translation files required by the page | ||
$langs->loadLangs(array("install", "other", "admin")); | ||
|
||
if (!$user->admin) { | ||
if (empty($user->admin)) { | ||
accessforbidden(); | ||
} | ||
|
||
|
@@ -39,23 +37,19 @@ | |
* View | ||
*/ | ||
|
||
$form = new Form($db); | ||
|
||
llxHeader(); | ||
|
||
print load_fiche_titre($langs->trans("InfoBrowser"), '', 'title_setup'); | ||
|
||
$tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); | ||
|
||
// Browser | ||
print '<div class="div-table-responsive-no-min">'; | ||
print '<table class="noborder centpercent">'; | ||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("UserAgent").'</td><td colspan="2">'.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("BrowserName").'</td><td colspan="2">'.$tmp['browsername'].'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("BrowserOS").'</td><td colspan="2">'.$tmp['browseros'].'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("Version").'</td><td colspan="2">'.$tmp['browserversion'].'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("Layout").' (phone/tablet/classic)</td><td colspan="2">'.$tmp['layout'].'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("UserAgent").'</td><td colspan="2">'.dol_escape_htmltag($conf->browser->ua).'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("BrowserName").'</td><td colspan="2">'.$conf->browser->name.'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("BrowserOS").'</td><td colspan="2">'.$conf->browser->os.'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("Version").'</td><td colspan="2">'.$conf->browser->version.'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("Layout").' (phone/tablet/classic)</td><td colspan="2">'.$conf->browser->layout.'</td></tr>'."\n"; | ||
print '<tr class="oddeven"><td width="300">'.$langs->trans("IPAddress").'</td><td colspan="2">'.dol_escape_htmltag($_SERVER['REMOTE_ADDR']); | ||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | ||
print ' (HTTP_CLIENT_IP='.dol_escape_htmltag($_SERVER['HTTP_CLIENT_IP']).')'; | ||
|