dolibarr 20.0.2
style.css.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
4 * Copyright (C) 2007-2017 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
6 * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
7 * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
8 * Copyright (C) 2021-2023 Anthony Berton <anthony.berton@bb2a.fr>
9 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
30//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
31//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
32if (!defined('NOREQUIRESOC')) {
33 define('NOREQUIRESOC', '1');
34}
35//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
36if (!defined('NOCSRFCHECK')) {
37 define('NOCSRFCHECK', 1);
38}
39if (!defined('NOTOKENRENEWAL')) {
40 define('NOTOKENRENEWAL', 1);
41}
42if (!defined('NOLOGIN')) {
43 define('NOLOGIN', 1); // File must be accessed by logon page so without login.
44}
45//if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We load menu manager class (note that object loaded may have wrong content because NOLOGIN is set and some values depends on login)
46if (!defined('NOREQUIREHTML')) {
47 define('NOREQUIREHTML', 1);
48}
49if (!defined('NOREQUIREAJAX')) {
50 define('NOREQUIREAJAX', '1');
51}
52
53
54define('ISLOADEDBYSTEELSHEET', '1');
55
56
57require __DIR__.'/theme_vars.inc.php';
58if (defined('THEME_ONLY_CONSTANT')) {
59 return;
60}
61
62
63session_cache_limiter('public');
64
65require_once __DIR__.'/../../main.inc.php'; // __DIR__ allow this script to be included in custom themes
66require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
67
68// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
69// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile.
70if (empty($user->id) && !empty($_SESSION['dol_login'])) {
71 $user->fetch('', $_SESSION['dol_login'], '', 1);
72 $user->getrights();
73
74 // Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
75 $menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
76 $menumanager->loadMenu();
77}
78
79
80// Define css type
81top_httphead('text/css');
82// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
83if (empty($dolibarr_nocache)) {
84 header('Cache-Control: max-age=10800, public, must-revalidate');
85} else {
86 header('Cache-Control: no-cache');
87}
88
89if (GETPOST('theme', 'aZ09')) {
90 $conf->theme = GETPOST('theme', 'aZ09'); // If theme was forced on URL
91}
92if (GETPOST('lang', 'aZ09')) {
93 $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
94}
95if (GETPOSTISSET('THEME_DARKMODEENABLED')) {
96 $conf->global->THEME_DARKMODEENABLED = GETPOSTINT('THEME_DARKMODEENABLED'); // If darkmode was forced on URL
97}
98
99$langs->load("main", 0, 1);
100$right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right');
101$left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
102
103$path = ''; // This value may be used in future for external module to overwrite theme
104$theme = 'eldy'; // Value of theme
105if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) {
106 $path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
107 $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
108}
109
110// Define image path files and other constants
111
112//$fontlist='helvetica, verdana, arial, sans-serif';
113//$fontlist='"open sans", "Helvetica Neue", Helvetica, Arial, sans-serif';
114
115$fontlist = 'arial,tahoma,verdana,helvetica';
116if (getDolGlobalString('THEME_FONT_FAMILY')) {
117 $fontlist = getDolGlobalString('THEME_FONT_FAMILY').', '.$fontlist;
118}
119
120$img_head = '';
121$img_button = dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png', 1);
122$dol_hide_topmenu = $conf->dol_hide_topmenu;
123$dol_hide_leftmenu = $conf->dol_hide_leftmenu;
124$dol_optimize_smallscreen = $conf->dol_optimize_smallscreen;
125$dol_no_mouse_hover = $conf->dol_no_mouse_hover;
126
127//$conf->global->THEME_ELDY_ENABLE_PERSONALIZED=0;
128//$user->conf->THEME_ELDY_ENABLE_PERSONALIZED=0;
129//var_dump($user->conf->THEME_ELDY_RGB);
130
131$useboldtitle = getDolGlobalInt('THEME_ELDY_USEBOLDTITLE');
132$userborderontable = getDolGlobalInt('THEME_ELDY_USEBORDERONTABLE');
133$borderwidth = 1;
134
135// Case of option always editable
136if (!isset($conf->global->THEME_ELDY_BACKBODY)) {
137 $conf->global->THEME_ELDY_BACKBODY = $colorbackbody;
138}
139if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
140 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
141}
142if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) {
143 $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1;
144}
145if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) {
146 $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1;
147}
148if (!isset($conf->global->THEME_ELDY_USE_HOVER)) {
149 $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover;
150}
151if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) {
152 $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked;
153}
154if (!isset($conf->global->THEME_ELDY_LINEBREAK)) {
155 $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak;
156}
157if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
158 $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab;
159}
160if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
161 $conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
162}
163if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
164 $conf->global->THEME_ELDY_BTNACTION = $butactionbg;
165}
166if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
167 $conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
168}
169// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
170if (!getDolGlobalString('THEME_ELDY_ENABLE_PERSONALIZED')) {
171 $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card
172 $conf->global->THEME_ELDY_BACKTABACTIVE = '234,234,234';
173 $conf->global->THEME_ELDY_TEXT = '0,0,0';
174 $conf->global->THEME_ELDY_FONT_SIZE1 = $fontsize;
175 $conf->global->THEME_ELDY_FONT_SIZE2 = '0.75em';
176}
177
178// Case of option availables only if THEME_ELDY_ENABLE_PERSONALIZED is on
179$colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BACKBODY') ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY);
180$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TOPMENU_BACK1') ? $colorbackhmenu1 : $conf->global->THEME_ELDY_TOPMENU_BACK1) : (empty($user->conf->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $user->conf->THEME_ELDY_TOPMENU_BACK1);
181$colorbackvmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_VERMENU_BACK1') ? $colorbackvmenu1 : $conf->global->THEME_ELDY_VERMENU_BACK1) : (empty($user->conf->THEME_ELDY_VERMENU_BACK1) ? $colorbackvmenu1 : $user->conf->THEME_ELDY_VERMENU_BACK1);
182$colortopbordertitle1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TOPBORDER_TITLE1') ? $colortopbordertitle1 : $conf->global->THEME_ELDY_TOPBORDER_TITLE1) : (empty($user->conf->THEME_ELDY_TOPBORDER_TITLE1) ? $colortopbordertitle1 : $user->conf->THEME_ELDY_TOPBORDER_TITLE1);
183$colorbacktitle1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BACKTITLE1') ? $colorbacktitle1 : $conf->global->THEME_ELDY_BACKTITLE1) : (empty($user->conf->THEME_ELDY_BACKTITLE1) ? $colorbacktitle1 : $user->conf->THEME_ELDY_BACKTITLE1);
184$colorbacktabcard1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BACKTABCARD1') ? $colorbacktabcard1 : $conf->global->THEME_ELDY_BACKTABCARD1) : (empty($user->conf->THEME_ELDY_BACKTABCARD1) ? $colorbacktabcard1 : $user->conf->THEME_ELDY_BACKTABCARD1);
185$colorbacktabactive = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BACKTABACTIVE') ? $colorbacktabactive : $conf->global->THEME_ELDY_BACKTABACTIVE) : (empty($user->conf->THEME_ELDY_BACKTABACTIVE) ? $colorbacktabactive : $user->conf->THEME_ELDY_BACKTABACTIVE);
186$colorbacklineimpair1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_LINEIMPAIR1') ? $colorbacklineimpair1 : $conf->global->THEME_ELDY_LINEIMPAIR1) : (empty($user->conf->THEME_ELDY_LINEIMPAIR1) ? $colorbacklineimpair1 : $user->conf->THEME_ELDY_LINEIMPAIR1);
187$colorbacklineimpair2 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_LINEIMPAIR2') ? $colorbacklineimpair2 : $conf->global->THEME_ELDY_LINEIMPAIR2) : (empty($user->conf->THEME_ELDY_LINEIMPAIR2) ? $colorbacklineimpair2 : $user->conf->THEME_ELDY_LINEIMPAIR2);
188$colorbacklinepair1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_LINEPAIR1') ? $colorbacklinepair1 : $conf->global->THEME_ELDY_LINEPAIR1) : (empty($user->conf->THEME_ELDY_LINEPAIR1) ? $colorbacklinepair1 : $user->conf->THEME_ELDY_LINEPAIR1);
189$colorbacklinepair2 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_LINEPAIR2') ? $colorbacklinepair2 : $conf->global->THEME_ELDY_LINEPAIR2) : (empty($user->conf->THEME_ELDY_LINEPAIR2) ? $colorbacklinepair2 : $user->conf->THEME_ELDY_LINEPAIR2);
190$colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_LINEBREAK') ? $colorbacklinebreak : $conf->global->THEME_ELDY_LINEBREAK) : (empty($user->conf->THEME_ELDY_LINEBREAK) ? $colorbacklinebreak : $user->conf->THEME_ELDY_LINEBREAK);
191$colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTTITLENOTAB') ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB);
192$colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTTITLE') ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE);
193$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTTITLELINK') ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
194$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXT') ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
195$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTLINK') ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
196$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BTNACTION') ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
197$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTBTNACTION') ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
198$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_FONT_SIZE1') ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
199$fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_FONT_SIZE2') ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
200$heightrow = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_USECOMOACTROW') ? '155%' : '300%') : (empty($user->conf->THEME_ELDY_USECOMOACTROW) ? '155%' : '300%');
201// Hover color
202$colorbacklinepairhover = ((!isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_HOVER === '1' ? 'e6edf0' : $conf->global->THEME_ELDY_USE_HOVER));
203$colorbacklinepairchecked = ((!isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_CHECKED === '1' ? 'e6edf0' : $conf->global->THEME_ELDY_USE_CHECKED));
204if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) {
205 $colorbacklinepairhover = ((!isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0') ? '' : ($user->conf->THEME_ELDY_USE_HOVER === '1' ? 'e6edf0' : $user->conf->THEME_ELDY_USE_HOVER));
206 $colorbacklinepairchecked = ((!isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0') ? '' : ($user->conf->THEME_ELDY_USE_CHECKED === '1' ? 'e6edf0' : $user->conf->THEME_ELDY_USE_CHECKED));
207}
208
209
210// Set text color to black or white
211$colorbackhmenu1 = implode(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
212$tmppart = explode(',', $colorbackhmenu1);
213$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
214if ($tmpval <= 460) {
215 $colortextbackhmenu = 'FFFFFF';
216} else {
217 $colortextbackhmenu = '000000';
218}
219
220$colorbackvmenu1 = implode(',', colorStringToArray($colorbackvmenu1)); // Normalize value to 'x,y,z'
221$tmppart = explode(',', $colorbackvmenu1);
222$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
223if ($tmpval <= 460) {
224 $colortextbackvmenu = 'FFFFFF';
225} else {
226 $colortextbackvmenu = '222222';
227}
228
229$colortopbordertitle1 = implode(',', colorStringToArray($colortopbordertitle1)); // Normalize value to 'x,y,z'
230
231$colorbacktitle1 = implode(',', colorStringToArray($colorbacktitle1)); // Normalize value to 'x,y,z'
232$tmppart = explode(',', $colorbacktitle1);
233if ($colortexttitle == '') {
234 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
235 if ($tmpval <= 460) {
236 $colortexttitle = 'FFFFFF';
237 $colorshadowtitle = '888888';
238 } else {
239 $colortexttitle = '000000';
240 $colorshadowtitle = 'FFFFFF';
241 }
242} else {
243 $colorshadowtitle = '888888';
244}
245
246$colorbacktabcard1 = implode(',', colorStringToArray($colorbacktabcard1)); // Normalize value to 'x,y,z'
247$tmppart = explode(',', $colorbacktabcard1);
248$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
249if ($tmpval <= 460) {
250 $colortextbacktab = 'FFFFFF';
251} else {
252 $colortextbacktab = '000000';
253}
254
255
256// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
257$colorbackhmenu1 = implode(',', colorStringToArray($colorbackhmenu1));
258$colorbackvmenu1 = implode(',', colorStringToArray($colorbackvmenu1));
259$colorbacktitle1 = implode(',', colorStringToArray($colorbacktitle1));
260$colorbacktabcard1 = implode(',', colorStringToArray($colorbacktabcard1));
261$colorbacktabactive = implode(',', colorStringToArray($colorbacktabactive));
262$colorbacklineimpair1 = implode(',', colorStringToArray($colorbacklineimpair1));
263$colorbacklineimpair2 = implode(',', colorStringToArray($colorbacklineimpair2));
264$colorbacklinepair1 = implode(',', colorStringToArray($colorbacklinepair1));
265$colorbacklinepair2 = implode(',', colorStringToArray($colorbacklinepair2));
266if ($colorbacklinepairhover != '') {
267 $colorbacklinepairhover = implode(',', colorStringToArray($colorbacklinepairhover));
268}
269if ($colorbacklinepairchecked != '') {
270 $colorbacklinepairchecked = implode(',', colorStringToArray($colorbacklinepairchecked));
271}
272$colorbackbody = implode(',', colorStringToArray($colorbackbody));
273$colortexttitlenotab = implode(',', colorStringToArray($colortexttitlenotab));
274$colortexttitle = implode(',', colorStringToArray($colortexttitle));
275$colortext = implode(',', colorStringToArray($colortext));
276$colortextlink = implode(',', colorStringToArray($colortextlink));
277
278$nbtopmenuentries = $menumanager->showmenu('topnb');
279$nbtopmenuentriesreal = $nbtopmenuentries;
280if ($conf->browser->layout == 'phone') {
281 $nbtopmenuentries = max($nbtopmenuentries, 10);
282}
283
284$minwidthtmenu = 66; /* minimum width for one top menu entry */
285$heightmenu = 50; /* height of top menu, part with image */
286$heightmenu2 = 49; /* height of top menu, part with login */
287$disableimages = 0;
288$maxwidthloginblock = 180;
289if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
290 $disableimages = 1;
291 $maxwidthloginblock = $maxwidthloginblock + 50;
292 $minwidthtmenu = 0;
293}
294
295if (getDolGlobalString('MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN')) {
296 $maxwidthloginblock = $maxwidthloginblock + 55;
297}
298if (getDolGlobalString('MAIN_USE_TOP_MENU_SEARCH_DROPDOWN')) {
299 $maxwidthloginblock = $maxwidthloginblock + 55;
300}
301if (!empty($conf->bookmark->enabled)) {
302 $maxwidthloginblock = $maxwidthloginblock + 55;
303}
304
305
306print '/*'."\n";
307print 'colorbackbody='.$colorbackbody."\n";
308print 'colorbackvmenu1='.$colorbackvmenu1."\n";
309print 'colorbackhmenu1='.$colorbackhmenu1."\n";
310print 'colorbacktitle1='.$colorbacktitle1."\n";
311print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
312print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
313print 'colorbacklinepair1='.$colorbacklinepair1."\n";
314print 'colorbacklinepair2='.$colorbacklinepair2."\n";
315print 'colorbacklinepairhover='.$colorbacklinepairhover."\n";
316print 'colorbacklinepairchecked='.$colorbacklinepairchecked."\n";
317print '$colortexttitlenotab='.$colortexttitlenotab."\n";
318print '$colortexttitle='.$colortexttitle."\n";
319print '$colortext='.$colortext."\n";
320print '$colortextlink='.$colortextlink."\n";
321print '$colortextbackhmenu='.$colortextbackhmenu."\n";
322print '$colortextbackvmenu='.$colortextbackvmenu."\n";
323print 'dol_hide_topmenu='.$dol_hide_topmenu."\n";
324print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
325print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
326print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
327print 'dol_screenwidth='.(empty($_SESSION['dol_screenwidth']) ? '' : $_SESSION['dol_screenwidth'])."\n";
328print 'dol_screenheight='.(empty($_SESSION['dol_screenheight']) ? '' : $_SESSION['dol_screenheight'])."\n";
329print 'fontsize='.$fontsize."\n";
330print 'nbtopmenuentries='.$nbtopmenuentries."\n";
331print 'fontsizesmaller='.$fontsizesmaller."\n";
332print 'topMenuFontSize='.$topMenuFontSize."\n";
333print 'toolTipBgColor='.$toolTipBgColor."\n";
334print 'toolTipFontColor='.$toolTipFontColor."\n";
335print 'conf->global->THEME_SATURATE_RATIO='.(!getDolGlobalString('THEME_SATURATE_RATIO') ? '' : $conf->global->THEME_SATURATE_RATIO)." (must be between 0 and 1)\n";
336print '*/'."\n";
337
338
339// Include the global.inc.php that include the badges, btn, info-box, dropdown, progress...
340require __DIR__.'/global.inc.php';
341
342if (is_object($db)) {
343 $db->close();
344}
Class to manage menu Auguria.
loadMenu($forcemainmenu='', $forceleftmenu='')
Load this->tabMenu.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
conf($dolibarr_main_document_root)
Load conf file (file must exists)
Definition inc.php:420
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.