32if (!defined(
'NOREQUIRESOC')) {
33 define(
'NOREQUIRESOC',
'1');
36if (!defined(
'NOCSRFCHECK')) {
37 define(
'NOCSRFCHECK', 1);
39if (!defined(
'NOTOKENRENEWAL')) {
40 define(
'NOTOKENRENEWAL', 1);
42if (!defined(
'NOLOGIN')) {
46if (!defined(
'NOREQUIREHTML')) {
47 define(
'NOREQUIREHTML', 1);
49if (!defined(
'NOREQUIREAJAX')) {
50 define(
'NOREQUIREAJAX',
'1');
54define(
'ISLOADEDBYSTEELSHEET',
'1');
57require __DIR__.
'/theme_vars.inc.php';
58if (defined(
'THEME_ONLY_CONSTANT')) {
63session_cache_limiter(
'public');
65require_once __DIR__.
'/../../main.inc.php';
66require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
70if (empty($user->id) && !empty($_SESSION[
'dol_login'])) {
71 $user->fetch(
'', $_SESSION[
'dol_login'],
'', 1);
75 $menumanager =
new MenuManager($db, empty($user->socid) ? 0 : 1);
83if (empty($dolibarr_nocache)) {
84 header(
'Cache-Control: max-age=10800, public, must-revalidate');
86 header(
'Cache-Control: no-cache');
90 $conf->theme =
GETPOST(
'theme',
'aZ09');
93 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
95if (GETPOSTISSET(
'THEME_DARKMODEENABLED')) {
96 $conf->global->THEME_DARKMODEENABLED =
GETPOSTINT(
'THEME_DARKMODEENABLED');
99$langs->load(
"main", 0, 1);
100$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
101$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
115$fontlist =
'arial,tahoma,verdana,helvetica';
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;
136if (!isset($conf->global->THEME_ELDY_BACKBODY)) {
137 $conf->global->THEME_ELDY_BACKBODY = $colorbackbody;
139if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
140 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
142if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) {
143 $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1;
145if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) {
146 $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1;
148if (!isset($conf->global->THEME_ELDY_USE_HOVER)) {
149 $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover;
151if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) {
152 $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked;
154if (!isset($conf->global->THEME_ELDY_LINEBREAK)) {
155 $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak;
157if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
158 $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab;
160if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
161 $conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
163if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
164 $conf->global->THEME_ELDY_BTNACTION = $butactionbg;
166if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
167 $conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
171 $conf->global->THEME_ELDY_BACKTABCARD1 =
'255,255,255';
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';
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%');
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));
212$tmppart = explode(
',', $colorbackhmenu1);
213$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
215 $colortextbackhmenu =
'FFFFFF';
217 $colortextbackhmenu =
'000000';
221$tmppart = explode(
',', $colorbackvmenu1);
222$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
224 $colortextbackvmenu =
'FFFFFF';
226 $colortextbackvmenu =
'222222';
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';
239 $colortexttitle =
'000000';
240 $colorshadowtitle =
'FFFFFF';
243 $colorshadowtitle =
'888888';
247$tmppart = explode(
',', $colorbacktabcard1);
248$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
250 $colortextbacktab =
'FFFFFF';
252 $colortextbacktab =
'000000';
266if ($colorbacklinepairhover !=
'') {
269if ($colorbacklinepairchecked !=
'') {
270 $colorbacklinepairchecked = implode(
',',
colorStringToArray($colorbacklinepairchecked));
278$nbtopmenuentries = $menumanager->showmenu(
'topnb');
279$nbtopmenuentriesreal = $nbtopmenuentries;
280if ($conf->browser->layout ==
'phone') {
281 $nbtopmenuentries = max($nbtopmenuentries, 10);
288$maxwidthloginblock = 180;
289if (
getDolGlobalInt(
'THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
291 $maxwidthloginblock = $maxwidthloginblock + 50;
296 $maxwidthloginblock = $maxwidthloginblock + 55;
299 $maxwidthloginblock = $maxwidthloginblock + 55;
301if (!empty($conf->bookmark->enabled)) {
302 $maxwidthloginblock = $maxwidthloginblock + 55;
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";
340require __DIR__.
'/global.inc.php';
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)
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.