diff --git a/ChangeLog b/ChangeLog index a404a20169bd0d9848bcef14a91e3eac506ba3f7..ce5f819bb6b6e43675d86e2988c8762fa4f6df5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.7 compared to 3.6.* ***** For users: +- New: Add info page about browser. - New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix on uploaded file names. - New: No more dependency between contract and service module. diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php new file mode 100644 index 0000000000000000000000000000000000000000..2a97cf8e8ebb73415d210c0fe41e01e9b596e5c3 --- /dev/null +++ b/htdocs/admin/system/browser.php @@ -0,0 +1,80 @@ +<?php +/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com> + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +/** + * \file htdocs/admin/system/browser.php + * \brief Page to show Dolibarr informations + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + +$langs->load("admin"); +$langs->load("install"); +$langs->load("other"); + +if (! $user->admin) + accessforbidden(); + + +/* + * View + */ + +$form=new Form($db); + +llxHeader(); + +print_fiche_titre($langs->trans("InfoBrowser"),'','setup'); + +$tmp=getBrowserInfo(); + +// Browser +$var=true; +print '<table class="noborder" width="100%">'; +print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("UserAgent").'</td><td colspan="2">'.$_SERVER['HTTP_USER_AGENT'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("BrowserName").'</td><td colspan="2">'.$tmp['browsername'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("BrowserOS").'</td><td colspan="2">'.$tmp['browseros'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Version").'</td><td colspan="2">'.$tmp['browserversion'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Smartphone").' ?</td><td colspan="2">'.$tmp['phone'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("IPAddress").'</td><td colspan="2">'.$_SERVER['REMOTE_ADDR'].'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("SessionName").'</td><td colspan="2">'.session_name().'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("SessionId").'</td><td colspan="2">'.session_id().'</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td colspan="2">'; +print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; +print '</td></tr>'."\n"; +print '</table>'; +print '<br>'; + + + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index fe9bde59cec3df8863ec222cd3e40a8afd906825..79d5e7cf0aa7476e70e65f412d761d3ee7b900d6 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -90,6 +90,20 @@ $var=!$var; print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">'; print $conf->standard_menu; print '</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td colspan="2">'; +print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; +print '</td></tr>'."\n"; +$var=!$var; +print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Session").'</td><td colspan="2">'; +$i=0; +foreach($_SESSION as $key => $val) +{ + if ($i > 0) print ', '; + print $key.' => '.$val; + $i++; +} +print '</td></tr>'."\n"; print '</table>'; print '<br>'; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index f7a6154706f4cebd1d047d7b703217b5bb9a7a34..042474781d751e6e03e0ccb5296a99c8203d4394 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -180,7 +180,7 @@ class FormAdmin $newprefix=$tab[0]; if ($newprefix=='1' && ($conf->global->MAIN_FEATURES_LEVEL < 1)) continue; if ($newprefix=='2' && ($conf->global->MAIN_FEATURES_LEVEL < 2)) continue; - if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators + if ($newprefix != $oldprefix) // Add separators { // Affiche titre print '<option value="-1" disabled="disabled">'; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index ab924d482a742b76553b6270f95580e0310adfdb..5b2fc1643f585874cc01d7f1391980274b3123ad 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -491,7 +491,7 @@ class FormOther { if ($lines[$i]->fk_project != $lastprojectid) // Break found on project { - if ($i > 0 && $conf->browser->firefox) print '<option value="0" disabled="disabled">----------</option>'; + if ($i > 0) print '<option value="0" disabled="disabled">----------</option>'; print '<option value="'.$lines[$i]->fk_project.'_0"'; if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"'; print '>'; // Project -> Task diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8fbb5fd34ec02b78375053762307d26f98ebe1a5..286ab5f63d10f119cb6b86fdd7ab4b6c9c6b54f1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -120,7 +120,7 @@ function getEntity($element=false, $shared=false) /** * Return information about user browser * - * @return array Array of information ('browsername'=>,'browseros'=>,'phone'=>,'browserfirefox'=>) + * @return array Array of information ('browsername'=>,'browseros'=>,'phone'=>,'browserversion'=>) */ function getBrowserInfo() { @@ -138,6 +138,11 @@ function getBrowserInfo() // MS products at end elseif (preg_match('/iemobile/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; } elseif (preg_match('/windows ce/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; } + + // OS + if (preg_match('/android/i',$_SERVER["HTTP_USER_AGENT"])) { $os='android'; } + elseif (preg_match('/linux/i',$_SERVER["HTTP_USER_AGENT"])) { $os='linux'; } + // Name if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='firefox'; $version=$reg[2]; } elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index b5e85d7830dfaaee308e729ec3d868dcd6ad2ae5..48584247bbc6e64c1e8c4878ec1465fccc6dbaa7 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -41,19 +41,20 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 201__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/dolibarr.php?leftmenu=admintools', 'InfoDolibarr', 1, 'admin', '', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 208__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/system/modules.php?leftmenu=admintools', 'Modules', 2, 'admin', '', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 207__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/triggers.php?leftmenu=admintools', 'Triggers', 2, 'admin', '', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 7, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 304__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 9, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 10, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 303__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 11, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 12, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 13, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/browser.php?leftmenu=admintools', 'InfoBrowser', 1, 'admin', '', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 8, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 304__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 9, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 10, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 11, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 303__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__); -- Home - Menu users and groups insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 8d43c525e9a303daac7c9a207ee2a6be5696868c..8ea68ea414682156c0f8f205c0e11cb5f9d405da 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -524,6 +524,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1); if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2); if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2); + $newmenu->add('/admin/system/browser.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoBrowser'), 1); $newmenu->add('/admin/system/os.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoOS'), 1); $newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1); $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 00d2521c309ba5b72176f7a2459918625b5ce23c..4eab3b64008ad108a8250a9ae8e8d59becc9f5f2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -928,11 +928,14 @@ EventsSetup=Setup for events logs LogEvents=Security audit events Audit=Audit InfoDolibarr=Infos Dolibarr +InfoBrowser=Infos Browser InfoOS=Infos OS InfoWebServer=Infos web server InfoDatabase=Infos database InfoPHP=Infos PHP InfoPerf=Infos performances +BrowserName=Browser name +BrowserOS=Browser OS ListEvents=Audit events ListOfSecurityEvents=List of Dolibarr security events SecurityEventsPurged=Security events purged diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f35d493a485d4d1ac76cfc032803abd10b2ce920..d2dc0d4ce009ded8aeb8fc5effc54427c1008704 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -212,7 +212,6 @@ if (isset($_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone=$tmp['phone']; $conf->browser->name=$tmp['browsername']; $conf->browser->os=$tmp['browseros']; - $conf->browser->firefox=$tmp['browserfirefox']; $conf->browser->version=$tmp['browserversion']; } @@ -717,10 +716,11 @@ if (GETPOST('dol_hide_topmenu') || ! empty($_SESSION['dol_hide_topmenu'])) if (GETPOST('dol_optimize_smallscreen') || ! empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen=1; if (GETPOST('dol_no_mouse_hover') || ! empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover=1; if (GETPOST('dol_use_jmobile') || ! empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile=1; -if (! empty($conf->browser->phone)) +if (! empty($conf->browser->phone)) $conf->dol_no_mouse_hover=1; +if ((! empty($_SESSION['dol_screenwidth']) && $_SESSION['dol_screenwidth'] < 400) + || (! empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400)) { $conf->dol_optimize_smallscreen=1; - $conf->dol_no_mouse_hover=1; } // Disabled bugged themes @@ -1037,14 +1037,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } } } - $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity; - $themeparam.=($ext?'&'.$ext:''); - if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; - if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); } - if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); } - if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); } - if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); } - if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); } + $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity; + $themeparam.=($ext?'&'.$ext:''); + if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; + if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); } + if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); } + if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); } + if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); } + if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); } //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n"; @@ -1802,10 +1802,10 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput $ret=''; $ret.='<form action="'.$urlaction.'" method="post">'; $ret.='<label for="'.$htmlinputname.'">'; - $ret.='<div class="menu_titre">'; + $ret.='<div class="menu_titre menu_titre_search">'; $ret.='<a class="vsmenu" href="'.$urlobject.'">'; $ret.=$title; - $ret.='</a><br>'; + $ret.='</a>'; $ret.='</div>'; $ret.='</label>'; $ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 47e982404d2f60b04f1e5851aca12f4331b3137c..36c2fd81689dcbe3791fc220e9026fd02356fe1d 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -356,7 +356,6 @@ div.tmenu { height: <?php print $heightmenu; ?>px; background: #7FAEC6; background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/table_bg.gif',1); ?>); -/* background-position: center bottom; */ color: #000000; text-decoration: none; <?php } ?> @@ -375,7 +374,9 @@ div.mainmenu { } */ -<?php if (empty($conf->dol_optimize_smallscreen)) { + +/* Do not load menu img if hidden to save bandwidth */ +<?php if (empty($dol_hide_topmenu)) { // Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div') @@ -434,7 +435,7 @@ foreach($mainmenuusedarray as $val) ?> <?php -} // End test if not phone +} // End test if $dol_hide_topmenu ?> .tmenu{ @@ -707,8 +708,8 @@ div.blockvmenusearch { padding-top: 1px; padding-bottom: 1px; - height: 16px; background: #DDDDDD !important; + min-height: 16px; } div.blockvmenubookmarks diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index ab50dae7ae9e70243d1943c30efd14d63932475e..66cb23f24510ebdc2c72855b55aebb9dd1b1f3dd 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -364,16 +364,8 @@ div.ficheaddleft { /* ============================================================================== */ <?php -if (! empty($conf->dol_optimize_smallscreen)) -{ - $minwidthtmenu=70; - $heightmenu=39; -} -else -{ - $minwidthtmenu=70; - $heightmenu=39; -} +$minwidthtmenu=70; +$heightmenu=39; ?> /* This theme is bugged. If width not large enough, menu are not wrapped on next line @@ -414,7 +406,9 @@ div.mainmenu { } */ -<?php if (empty($conf->dol_optimize_smallscreen)) { + +/* Do not load menu img if hidden to save bandwidth */ +<?php if (empty($dol_hide_topmenu)) { ?> // Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div') @@ -787,6 +781,11 @@ div.blockvmenusearch div.menu_titre { min-height: 14px; } +#blockvmenusearch form +{ + clear: both; +} + div.blockvmenubookmarks { margin: 0px; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 285fcad6880e4a10ed7ddc8b0a0cba3acaf80950..9031ea728955869b94bc4aa0ecc5595443656ca1 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -328,16 +328,8 @@ div.ficheaddleft { /* ============================================================================== */ <?php -if (! empty($conf->dol_optimize_smallscreen)) -{ - $minwidthtmenu=0; - $heightmenu=19; -} -else -{ - $minwidthtmenu=70; - $heightmenu=47; -} +$minwidthtmenu=70; +$heightmenu=47; ?> div#tmenu_tooltip { @@ -479,7 +471,9 @@ div.mainmenu { margin-left: 0px; } -<?php if (empty($conf->dol_optimize_smallscreen)) { ?> + +/* Do not load menu img if hidden to save bandwidth */ +<?php if (empty($dol_hide_topmenu)) { ?> div.mainmenu.agenda { background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>); @@ -610,7 +604,7 @@ foreach($mainmenuusedarray as $val) ?> <?php -} // End test if not phone +} // End test if $dol_hide_topmenu ?> .tmenuimage { @@ -859,9 +853,13 @@ div.blockvmenusearch div.menu_titre { { padding-top: 1px; padding-bottom: 1px; - height: 20px; + min-height: 20px; } +#blockvmenusearch form +{ + clear: both; +} div.blockvmenubookmarks { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 78457f899d2b4c99aaee3bddcb950f4ac55ff059..ccb72fa2f25a24027dbb79a3d965ff798367b987 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -207,6 +207,8 @@ print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n"; print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n"; print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n"; print 'dol_use_jmobile='.$dol_use_jmobile."\n"; +print 'dol_screenwidth='.$_SESSION['dol_screenwidth']."\n"; +print 'dol_screenheight='.$_SESSION['dol_screenheight']."\n"; print '*/'."\n"; if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11; @@ -490,18 +492,9 @@ margin : 0px auto; /* ============================================================================== */ <?php -if (! empty($conf->dol_optimize_smallscreen)) -{ - $minwidthtmenu=0; - $heightmenu=19; - $heightmenu2=19; -} -else -{ - $minwidthtmenu=66; - $heightmenu=52; - $heightmenu2=40; -} +$minwidthtmenu=66; +$heightmenu=52; +$heightmenu2=40; ?> div#tmenu_tooltip { @@ -579,7 +572,6 @@ ul.tmenu { /* t r b l */ padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; list-style: none; - /* height: <?php print $heightmenu; ?>px; */ box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important; } ul.tmenu li { @@ -623,11 +615,13 @@ li.tmenusel, li.tmenu:hover { .tmenuend .tmenuleft { width: 0px; } div.tmenuleft { - width: 5px; float: <?php print $left; ?>; - height: <?php print $heightmenu+4; ?>px; - background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat; margin-top: 0px; + <?php if (empty($conf->dol_optimize_smallscreen)) { ?> + width: 5px; + height: <?php print $heightmenu+4; ?>px; + background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat; + <?php } ?> } div.tmenucenter { @@ -640,7 +634,6 @@ div.tmenucenter .mainmenuaspan { padding-right: 4px; - /*text-shadow: 1px 1px 1px #DDD;*/ } div.mainmenu { @@ -652,7 +645,8 @@ div.mainmenu { min-width: 40px; } -<?php if (empty($conf->dol_optimize_smallscreen)) { ?> +/* Do not load menu img if hidden to save bandwidth */ +<?php if (empty($dol_hide_topmenu)) { ?> div.mainmenu.home{ background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>); @@ -798,7 +792,7 @@ foreach($mainmenuusedarray as $val) ?> <?php -} // End test if not phone +} // End test if $dol_hide_topmenu ?> .tmenuimage {