New: Add info page about browser.

Qual: Removed dedicated code to change top menu according to
dol_optimize_smallscreen. We must use instead size of screen into css.
This commit is contained in:
Laurent Destailleur
2014-07-27 14:13:25 +02:00
parent 3d56c8ff6a
commit b964f9e9e3
14 changed files with 173 additions and 76 deletions

View File

@@ -5,6 +5,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.7 compared to 3.6.* ***** ***** ChangeLog for 3.7 compared to 3.6.* *****
For users: For users:
- New: Add info page about browser.
- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix - New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
on uploaded file names. on uploaded file names.
- New: No more dependency between contract and service module. - New: No more dependency between contract and service module.

View File

@@ -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();

View File

@@ -90,6 +90,20 @@ $var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">'; print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
print $conf->standard_menu; print $conf->standard_menu;
print '</td></tr>'."\n"; 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 '</table>';
print '<br>'; print '<br>';

View File

@@ -180,7 +180,7 @@ class FormAdmin
$newprefix=$tab[0]; $newprefix=$tab[0];
if ($newprefix=='1' && ($conf->global->MAIN_FEATURES_LEVEL < 1)) continue; if ($newprefix=='1' && ($conf->global->MAIN_FEATURES_LEVEL < 1)) continue;
if ($newprefix=='2' && ($conf->global->MAIN_FEATURES_LEVEL < 2)) 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 // Affiche titre
print '<option value="-1" disabled="disabled">'; print '<option value="-1" disabled="disabled">';

View File

