31if (!defined(
'NOREQUIRESOC')) {
32 define(
'NOREQUIRESOC',
'1');
35if (!defined(
'NOCSRFCHECK')) {
36 define(
'NOCSRFCHECK', 1);
38if (!defined(
'NOTOKENRENEWAL')) {
39 define(
'NOTOKENRENEWAL', 1);
41if (!defined(
'NOLOGIN')) {
45if (!defined(
'NOREQUIREHTML')) {
46 define(
'NOREQUIREHTML', 1);
48if (!defined(
'NOREQUIREAJAX')) {
49 define(
'NOREQUIREAJAX',
'1');
53define(
'ISLOADEDBYSTEELSHEET',
'1');
56require __DIR__.
'/theme_vars.inc.php';
57if (defined(
'THEME_ONLY_CONSTANT')) {
62session_cache_limiter(
'public');
64require_once __DIR__.
'/../../main.inc.php';
65require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
69if (empty($user->id) && !empty($_SESSION[
'dol_login'])) {
70 $user->fetch(
'', $_SESSION[
'dol_login'],
'', 1);
74 $menumanager =
new MenuManager($db, empty($user->socid) ? 0 : 1);
82if (empty($dolibarr_nocache)) {
83 header(
'Cache-Control: max-age=10800, public, must-revalidate');
85 header(
'Cache-Control: no-cache');
89 $conf->theme =
GETPOST(
'theme',
'aZ09');
92 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
94if (GETPOSTISSET(
'THEME_DARKMODEENABLED')) {
95 $conf->global->THEME_DARKMODEENABLED =
GETPOST(
'THEME_DARKMODEENABLED',
'int');
98$langs->load(
"main", 0, 1);
99$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
100$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
106 $theme = $conf->global->MAIN_OVERWRITE_THEME_RES;
110$fontlist =
'arial,tahoma,verdana,helvetica';
113$img_button =
dol_buildpath($path.
'/theme/'.$theme.
'/img/button_bg.png', 1);
114$dol_hide_topmenu = $conf->dol_hide_topmenu;
115$dol_hide_leftmenu = $conf->dol_hide_leftmenu;
116$dol_optimize_smallscreen = $conf->dol_optimize_smallscreen;
117$dol_no_mouse_hover = $conf->dol_no_mouse_hover;
128if (!isset($conf->global->THEME_ELDY_BACKBODY)) {
129 $conf->global->THEME_ELDY_BACKBODY = $colorbackbody;
131if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
132 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
134if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) {
135 $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1;
137if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) {
138 $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1;
140if (!isset($conf->global->THEME_ELDY_USE_HOVER)) {
141 $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover;
143if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) {
144 $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked;
146if (!isset($conf->global->THEME_ELDY_LINEBREAK)) {
147 $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak;
149if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
150 $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab;
152if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
153 $conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
155if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
156 $conf->global->THEME_ELDY_BTNACTION = $butactionbg;
158if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
159 $conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
163 $conf->global->THEME_ELDY_BACKTABCARD1 =
'255,255,255';
164 $conf->global->THEME_ELDY_BACKTABACTIVE =
'234,234,234';
165 $conf->global->THEME_ELDY_TEXT =
'0,0,0';
166 $conf->global->THEME_ELDY_FONT_SIZE1 = $fontsize;
167 $conf->global->THEME_ELDY_FONT_SIZE2 =
'0.75em';
171$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);
172$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);
173$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);
174$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);
175$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);
176$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);
177$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);
178$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);
179$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);
180$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);
181$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);
182$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);
183$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);
184$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);
185$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);
186$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);
187$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);
188$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);
189$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);
190$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);
191$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);
192$heightrow = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!
getDolGlobalString(
'THEME_ELDY_USECOMOACTROW') ?
'155%' :
'300%') : (!
getDolGlobalString(
'THEME_ELDY_USECOMOACTROW') ?
'155%' :
'300%');
194$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));
195$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));
196if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) {
197 $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));
198 $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));
204$tmppart = explode(
',', $colorbackhmenu1);
205$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
207 $colortextbackhmenu =
'FFFFFF';
209 $colortextbackhmenu =
'000000';
213$tmppart = explode(
',', $colorbackvmenu1);
214$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
216 $colortextbackvmenu =
'FFFFFF';
218 $colortextbackvmenu =
'000000';
224$tmppart = explode(
',', $colorbacktitle1);
225if ($colortexttitle ==
'') {
226 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
227 if ($tmpval <= 460) {
228 $colortexttitle =
'FFFFFF';
229 $colorshadowtitle =
'888888';
231 $colortexttitle =
'000000';
232 $colorshadowtitle =
'FFFFFF';
235 $colorshadowtitle =
'888888';
239$tmppart = explode(
',', $colorbacktabcard1);
240$tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
242 $colortextbacktab =
'FFFFFF';
244 $colortextbacktab =
'000000';
258if ($colorbacklinepairhover !=
'') {
261if ($colorbacklinepairchecked !=
'') {
270$nbtopmenuentries = $menumanager->showmenu(
'topnb');
271$nbtopmenuentriesreal = $nbtopmenuentries;
272if ($conf->browser->layout ==
'phone') {
273 $nbtopmenuentries = max($nbtopmenuentries, 10);
280$maxwidthloginblock = 180;
283 $maxwidthloginblock = $maxwidthloginblock + 50;
288 $maxwidthloginblock = $maxwidthloginblock + 55;
291 $maxwidthloginblock = $maxwidthloginblock + 55;
293if (!empty($conf->bookmark->enabled)) {
294 $maxwidthloginblock = $maxwidthloginblock + 55;
299print
'colorbackbody='.$colorbackbody.
"\n";
300print
'colorbackvmenu1='.$colorbackvmenu1.
"\n";
301print
'colorbackhmenu1='.$colorbackhmenu1.
"\n";
302print
'colorbacktitle1='.$colorbacktitle1.
"\n";
303print
'colorbacklineimpair1='.$colorbacklineimpair1.
"\n";
304print
'colorbacklineimpair2='.$colorbacklineimpair2.
"\n";
305print
'colorbacklinepair1='.$colorbacklinepair1.
"\n";
306print
'colorbacklinepair2='.$colorbacklinepair2.
"\n";
307print
'colorbacklinepairhover='.$colorbacklinepairhover.
"\n";
308print
'colorbacklinepairchecked='.$colorbacklinepairchecked.
"\n";
309print
'$colortexttitlenotab='.$colortexttitlenotab.
"\n";
310print
'$colortexttitle='.$colortexttitle.
"\n";
311print
'$colortext='.$colortext.
"\n";
312print
'$colortextlink='.$colortextlink.
"\n";
313print
'$colortextbackhmenu='.$colortextbackhmenu.
"\n";
314print
'$colortextbackvmenu='.$colortextbackvmenu.
"\n";
315print
'dol_hide_topmenu='.$dol_hide_topmenu.
"\n";
316print
'dol_hide_leftmenu='.$dol_hide_leftmenu.
"\n";
317print
'dol_optimize_smallscreen='.$dol_optimize_smallscreen.
"\n";
318print
'dol_no_mouse_hover='.$dol_no_mouse_hover.
"\n";
319print
'dol_screenwidth='.(empty($_SESSION[
'dol_screenwidth']) ?
'' : $_SESSION[
'dol_screenwidth']).
"\n";
320print
'dol_screenheight='.(empty($_SESSION[
'dol_screenheight']) ?
'' : $_SESSION[
'dol_screenheight']).
"\n";
321print
'fontsize='.$fontsize.
"\n";
322print
'nbtopmenuentries='.$nbtopmenuentries.
"\n";
323print
'fontsizesmaller='.$fontsizesmaller.
"\n";
324print
'topMenuFontSize='.$topMenuFontSize.
"\n";
325print
'toolTipBgColor='.$toolTipBgColor.
"\n";
326print
'toolTipFontColor='.$toolTipFontColor.
"\n";
327print
'conf->global->THEME_SATURATE_RATIO='.(!
getDolGlobalString(
'THEME_SATURATE_RATIO') ?
'' : $conf->global->THEME_SATURATE_RATIO).
" (must be between 0 and 1)\n";
332require __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,...
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.