dolibarr 21.0.0-beta
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 */
25
31//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
32//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
33if (!defined('NOREQUIRESOC')) {
34 define('NOREQUIRESOC', '1');
35}
36//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
37if (!defined('NOCSRFCHECK')) {
38 define('NOCSRFCHECK', 1);
39}
40if (!defined('NOTOKENRENEWAL')) {
41 define('NOTOKENRENEWAL', 1);
42}
43if (!defined('NOLOGIN')) {
44 define('NOLOGIN', 1); // File must be accessed by logon page so without login.
45}
46//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)
47if (!defined('NOREQUIREHTML')) {
48 define('NOREQUIREHTML', 1);
49}
50if (!defined('NOREQUIREAJAX')) {
51 define('NOREQUIREAJAX', '1');
52}
53
54
55define('ISLOADEDBYSTEELSHEET', '1');
56
57
58require __DIR__.'/theme_vars.inc.php';
59if (defined('THEME_ONLY_CONSTANT')) {
60 return;
61}
62// Types from theme_vars
63'
64@phan-var-force string $badgeWarning
65@phan-var-force string $butactionbg
66@phan-var-force string $colorbackbody
67@phan-var-force string $colorbackhmenu1
68@phan-var-force string $colorbacklinebreak
69@phan-var-force string $colorbacklineimpair1
70@phan-var-force string $colorbacklineimpair2
71@phan-var-force string $colorbacklinepair1
72@phan-var-force string $colorbacklinepair2
73@phan-var-force string $colorbacklinepairchecked
74@phan-var-force string $colorbacklinepairhover
75@phan-var-force string $colorbacktabactive
76@phan-var-force string $colorbacktabcard1
77@phan-var-force string $colorbacktitle1
78@phan-var-force string $colorbackvmenu1
79@phan-var-force string $colorblind_deuteranopes_textSuccess
80@phan-var-force string $colorblind_deuteranopes_textWarning
81@phan-var-force string $colortext
82@phan-var-force string $colortextlink
83@phan-var-force string $colortexttitle
84@phan-var-force string $colortexttitlelink
85@phan-var-force string $colortexttitlenotab
86@phan-var-force string $colortexttitlenotab2
87@phan-var-force string $colortopbordertitle1
88@phan-var-force string $fontsize
89@phan-var-force string $textDanger
90@phan-var-force string $textSuccess
91@phan-var-force string $textWarning
92@phan-var-force string $textbutaction
93@phan-var-force string $toolTipBgColor
94@phan-var-force string $toolTipFontColor
95@phan-var-force string $topMenuFontSize
96';
97
98
99session_cache_limiter('public');
100
101require_once __DIR__.'/../../main.inc.php'; // __DIR__ allow this script to be included in custom themes
102require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
142// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
143// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile.
144if (empty($user->id) && !empty($_SESSION['dol_login'])) {
145 $user->fetch(0, $_SESSION['dol_login'], '', 1);
146 $user->loadRights();
147
148 // Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
149 // @phan-suppress-next-line PhanRedefinedClassReference
150 $menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
151 // @phan-suppress-next-line PhanRedefinedClassReference
152 $menumanager->loadMenu();
153}
154
155
156// Define css type
157top_httphead('text/css');
158// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
159if (empty($dolibarr_nocache)) {
160 header('Cache-Control: max-age=10800, public, must-revalidate');
161} else {
162 header('Cache-Control: no-cache');
163}
164
165if (GETPOST('theme', 'aZ09')) {
166 $conf->theme = GETPOST('theme', 'aZ09'); // If theme was forced on URL
167}
168if (GETPOST('lang', 'aZ09')) {
169 $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
170}
171if (GETPOSTISSET('THEME_DARKMODEENABLED')) {
172 $conf->global->THEME_DARKMODEENABLED = GETPOSTINT('THEME_DARKMODEENABLED'); // If darkmode was forced on URL
173}
174
175$langs->load("main", 0, 1);
176$right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right');
177$left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
178
179$path = ''; // This value may be used in future for external module to overwrite theme
180$theme = 'eldy'; // Value of theme
181if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) {
182 $path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
183 $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
184}
185
186// Define image path files and other constants
187
188//$fontlist='helvetica, verdana, arial, sans-serif';
189//$fontlist='"open sans", "Helvetica Neue", Helvetica, Arial, sans-serif';
190
191$fontlist = 'arial,tahoma,verdana,helvetica';
192if (getDolGlobalString('THEME_FONT_FAMILY')) {
193 $fontlist = getDolGlobalString('THEME_FONT_FAMILY').', '.$fontlist;
194}
195
196$img_head = '';
197$img_button = dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png', 1);
198$dol_hide_topmenu = $conf->dol_hide_topmenu;
199$dol_hide_leftmenu = $conf->dol_hide_leftmenu;
200$dol_optimize_smallscreen = $conf->dol_optimize_smallscreen;
201$dol_no_mouse_hover = $conf->dol_no_mouse_hover;
202
203//$conf->global->THEME_ELDY_ENABLE_PERSONALIZED=0;
204//$user->conf->THEME_ELDY_ENABLE_PERSONALIZED=0;
205//var_dump($user->conf->THEME_ELDY_RGB);
206
207$useboldtitle = getDolGlobalInt('THEME_ELDY_USEBOLDTITLE');
208$userborderontable = getDolGlobalInt('THEME_ELDY_USEBORDERONTABLE');
209$borderwidth = 1;
210
211// Case of option always editable
212if (!isset($conf->global->THEME_ELDY_BACKBODY)) {
213 $conf->global->THEME_ELDY_BACKBODY = $colorbackbody;
214}
215if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
216 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
217}
218if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) {
219 $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1;
220}
221if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) {
222 $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1;
223}
224if (!isset($conf->global->THEME_ELDY_USE_HOVER)) {
225 $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover;
226}
227if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) {
228 $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked;
229}
230if (!isset($conf->global->THEME_ELDY_LINEBREAK)) {
231 $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak;
232}
233if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
234 $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab;
235}
236if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
237 $conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
238}
239if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
240 $conf->global->THEME_ELDY_BTNACTION = $butactionbg;
241}
242if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
243 $conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
244}
245// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
246if (!getDolGlobalString('THEME_ELDY_ENABLE_PERSONALIZED')) {
247 $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card
248 $conf->global->THEME_ELDY_BACKTABACTIVE = '234,234,234';
249 $conf->global->THEME_ELDY_TEXT = '0,0,0';
250 $conf->global->THEME_ELDY_FONT_SIZE1 = $fontsize;
251 $conf->global->THEME_ELDY_FONT_SIZE2 = '0.75em';
252}
253
254// Case of option availables only if THEME_ELDY_ENABLE_PERSONALIZED is on
255$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);
256$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);
257$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);
258$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);
259$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);
260$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);
261$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);
262$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);
263$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);
264$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);
265$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);
266$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);
267$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);
268$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);
269$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);
270$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);
271$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);
272$colortextlinkHsla = colorHexToHsl($colortextlink, false, true);
273
274$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);
275$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);
276$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);
277$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);
278$heightrow = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_USECOMOACTROW') ? '155%' : '300%') : (empty($user->conf->THEME_ELDY_USECOMOACTROW) ? '155%' : '300%');
279// Hover color
280$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));
281$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));
282if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) {
283 $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));
284 $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));
285}
286
287
288// Set text color to black or white
289$colorbackhmenu1 = implode(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
290$tmppart = explode(',', $colorbackhmenu1);
291$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
292if ($tmpval <= 460) {
293 $colortextbackhmenu = 'FFFFFF';
294} else {
295 $colortextbackhmenu = '000000';
296}
297
298$colorbackvmenu1 = implode(',', colorStringToArray($colorbackvmenu1)); // Normalize value to 'x,y,z'
299$tmppart = explode(',', $colorbackvmenu1);
300$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
301if ($tmpval <= 460) {
302 $colortextbackvmenu = 'FFFFFF';
303} else {
304 $colortextbackvmenu = '222222';
305}
306
307$colortopbordertitle1 = implode(',', colorStringToArray($colortopbordertitle1)); // Normalize value to 'x,y,z'
308
309$colorbacktitle1 = implode(',', colorStringToArray($colorbacktitle1)); // Normalize value to 'x,y,z'
310$tmppart = explode(',', $colorbacktitle1);
311if ($colortexttitle == '') {
312 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
313 if ($tmpval <= 460) {
314 $colortexttitle = 'FFFFFF';
315 $colorshadowtitle = '888888';
316 } else {
317 $colortexttitle = '000000';
318 $colorshadowtitle = 'FFFFFF';
319 }
320} else {
321 $colorshadowtitle = '888888';
322}
323
324$colorbacktabcard1 = implode(',', colorStringToArray($colorbacktabcard1)); // Normalize value to 'x,y,z'
325$tmppart = explode(',', $colorbacktabcard1);
326$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
327if ($tmpval <= 460) {
328 $colortextbacktab = 'FFFFFF';
329} else {
330 $colortextbacktab = '000000';
331}
332
333
334// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
335$colorbackhmenu1 = implode(',', colorStringToArray($colorbackhmenu1));
336$colorbackvmenu1 = implode(',', colorStringToArray($colorbackvmenu1));
337$colorbacktitle1 = implode(',', colorStringToArray($colorbacktitle1));
338$colorbacktabcard1 = implode(',', colorStringToArray($colorbacktabcard1));
339$colorbacktabactive = implode(',', colorStringToArray($colorbacktabactive));
340$colorbacklineimpair1 = implode(',', colorStringToArray($colorbacklineimpair1));
341$colorbacklineimpair2 = implode(',', colorStringToArray($colorbacklineimpair2));
342$colorbacklinepair1 = implode(',', colorStringToArray($colorbacklinepair1));
343$colorbacklinepair2 = implode(',', colorStringToArray($colorbacklinepair2));
344if ($colorbacklinepairhover != '') {
345 $colorbacklinepairhover = implode(',', colorStringToArray($colorbacklinepairhover));
346}
347if ($colorbacklinepairchecked != '') {
348 $colorbacklinepairchecked = implode(',', colorStringToArray($colorbacklinepairchecked));
349}
350$colorbackbody = implode(',', colorStringToArray($colorbackbody));
351$colortexttitlenotab = implode(',', colorStringToArray($colortexttitlenotab));
352$colortexttitle = implode(',', colorStringToArray($colortexttitle));
353$colortext = implode(',', colorStringToArray($colortext));
354$colortextlink = implode(',', colorStringToArray($colortextlink));
355
356// @phan-suppress-next-line PhanRedefinedClassReference
357$nbtopmenuentries = $menumanager->showmenu('topnb');
358$nbtopmenuentriesreal = $nbtopmenuentries;
359if ($conf->browser->layout == 'phone') {
360 $nbtopmenuentries = max($nbtopmenuentries, 10);
361}
362
363$minwidthtmenu = 66; /* minimum width for one top menu entry */
364$heightmenu = 50; /* height of top menu, part with image */
365$heightmenu2 = 49; /* height of top menu, part with login */
366$disableimages = 0;
367$maxwidthloginblock = 180;
368if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
369 $disableimages = 1;
370 $maxwidthloginblock += 50;
371 $minwidthtmenu = 0;
372}
373
374if (getDolGlobalString('MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN')) {
375 $maxwidthloginblock += 55;
376}
377if (getDolGlobalString('MAIN_USE_TOP_MENU_SEARCH_DROPDOWN')) {
378 $maxwidthloginblock += 55;
379}
380if (isModEnabled('bookmark')) {
381 $maxwidthloginblock += 55;
382}
383
384
385print '/*'."\n";
386print 'colorbackbody='.$colorbackbody."\n";
387print 'colorbackvmenu1='.$colorbackvmenu1."\n";
388print 'colorbackhmenu1='.$colorbackhmenu1."\n";
389print 'colorbacktitle1='.$colorbacktitle1."\n";
390print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
391print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
392print 'colorbacklinepair1='.$colorbacklinepair1."\n";
393print 'colorbacklinepair2='.$colorbacklinepair2."\n";
394print 'colorbacklinepairhover='.$colorbacklinepairhover."\n";
395print 'colorbacklinepairchecked='.$colorbacklinepairchecked."\n";
396print '$colortexttitlenotab='.$colortexttitlenotab."\n";
397print '$colortexttitle='.$colortexttitle."\n";
398print '$colortext='.$colortext."\n";
399print '$colortextlink='.$colortextlink."\n";
400print '$colortextbackhmenu='.$colortextbackhmenu."\n";
401print '$colortextbackvmenu='.$colortextbackvmenu."\n";
402print 'dol_hide_topmenu='.$dol_hide_topmenu."\n";
403print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
404print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
405print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
406print 'dol_screenwidth='.(empty($_SESSION['dol_screenwidth']) ? '' : $_SESSION['dol_screenwidth'])."\n";
407print 'dol_screenheight='.(empty($_SESSION['dol_screenheight']) ? '' : $_SESSION['dol_screenheight'])."\n";
408print 'fontsize='.$fontsize."\n";
409print 'nbtopmenuentries='.$nbtopmenuentries."\n";
410print 'fontsizesmaller='.$fontsizesmaller."\n";
411print 'topMenuFontSize='.$topMenuFontSize."\n";
412print 'toolTipBgColor='.$toolTipBgColor."\n";
413print 'toolTipFontColor='.$toolTipFontColor."\n";
414print 'conf->global->THEME_SATURATE_RATIO='.getDolGlobalString('THEME_SATURATE_RATIO')." (must be between 0 and 1)\n";
415print '*/'."\n";
416
417
418// Include the global.inc.php that include the badges, btn, info-box, dropdown, progress...
419require __DIR__.'/global.inc.php';
420
421if (is_object($db)) {
422 $db->close();
423}
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,...
colorHexToHsl($hex, $alpha=false, $returnArray=false)
Color Hex to Hsl (used for style)
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 a 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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79