@@ -491,7 +491,7 @@ class FormOther
{ {
if ($lines[$i]->fk_project != $lastprojectid) // Break found on project 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"'; print '<option value="'.$lines[$i]->fk_project.'_0"';
if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"'; if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"';
print '>'; // Project -> Task print '>'; // Project -> Task

View File

@@ -120,7 +120,7 @@ function getEntity($element=false, $shared=false)
/** /**
* Return information about user browser * 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() function getBrowserInfo()
{ {
@@ -138,6 +138,11 @@ function getBrowserInfo()
// MS products at end // MS products at end
elseif (preg_match('/iemobile/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; } 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'; } 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 // Name
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='firefox'; $version=$reg[2]; } 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 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

View File

@@ -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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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', 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"', __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" && 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', 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"', __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" && 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', 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', 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', 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', 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', 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', 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', 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', 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 -- 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 ('', '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__); 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__);

View File

@@ -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&amp;leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1); $newmenu->add('/admin/system/dolibarr.php?mainmenu=home&amp;leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1);
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&amp;leftmenu=admintools_info', $langs->trans('Modules'), 2); if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&amp;leftmenu=admintools_info', $langs->trans('Modules'), 2);
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&amp;leftmenu=admintools_info', $langs->trans('Triggers'), 2); if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&amp;leftmenu=admintools_info', $langs->trans('Triggers'), 2);
$newmenu->add('/admin/system/browser.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoBrowser'), 1);
$newmenu->add('/admin/system/os.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoOS'), 1); $newmenu->add('/admin/system/os.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoOS'), 1);
$newmenu->add('/admin/system/web.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoWebServer'), 1); $newmenu->add('/admin/system/web.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoWebServer'), 1);
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoPHP'), 1); $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&amp;leftmenu=admintools', $langs->trans('InfoPHP'), 1);

View File

@@ -928,11 +928,14 @@ EventsSetup=Setup for events logs
LogEvents=Security audit events LogEvents=Security audit events
Audit=Audit Audit=Audit
InfoDolibarr=Infos Dolibarr InfoDolibarr=Infos Dolibarr
InfoBrowser=Infos Browser
InfoOS=Infos OS InfoOS=Infos OS
InfoWebServer=Infos web server InfoWebServer=Infos web server
InfoDatabase=Infos database InfoDatabase=Infos database
InfoPHP=Infos PHP InfoPHP=Infos PHP
InfoPerf=Infos performances InfoPerf=Infos performances
BrowserName=Browser name
BrowserOS=Browser OS
ListEvents=Audit events ListEvents=Audit events
ListOfSecurityEvents=List of Dolibarr security events ListOfSecurityEvents=List of Dolibarr security events
SecurityEventsPurged=Security events purged SecurityEventsPurged=Security events purged

View File

@@ -212,7 +212,6 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
$conf->browser->phone=$tmp['phone']; $conf->browser->phone=$tmp['phone'];
$conf->browser->name=$tmp['browsername']; $conf->browser->name=$tmp['browsername'];
$conf->browser->os=$tmp['browseros']; $conf->browser->os=$tmp['browseros'];
$conf->browser->firefox=$tmp['browserfirefox'];
$conf->browser->version=$tmp['browserversion']; $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_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_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 (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_optimize_smallscreen=1;
$conf->dol_no_mouse_hover=1;
} }
// Disabled bugged themes // Disabled bugged themes
@@ -1037,14 +1037,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
} }
} }
} }
$themeparam='?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss')?'&amp;optioncss='.GETPOST('optioncss','alpha',1):'').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity; $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
$themeparam.=($ext?'&amp;'.$ext:''); $themeparam.=($ext?'&'.$ext:'');
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&amp;dol_resetcache='.$_SESSION['dol_resetcache']; if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&amp;dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); } if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); }
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&amp;dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); } if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); }
if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&amp;dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); } if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); }
if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&amp;dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); } if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); }
if (GETPOST('dol_use_jmobile')) { $themeparam.='&amp;dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','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 'themepath='.$themepath.' themeparam='.$themeparam;exit;
print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n"; 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='';
$ret.='<form action="'.$urlaction.'" method="post">'; $ret.='<form action="'.$urlaction.'" method="post">';
$ret.='<label for="'.$htmlinputname.'">'; $ret.='<label for="'.$htmlinputname.'">';
$ret.='<div class="menu_titre">'; $ret.='<div class="menu_titre menu_titre_search">';
$ret.='<a class="vsmenu" href="'.$urlobject.'">'; $ret.='<a class="vsmenu" href="'.$urlobject.'">';
$ret.=$title; $ret.=$title;
$ret.='</a><br>'; $ret.='</a>';
$ret.='</div>'; $ret.='</div>';
$ret.='</label>'; $ret.='</label>';
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; $ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

View File

@@ -356,7 +356,6 @@ div.tmenu {
height: <?php print $heightmenu; ?>px; height: <?php print $heightmenu; ?>px;
background: #7FAEC6; background: #7FAEC6;
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/table_bg.gif',1); ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/table_bg.gif',1); ?>);
/* background-position: center bottom; */
color: #000000; color: #000000;
text-decoration: none; text-decoration: none;
<?php } ?> <?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') // 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 <?php
} // End test if not phone } // End test if $dol_hide_topmenu
?> ?>
.tmenu{ .tmenu{
@@ -707,8 +708,8 @@ div.blockvmenusearch
{ {
padding-top: 1px; padding-top: 1px;
padding-bottom: 1px; padding-bottom: 1px;
height: 16px;
background: #DDDDDD !important; background: #DDDDDD !important;
min-height: 16px;
} }
div.blockvmenubookmarks div.blockvmenubookmarks

View File

@@ -364,16 +364,8 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->dol_optimize_smallscreen)) $minwidthtmenu=70;
{ $heightmenu=39;
$minwidthtmenu=70;
$heightmenu=39;
}
else
{
$minwidthtmenu=70;
$heightmenu=39;
}
?> ?>
/* This theme is bugged. If width not large enough, menu are not wrapped on next line /* 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') // 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; min-height: 14px;
} }
#blockvmenusearch form
{
clear: both;
}
div.blockvmenubookmarks div.blockvmenubookmarks
{ {
margin: 0px; margin: 0px;

View File

@@ -328,16 +328,8 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->dol_optimize_smallscreen)) $minwidthtmenu=70;
{ $heightmenu=47;
$minwidthtmenu=0;
$heightmenu=19;
}
else
{
$minwidthtmenu=70;
$heightmenu=47;
}
?> ?>
div#tmenu_tooltip { div#tmenu_tooltip {
@@ -479,7 +471,9 @@ div.mainmenu {
margin-left: 0px; 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 { div.mainmenu.agenda {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>);
@@ -610,7 +604,7 @@ foreach($mainmenuusedarray as $val)
?> ?>
<?php <?php
} // End test if not phone } // End test if $dol_hide_topmenu
?> ?>
.tmenuimage { .tmenuimage {
@@ -859,9 +853,13 @@ div.blockvmenusearch div.menu_titre {
{ {
padding-top: 1px; padding-top: 1px;
padding-bottom: 1px; padding-bottom: 1px;
height: 20px; min-height: 20px;
} }
#blockvmenusearch form
{
clear: both;
}
div.blockvmenubookmarks div.blockvmenubookmarks
{ {

View File

@@ -207,6 +207,8 @@ print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n"; print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n"; print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
print 'dol_use_jmobile='.$dol_use_jmobile."\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"; print '*/'."\n";
if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11; if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
@@ -490,18 +492,9 @@ margin : 0px auto;
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->dol_optimize_smallscreen)) $minwidthtmenu=66;
{ $heightmenu=52;
$minwidthtmenu=0; $heightmenu2=40;
$heightmenu=19;
$heightmenu2=19;
}
else
{
$minwidthtmenu=66;
$heightmenu=52;
$heightmenu2=40;
}
?> ?>
div#tmenu_tooltip { div#tmenu_tooltip {
@@ -579,7 +572,6 @@ ul.tmenu { /* t r b l */
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
list-style: none; list-style: none;
/* height: <?php print $heightmenu; ?>px; */
box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important; box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;
} }
ul.tmenu li { ul.tmenu li {
@@ -623,11 +615,13 @@ li.tmenusel, li.tmenu:hover {
.tmenuend .tmenuleft { width: 0px; } .tmenuend .tmenuleft { width: 0px; }
div.tmenuleft div.tmenuleft
{ {
width: 5px;
float: <?php print $left; ?>; float: <?php print $left; ?>;
margin-top: 0px;
<?php if (empty($conf->dol_optimize_smallscreen)) { ?>
width: 5px;
height: <?php print $heightmenu+4; ?>px; height: <?php print $heightmenu+4; ?>px;
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat; background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat;
margin-top: 0px; <?php } ?>
} }
div.tmenucenter div.tmenucenter
{ {
@@ -640,7 +634,6 @@ div.tmenucenter
.mainmenuaspan .mainmenuaspan
{ {
padding-right: 4px; padding-right: 4px;
/*text-shadow: 1px 1px 1px #DDD;*/
} }
div.mainmenu { div.mainmenu {
@@ -652,7 +645,8 @@ div.mainmenu {
min-width: 40px; 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{ div.mainmenu.home{
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>);
@@ -798,7 +792,7 @@ foreach($mainmenuusedarray as $val)
?> ?>
<?php <?php
} // End test if not phone } // End test if $dol_hide_topmenu
?> ?>
.tmenuimage { .tmenuimage {