31 if (!defined(
'NOREQUIRESOC')) {
32 define(
'NOREQUIRESOC',
'1');
35 if (!defined(
'NOCSRFCHECK')) {
36 define(
'NOCSRFCHECK', 1);
38 if (!defined(
'NOTOKENRENEWAL')) {
39 define(
'NOTOKENRENEWAL', 1);
41 if (!defined(
'NOLOGIN')) {
45 if (!defined(
'NOREQUIREHTML')) {
46 define(
'NOREQUIREHTML', 1);
48 if (!defined(
'NOREQUIREAJAX')) {
49 define(
'NOREQUIREAJAX',
'1');
53 define(
'ISLOADEDBYSTEELSHEET',
'1');
56 require __DIR__.
'/theme_vars.inc.php';
57 if (defined(
'THEME_ONLY_CONSTANT')) {
62 session_cache_limiter(
'public');
64 require_once __DIR__.
'/../../main.inc.php';
65 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
69 if (empty($user->id) && !empty($_SESSION[
'dol_login'])) {
70 $user->fetch(
'', $_SESSION[
'dol_login'],
'', 1);
74 $menumanager =
new MenuManager($db, empty($user->socid) ? 0 : 1);
75 $menumanager->loadMenu();
82 if (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'));
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');
104 if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) {
105 $path =
'/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme = $conf->global->MAIN_OVERWRITE_THEME_RES;
109 $fontlist =
'arial,tahoma,verdana,helvetica';
112 $img_button =
dol_buildpath($path.
'/theme/'.$theme.
'/img/button_bg.png', 1);
113 $dol_hide_topmenu = $conf->dol_hide_topmenu;
114 $dol_hide_leftmenu = $conf->dol_hide_leftmenu;
115 $dol_optimize_smallscreen = $conf->dol_optimize_smallscreen;
116 $dol_no_mouse_hover = $conf->dol_no_mouse_hover;
127 if (!isset($conf->global->THEME_ELDY_BACKBODY)) {
128 $conf->global->THEME_ELDY_BACKBODY = $colorbackbody;
130 if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) {
131 $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1;
133 if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) {
134 $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1;
136 if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) {
137 $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1;
139 if (!isset($conf->global->THEME_ELDY_USE_HOVER)) {
140 $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover;
142 if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) {
143 $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked;
145 if (!isset($conf->global->THEME_ELDY_LINEBREAK)) {
146 $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak;
148 if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
149 $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab;
151 if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
152 $conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
154 if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
155 $conf->global->THEME_ELDY_BTNACTION = $butactionbg;
157 if (!isset($conf->global->THEME_ELDY_TEXTBTNACTION)) {
158 $conf->global->THEME_ELDY_TEXTBTNACTION = $textbutaction;
161 if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
162 $conf->global->THEME_ELDY_BACKTABCARD1 =
'255,255,255';
163 $conf->global->THEME_ELDY_BACKTABACTIVE =
'234,234,234';
164 $conf->global->THEME_ELDY_TEXT =
'0,0,0';
165 $conf->global->THEME_ELDY_FONT_SIZE1 = $fontsize;
166 $conf->global->THEME_ELDY_FONT_SIZE2 =
'0.75em';
170 $colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->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);
171 $colorbackvmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->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);
172 $colortopbordertitle1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->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);
173 $colorbacktitle1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKTITLE1) ? $colorbacktitle1 : $conf->global->THEME_ELDY_BACKTITLE1) : (empty($user->conf->THEME_ELDY_BACKTITLE1) ? $colorbacktitle1 : $user->conf->THEME_ELDY_BACKTITLE1);
174 $colorbacktabcard1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKTABCARD1) ? $colorbacktabcard1 : $conf->global->THEME_ELDY_BACKTABCARD1) : (empty($user->conf->THEME_ELDY_BACKTABCARD1) ? $colorbacktabcard1 : $user->conf->THEME_ELDY_BACKTABCARD1);
175 $colorbacktabactive = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKTABACTIVE) ? $colorbacktabactive : $conf->global->THEME_ELDY_BACKTABACTIVE) : (empty($user->conf->THEME_ELDY_BACKTABACTIVE) ? $colorbacktabactive : $user->conf->THEME_ELDY_BACKTABACTIVE);
176 $colorbacklineimpair1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_LINEIMPAIR1) ? $colorbacklineimpair1 : $conf->global->THEME_ELDY_LINEIMPAIR1) : (empty($user->conf->THEME_ELDY_LINEIMPAIR1) ? $colorbacklineimpair1 : $user->conf->THEME_ELDY_LINEIMPAIR1);
177 $colorbacklineimpair2 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_LINEIMPAIR2) ? $colorbacklineimpair2 : $conf->global->THEME_ELDY_LINEIMPAIR2) : (empty($user->conf->THEME_ELDY_LINEIMPAIR2) ? $colorbacklineimpair2 : $user->conf->THEME_ELDY_LINEIMPAIR2);
178 $colorbacklinepair1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_LINEPAIR1) ? $colorbacklinepair1 : $conf->global->THEME_ELDY_LINEPAIR1) : (empty($user->conf->THEME_ELDY_LINEPAIR1) ? $colorbacklinepair1 : $user->conf->THEME_ELDY_LINEPAIR1);
179 $colorbacklinepair2 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_LINEPAIR2) ? $colorbacklinepair2 : $conf->global->THEME_ELDY_LINEPAIR2) : (empty($user->conf->THEME_ELDY_LINEPAIR2) ? $colorbacklinepair2 : $user->conf->THEME_ELDY_LINEPAIR2);
180 $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_LINEBREAK) ? $colorbacklinebreak : $conf->global->THEME_ELDY_LINEBREAK) : (empty($user->conf->THEME_ELDY_LINEBREAK) ? $colorbacklinebreak : $user->conf->THEME_ELDY_LINEBREAK);
181 $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY);
182 $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB);
183 $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE);
184 $colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
185 $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
186 $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
187 $butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
188 $textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
189 $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->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);
190 $fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->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);
193 $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));
194 $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));
195 if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) {
196 $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));
197 $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));
203 $tmppart = explode(
',', $colorbackhmenu1);
204 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
205 if ($tmpval <= 460) {
206 $colortextbackhmenu =
'FFFFFF';
208 $colortextbackhmenu =
'000000';
212 $tmppart = explode(
',', $colorbackvmenu1);
213 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
214 if ($tmpval <= 460) {
215 $colortextbackvmenu =
'FFFFFF';
217 $colortextbackvmenu =
'000000';
223 $tmppart = explode(
',', $colorbacktitle1);
224 if ($colortexttitle ==
'') {
225 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
226 if ($tmpval <= 460) {
227 $colortexttitle =
'FFFFFF'; $colorshadowtitle =
'888888';
229 $colortexttitle =
'000000'; $colorshadowtitle =
'FFFFFF';
232 $colorshadowtitle =
'888888';
236 $tmppart = explode(
',', $colorbacktabcard1);
237 $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0);
238 if ($tmpval <= 460) {
239 $colortextbacktab =
'FFFFFF';
241 $colortextbacktab =
'000000';
255 if ($colorbacklinepairhover !=
'') {
258 if ($colorbacklinepairchecked !=
'') {
267 $nbtopmenuentries = $menumanager->showmenu(
'topnb');
269 if ($conf->browser->layout ==
'phone') {
270 $nbtopmenuentries = max($nbtopmenuentries, 10);
278 $maxwidthloginblock = 180;
280 $disableimages = 1; $maxwidthloginblock = $maxwidthloginblock + 50; $minwidthtmenu = 0;
283 if (!empty($conf->global->MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)) {
284 $maxwidthloginblock = $maxwidthloginblock + 55;
286 if (!empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN)) {
287 $maxwidthloginblock = $maxwidthloginblock + 55;
289 if (!empty($conf->bookmark->enabled)) {
290 $maxwidthloginblock = $maxwidthloginblock + 55;
295 print
'colorbackbody='.$colorbackbody.
"\n";
296 print
'colorbackvmenu1='.$colorbackvmenu1.
"\n";
297 print
'colorbackhmenu1='.$colorbackhmenu1.
"\n";
298 print
'colorbacktitle1='.$colorbacktitle1.
"\n";
299 print
'colorbacklineimpair1='.$colorbacklineimpair1.
"\n";
300 print
'colorbacklineimpair2='.$colorbacklineimpair2.
"\n";
301 print
'colorbacklinepair1='.$colorbacklinepair1.
"\n";
302 print
'colorbacklinepair2='.$colorbacklinepair2.
"\n";
303 print
'colorbacklinepairhover='.$colorbacklinepairhover.
"\n";
304 print
'colorbacklinepairchecked='.$colorbacklinepairchecked.
"\n";
305 print
'$colortexttitlenotab='.$colortexttitlenotab.
"\n";
306 print
'$colortexttitle='.$colortexttitle.
"\n";
307 print
'$colortext='.$colortext.
"\n";
308 print
'$colortextlink='.$colortextlink.
"\n";
309 print
'$colortextbackhmenu='.$colortextbackhmenu.
"\n";
310 print
'$colortextbackvmenu='.$colortextbackvmenu.
"\n";
311 print
'dol_hide_topmenu='.$dol_hide_topmenu.
"\n";
312 print
'dol_hide_leftmenu='.$dol_hide_leftmenu.
"\n";
313 print
'dol_optimize_smallscreen='.$dol_optimize_smallscreen.
"\n";
314 print
'dol_no_mouse_hover='.$dol_no_mouse_hover.
"\n";
315 print
'dol_screenwidth='.(empty($_SESSION[
'dol_screenwidth']) ?
'' : $_SESSION[
'dol_screenwidth']).
"\n";
316 print
'dol_screenheight='.(empty($_SESSION[
'dol_screenheight']) ?
'' : $_SESSION[
'dol_screenheight']).
"\n";
317 print
'fontsize='.$fontsize.
"\n";
318 print
'nbtopmenuentries='.$nbtopmenuentries.
"\n";
319 print
'fontsizesmaller='.$fontsizesmaller.
"\n";
320 print
'topMenuFontSize='.$topMenuFontSize.
"\n";
321 print
'toolTipBgColor='.$toolTipBgColor.
"\n";
322 print
'toolTipFontColor='.$toolTipFontColor.
"\n";
323 print
'conf->global->THEME_SATURATE_RATIO='.(empty($conf->global->THEME_SATURATE_RATIO) ?
'' : $conf->global->THEME_SATURATE_RATIO).
" (must be between 0 and 1)\n";
328 require __DIR__.
'/global.inc.php';
331 if (is_object($db)) {
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 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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.