37 global $langs, $conf, $user, $db;
39 $langs->load(
"users");
42 if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
43 $canreadperms = ($user->admin || ($user->id != $object->id && $user->hasRight(
'user',
'user_advance',
'readperms')) || ($user->id == $object->id && $user->hasRight(
'user',
'self_advance',
'readperms')));
49 $head[$h][0] = DOL_URL_ROOT.
'/user/card.php?id='.$object->id;
50 $head[$h][1] = $langs->trans(
"User");
51 $head[$h][2] =
'user';
54 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
55 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
57 $head[$h][0] = DOL_URL_ROOT.
'/user/ldap.php?id='.$object->id;
58 $head[$h][1] = $langs->trans(
"LDAPCard");
59 $head[$h][2] =
'ldap';
64 $head[$h][0] = DOL_URL_ROOT.
'/user/perms.php?id='.$object->id;
65 $head[$h][1] = $langs->trans(
"Rights").(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'<span class="badge marginleftonlyshort">'.($object->nb_rights).
'</span>' :
'');
66 $head[$h][2] =
'rights';
70 $head[$h][0] = DOL_URL_ROOT.
'/user/param_ihm.php?id='.$object->id;
71 $head[$h][1] = $langs->trans(
"UserGUISetup");
72 $head[$h][2] =
'guisetup';
75 if (isModEnabled(
'agenda')) {
76 if (empty($conf->global->AGENDA_EXT_NB)) {
77 $conf->global->AGENDA_EXT_NB = 5;
79 $MAXAGENDA = $conf->global->AGENDA_EXT_NB;
83 while ($i <= $MAXAGENDA) {
85 $name =
'AGENDA_EXT_NAME_'.$object->id.
'_'.$key;
86 $src =
'AGENDA_EXT_SRC_'.$object->id.
'_'.$key;
87 $offsettz =
'AGENDA_EXT_OFFSETTZ_'.$object->id.
'_'.$key;
88 $color =
'AGENDA_EXT_COLOR_'.$object->id.
'_'.$key;
91 if (!empty($object->conf->$name)) {
96 $head[$h][0] = DOL_URL_ROOT.
'/user/agenda_extsites.php?id='.$object->id;
97 $head[$h][1] = $langs->trans(
"ExtSites").($nbagenda ?
'<span class="badge marginleftonlyshort">'.$nbagenda.
'</span>' :
'');
98 $head[$h][2] =
'extsites';
102 if (isModEnabled(
'clicktodial')) {
103 $head[$h][0] = DOL_URL_ROOT.
'/user/clicktodial.php?id='.$object->id;
104 $head[$h][1] = $langs->trans(
"ClickToDial");
105 $head[$h][2] =
'clicktodial';
110 if ($user->socid == 0 && isModEnabled(
'notification')) {
112 $sql =
"SELECT COUNT(n.rowid) as nb";
113 $sql .=
" FROM ".MAIN_DB_PREFIX.
"notify_def as n";
114 $sql .=
" WHERE fk_user = ".((int) $object->id);
115 $resql = $db->query($sql);
117 $num = $db->num_rows($resql);
120 $obj = $db->fetch_object($resql);
128 $langs->load(
"mails");
129 $head[$h][0] = DOL_URL_ROOT.
'/user/notify/card.php?id='.$object->id;
130 $head[$h][1] = $langs->trans(
"NotificationsAuto");
132 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
134 $head[$h][2] =
'notify';
144 if ((isModEnabled(
'salaries') && !empty($user->rights->salaries->read))
145 || (isModEnabled(
'hrm') && !empty($user->rights->hrm->employee->read))
146 || (isModEnabled(
'expensereport') && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall))
147 || (isModEnabled(
'holiday') && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->readall))
150 $head[$h][0] = DOL_URL_ROOT.
'/user/bank.php?id='.$object->id;
151 $head[$h][1] = $langs->trans(
"HRAndBank");
152 $head[$h][2] =
'bank';
157 if (empty($user->socid)) {
160 if (!empty($object->note_public)) {
163 if (!empty($object->note_private)) {
166 $head[$h][0] = DOL_URL_ROOT.
'/user/note.php?id='.$object->id;
167 $head[$h][1] = $langs->trans(
"Note");
169 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
171 $head[$h][2] =
'note';
175 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
176 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
177 $upload_dir = $conf->user->dir_output.
"/".$object->id;
178 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
179 $nbLinks =
Link::count($db, $object->element, $object->id);
180 $head[$h][0] = DOL_URL_ROOT.
'/user/document.php?userid='.$object->id;
181 $head[$h][1] = $langs->trans(
"Documents");
182 if (($nbFiles + $nbLinks) > 0) {
183 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
185 $head[$h][2] =
'document';
188 $head[$h][0] = DOL_URL_ROOT.
'/user/info.php?id='.$object->id;
189 $head[$h][1] = $langs->trans(
"Info");
190 $head[$h][2] =
'info';
313function showSkins($fuser, $edit = 0, $foruserprofile =
false)
315 global $conf, $langs, $db, $form;
317 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
321 $dirthemes = array(
'/theme');
322 if (!empty($conf->modules_parts[
'theme'])) {
323 foreach ($conf->modules_parts[
'theme'] as $reldir) {
324 $dirthemes = array_merge($dirthemes, (array) ($reldir.
'theme'));
327 $dirthemes = array_unique($dirthemes);
330 $selected_theme =
'';
331 if (empty($foruserprofile)) {
332 $selected_theme = $conf->global->MAIN_THEME;
334 $selected_theme = ((is_object($fuser) && !empty($fuser->conf->MAIN_THEME)) ? $fuser->conf->MAIN_THEME :
'');
338 if (empty($foruserprofile)) {
339 $hoverdisabled = (isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER ==
'0');
341 $hoverdisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER ==
'0') :
'');
344 $checkeddisabled =
'';
345 if (empty($foruserprofile)) {
346 $checkeddisabled = (isset($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED ==
'0');
348 $checkeddisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_CHECKED) || $fuser->conf->THEME_ELDY_USE_CHECKED ==
'0') :
'');
352 if ($foruserprofile) {
357 print
'<div class="div-table-responsive-no-min">';
358 print
'<table class="noborder centpercent'.($edit ?
' editmodeforshowskin' :
'').
'">';
361 if ($foruserprofile) {
362 print
'<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</th><th>'.$langs->trans(
"DefaultValue").
'</th>';
363 print
'<th colspan="2"> </th>';
367 print
'<td>'.$langs->trans(
"DefaultSkin").
'</td>';
368 print
'<td>'.$conf->global->MAIN_THEME.
'</td>';
369 print
'<td class="nowrap left"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit ?
'' :
' disabled').
' type="checkbox" '.($selected_theme ?
" checked" :
"").
'> <label for="check_MAIN_THEME">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
370 print
'<td> </td>';
373 $dirthemestring =
'';
374 foreach ($dirthemes as $dirtheme) {
375 $dirthemestring .=
'"'.$dirtheme.
'" ';
378 print
'<tr class="liste_titre"><th class="titlefieldmiddle">';
379 print $form->textwithpicto($langs->trans(
"DefaultSkin"), $langs->trans(
"ThemeDir").
' : '.$dirthemestring);
381 print
'<th class="right">';
382 $url =
'https://www.dolistore.com/9-skins';
383 print
'<a href="'.$url.
'" target="_blank" rel="noopener noreferrer external">';
384 print $langs->trans(
'DownloadMoreSkins');
385 print
img_picto(
'',
'globe',
'class="paddingleft"');
390 print
'<tr><td colspan="'.$colspan.
'" class="center">';
392 if (!empty($conf->global->MAIN_FORCETHEME)) {
393 $langs->load(
"errors");
394 print $langs->trans(
"WarningThemeForcedTo", $conf->global->MAIN_FORCETHEME);
397 print
'<table class="nobordernopadding centpercent"><tr><td><div class="center">';
400 foreach ($dirthemes as $dir) {
405 if (is_dir($dirtheme)) {
406 $handle = opendir($dirtheme);
407 if (is_resource($handle)) {
408 while (($subdir = readdir($handle)) !==
false) {
409 if (is_dir($dirtheme.
"/".$subdir) && substr($subdir, 0, 1) <>
'.'
410 && substr($subdir, 0, 3) <>
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
412 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2 && preg_match(
'/_dev$/i', $subdir)) {
415 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1 && preg_match(
'/_exp$/i', $subdir)) {
419 print
'<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
420 $file = $dirtheme.
"/".$subdir.
"/thumb.png";
421 $url = $urltheme.
"/".$subdir.
"/thumb.png";
422 if (!file_exists($file)) {
423 $url = DOL_URL_ROOT.
'/public/theme/common/nophoto.png';
425 print
'<a href="'.$_SERVER[
"PHP_SELF"].($edit ?
'?action=edit&token='.newToken().
'&mode=template&theme=' :
'?theme=').$subdir.(GETPOST(
'optioncss',
'alpha', 1) ?
'&optioncss='.GETPOST(
'optioncss',
'alpha', 1) :
'').($fuser ?
'&id='.$fuser->id :
'').
'" style="font-weight: normal;" alt="'.$langs->trans(
"Preview").
'">';
426 if ($subdir == $conf->global->MAIN_THEME) {
427 $title = $langs->trans(
"ThemeCurrentlyActive");
429 $title = $langs->trans(
"ShowPreview");
431 print
'<img class="img-skinthumb shadow" src="'.$url.
'" alt="'.
dol_escape_htmltag($title).
'" title="'.
dol_escape_htmltag($title).
'" style="border: none; margin-bottom: 5px;">';
433 if ($subdir == $selected_theme) {
434 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.
'" checked name="main_theme" value="'.$subdir.
'"><label for="main_theme'.$subdir.
'"> <b>'.$subdir.
'</b></label>';
436 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.
'" name="main_theme" value="'.$subdir.
'"><label for="main_theme'.$subdir.
'"> '.$subdir.
'</label>';
447 print
'</div></td></tr></table>';
452 $colorbackhmenu1 =
'';
453 $colorbackvmenu1 =
'';
454 $colortexttitlenotab =
'';
455 $colortexttitlelink =
'';
456 $colorbacktitle1 =
'';
457 $colortexttitle =
'';
458 $colorbacklineimpair1 =
'';
459 $colorbacklineimpair2 =
'';
460 $colorbacklinepair1 =
'';
461 $colorbacklinepair2 =
'';
463 $colorbacklinepairhover =
'';
464 $colorbacklinepairhover =
'';
465 $colorbacklinepairchecked =
'';
469 if (file_exists(DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php')) {
470 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
474 if ($foruserprofile) {
477 $listofdarkmodes = array(
478 '0' => $langs->trans(
"AlwaysDisabled"),
479 '1' => $langs->trans(
"AccordingToBrowser"),
480 '2' => $langs->trans(
"AlwaysEnabled")
482 print
'<tr class="oddeven">';
483 print
'<td>'.$langs->trans(
"DarkThemeMode").
'</td>';
484 print
'<td colspan="'.($colspan - 1).
'">';
486 print $form->selectarray(
'THEME_DARKMODEENABLED', $listofdarkmodes, isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0);
488 print $listofdarkmodes[isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0];
490 print $form->textwithpicto(
'', $langs->trans(
"DoesNotWorkWithAllThemes"));
496 if ($foruserprofile) {
518 $listoftopmenumodes = array(
519 '0' => $langs->transnoentitiesnoconv(
"IconAndText"),
520 '1' => $langs->transnoentitiesnoconv(
"TextOnly"),
521 '2' => $langs->transnoentitiesnoconv(
"IconOnlyAllTextsOnHover"),
522 '3' => $langs->transnoentitiesnoconv(
"IconOnlyTextOnHover"),
523 '4' => $langs->transnoentitiesnoconv(
"IconOnly"),
525 print
'<tr class="oddeven">';
526 print
'<td>'.$langs->trans(
"TopMenuDisableImages").
'</td>';
527 print
'<td colspan="'.($colspan - 1).
'">';
530 print $form->selectarray(
'THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, isset($conf->global->THEME_TOPMENU_DISABLE_IMAGE)?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:0, 0, 0, 0,
'', 0, 0, 0,
'',
'widthcentpercentminusx maxwidth500');
532 $listoftopmenumodes[$conf->global->THEME_TOPMENU_DISABLE_IMAGE];
535 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"));
541 if ($foruserprofile) {
545 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"EnableShowLogo").
'</td><td>';
547 print ajax_constantonoff(
'MAIN_SHOW_LOGO', array(),
null, 0, 0, 1);
550 print
yn($conf->global->MAIN_SHOW_LOGO);
552 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"));
561 if ($foruserprofile) {
563 print
'<tr class="oddeven">';
564 print
'<td>'.$langs->trans(
"UseBorderOnTable").
'</td>';
565 print
'<td colspan="'.($colspan - 1).
'">';
567 print ajax_constantonoff(
'THEME_ELDY_USEBORDERONTABLE', array(),
null, 0, 0, 1);
570 print
yn($conf->global->THEME_ELDY_USEBORDERONTABLE);
572 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"));
578 if ($foruserprofile) {
600 print
'<tr class="oddeven">';
601 print
'<td>'.$langs->trans(
"BackgroundColor").
'</td>';
602 print
'<td colspan="'.($colspan - 1).
'">';
605 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BACKBODY) ? $conf->global->THEME_ELDY_BACKBODY :
''), array()),
''),
'THEME_ELDY_BACKBODY',
'', 1,
'',
'',
'colorbackbody').
' ';
609 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
611 print $langs->trans(
"Default");
614 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>ffffff</strong> ';
615 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
621 if ($foruserprofile) {
645 print
'<tr class="oddeven">';
646 print
'<td>'.$langs->trans(
"TopMenuBackgroundColor").
'</td>';
647 print
'<td colspan="'.($colspan - 1).
'">';
649 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TOPMENU_BACK1) ? $conf->global->THEME_ELDY_TOPMENU_BACK1 :
''), array()),
''),
'THEME_ELDY_TOPMENU_BACK1',
'', 1,
'',
'',
'colorbackhmenu1').
' ';
653 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
655 print $langs->trans(
"Default");
658 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
659 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
665 if ($foruserprofile) {
689 print
'<tr class="oddeven">';
690 print
'<td>'.$langs->trans(
"LeftMenuBackgroundColor").
'</td>';
691 print
'<td colspan="'.($colspan - 1).
'">';
693 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_VERMENU_BACK1) ? $conf->global->THEME_ELDY_VERMENU_BACK1 :
''), array()),
''),
'THEME_ELDY_VERMENU_BACK1',
'', 1,
'',
'',
'colorbackvmenu1').
' ';
697 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
699 print $langs->trans(
"Default");
702 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
703 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
709 if ($foruserprofile) {
713 print
'<tr class="oddeven">';
714 print
'<td>'.$langs->trans(
"TextTitleColor").
'</td>';
715 print
'<td colspan="'.($colspan - 1).
'">';
717 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $conf->global->THEME_ELDY_TEXTTITLENOTAB :
''), array()),
''),
'THEME_ELDY_TEXTTITLENOTAB',
'', 1,
'',
'',
'colortexttitlenotab').
' ';
719 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans(
"Default"));
721 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
722 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
729 if ($foruserprofile) {
733 print
'<tr class="oddeven">';
734 print
'<td>'.$langs->trans(
"BackgroundTableTitleColor").
'</td>';
735 print
'<td colspan="'.($colspan - 1).
'">';
737 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BACKTITLE1) ? $conf->global->THEME_ELDY_BACKTITLE1 :
''), array()),
''),
'THEME_ELDY_BACKTITLE1',
'', 1,
'',
'',
'colorbacktitle1').
' ';
739 print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans(
"Default"));
741 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
742 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
749 if ($foruserprofile) {
753 print
'<tr class="oddeven">';
754 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextColor").
'</td>';
755 print
'<td colspan="'.($colspan - 1).
'">';
757 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLE) ? $conf->global->THEME_ELDY_TEXTTITLE :
''), array()),
''),
'THEME_ELDY_TEXTTITLE',
'', 1,
'',
'',
'colortexttitle').
' ';
759 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans(
"Default"));
761 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
762 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
769 if ($foruserprofile) {
773 print
'<tr class="oddeven">';
774 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextlinkColor").
'</td>';
775 print
'<td colspan="'.($colspan - 1).
'">';
777 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $conf->global->THEME_ELDY_TEXTTITLELINK :
''), array()),
''),
'THEME_ELDY_TEXTTITLELINK',
'', 1,
'',
'',
'colortexttitlelink').
' ';
779 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans(
"Default"));
781 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
782 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
790 if ($foruserprofile) {
794 print
'<tr class="oddeven">';
795 print
'<td>'.$langs->trans(
"BackgroundTableLineOddColor").
'</td>';
796 print
'<td colspan="'.($colspan - 1).
'">';
798 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_LINEIMPAIR1) ? $conf->global->THEME_ELDY_LINEIMPAIR1 :
''), array()),
''),
'THEME_ELDY_LINEIMPAIR1',
'', 1,
'',
'',
'colorbacklineimpair2').
' ';
802 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
804 print $langs->trans(
"Default");
807 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
808 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
814 if ($foruserprofile) {
818 print
'<tr class="oddeven">';
819 print
'<td>'.$langs->trans(
"BackgroundTableLineEvenColor").
'</td>';
820 print
'<td colspan="'.($colspan - 1).
'">';
822 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_LINEPAIR1) ? $conf->global->THEME_ELDY_LINEPAIR1 :
''), array()),
''),
'THEME_ELDY_LINEPAIR1',
'', 1,
'',
'',
'colorbacklinepair2').
' ';
826 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
828 print $langs->trans(
"Default");
831 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
832 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
838 if ($foruserprofile) {
862 print
'<tr class="oddeven">';
863 print
'<td>'.$langs->trans(
"LinkColor").
'</td>';
864 print
'<td colspan="'.($colspan - 1).
'">';
866 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTLINK) ? $conf->global->THEME_ELDY_TEXTLINK :
''), array()),
''),
'THEME_ELDY_TEXTLINK',
'', 1,
'',
'',
'colortextlink').
' ';
870 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
874 print $langs->trans(
"Default");
877 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
878 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
884 if ($foruserprofile) {
898 print
'<tr class="oddeven">';
899 print
'<td>'.$langs->trans(
"HighlightLinesColor").
'</td>';
900 print
'<td colspan="'.($colspan - 1).
'">';
904 if (!empty($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER ==
'1') {
909 print $formother->selectColor($color,
'THEME_ELDY_USE_HOVER',
'', 1,
'',
'',
'colorbacklinepairhover').
' ';
911 if ($conf->global->THEME_ELDY_USE_HOVER ==
'1') {
918 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
920 print $langs->trans(
"Default");
923 print $langs->trans(
"Default");
926 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
927 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
932 if ($foruserprofile) {
946 print
'<tr class="oddeven">';
947 print
'<td>'.$langs->trans(
"HighlightLinesChecked").
'</td>';
948 print
'<td colspan="'.($colspan - 1).
'">';
952 if (!empty($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED ==
'1') {
957 print $formother->selectColor($color,
'THEME_ELDY_USE_CHECKED',
'', 1,
'',
'',
'colorbacklinepairchecked').
' ';
959 if ($conf->global->THEME_ELDY_USE_CHECKED ==
'1') {
965 if ($color !=
'e6edf0') {
966 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
968 print $langs->trans(
"Default");
971 print $langs->trans(
"Default");
974 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
975 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
981 if ($foruserprofile) {
1005 print
'<tr class="oddeven">';
1006 print
'<td>'.$langs->trans(
"BtnActionColor").
'</td>';
1007 print
'<td colspan="'.($colspan - 1).
'">';
1009 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION :
''), array()),
''),
'THEME_ELDY_BTNACTION',
'', 1,
'',
'',
'butactionbg').
' ';
1013 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1017 print $langs->trans(
"Default");
1020 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
1021 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1027 if ($foruserprofile) {
1051 print
'<tr class="oddeven">';
1052 print
'<td>'.$langs->trans(
"TextBtnActionColor").
'</td>';
1053 print
'<td colspan="'.($colspan - 1).
'">';
1055 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION :
''), array()),
''),
'THEME_ELDY_TEXTBTNACTION',
'', 1,
'',
'',
'textbutaction').
' ';
1059 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1063 print $langs->trans(
"Default");
1066 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #000">'.$default.
'</span></strong> ';
1067 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1073 if ($foruserprofile) {
1075 $default = $langs->trans(
'No');
1076 print
'<tr class="oddeven">';
1077 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSER").
'</td>';
1078 print
'<td colspan="'.($colspan - 1).
'">';
1081 print $form->selectyesno(
'MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1);
1083 if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1084 print
yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0);
1087 if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1088 print
' ('.$langs->trans(
"ForcedByGlobalSetup").
')';
1092 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1093 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
1118 if ($foruserprofile) {
1120 $default = $langs->trans(
'No');
1121 print
'<tr class="oddeven">';
1122 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORCOLORBLIND").
'</td>';
1123 print
'<td colspan="'.($colspan - 1).
'">';
1125 $colorBlindOptions = array(
1126 0 => $langs->trans(
'No'),
1127 'flashy' => $langs->trans(
'Flashy'),
1128 'protanopia' => $langs->trans(
'Protanopia'),
1129 'deuteranopes' => $langs->trans(
'Deuteranopes'),
1130 'tritanopes' => $langs->trans(
'Tritanopes'),
1134 print $form->selectArray(
'MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0);
1136 if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
1137 print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND];
1142 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1143 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORCOLORBLINDDesc"));