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';
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';
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';
207 global $langs, $conf, $user;
209 $canreadperms =
true;
210 if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
211 $canreadperms = ($user->admin || $user->rights->user->group_advance->readperms);
217 $head[$h][0] = DOL_URL_ROOT.
'/user/group/card.php?id='.$object->id;
218 $head[$h][1] = $langs->trans(
"Card");
219 $head[$h][2] =
'group';
222 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
223 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
224 $langs->load(
"ldap");
225 $head[$h][0] = DOL_URL_ROOT.
'/user/group/ldap.php?id='.$object->id;
226 $head[$h][1] = $langs->trans(
"LDAPCard");
227 $head[$h][2] =
'ldap';
232 $head[$h][0] = DOL_URL_ROOT.
'/user/group/perms.php?id='.$object->id;
233 $head[$h][1] = $langs->trans(
"GroupRights").
'<span class="badge marginleftonlyshort">'.($object->nb_rights).
'</span>';
234 $head[$h][2] =
'rights';
256 global $langs, $conf, $user, $db;
259 $extrafields->fetch_name_optionals_label(
'user');
260 $extrafields->fetch_name_optionals_label(
'usergroup');
262 $langs->load(
"users");
266 $head[$h][0] = DOL_URL_ROOT.
'/admin/user.php';
267 $head[$h][1] = $langs->trans(
"Parameters");
268 $head[$h][2] =
'card';
271 $head[$h][0] = DOL_URL_ROOT.
'/admin/usergroup.php';
272 $head[$h][1] = $langs->trans(
"Group");
273 $head[$h][2] =
'usergroupcard';
276 $head[$h][0] = DOL_URL_ROOT.
'/user/admin/user_extrafields.php';
277 $head[$h][1] = $langs->trans(
"ExtraFields").
" (".$langs->trans(
"Users").
")";
278 $nbExtrafields = $extrafields->attributes[
'user'][
'count'];
279 if ($nbExtrafields > 0) {
280 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
282 $head[$h][2] =
'attributes';
285 $head[$h][0] = DOL_URL_ROOT.
'/user/admin/group_extrafields.php';
286 $head[$h][1] = $langs->trans(
"ExtraFields").
" (".$langs->trans(
"Groups").
")";
287 $nbExtrafields = $extrafields->attributes[
'usergroup'][
'count'];
288 if ($nbExtrafields > 0) {
289 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
291 $head[$h][2] =
'attributes_group';
313 function 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>';
546 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
551 print
yn($conf->global->MAIN_SHOW_LOGO);
553 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
562 if ($foruserprofile) {
564 print
'<tr class="oddeven">';
565 print
'<td>'.$langs->trans(
"UseBorderOnTable").
'</td>';
566 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
571 print
yn($conf->global->THEME_ELDY_USEBORDERONTABLE);
573 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
579 if ($foruserprofile) {
602 print
'<tr class="oddeven">';
603 print
'<td>'.$langs->trans(
"BackgroundColor").
'</td>';
604 print
'<td colspan="'.($colspan - 1).
'">';
607 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BACKBODY) ? $conf->global->THEME_ELDY_BACKBODY :
''), array()),
''),
'THEME_ELDY_BACKBODY',
'', 1,
'',
'',
'colorbackbody', $default).
' ';
611 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
613 print $langs->trans(
"Default");
616 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
617 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
623 if ($foruserprofile) {
647 print
'<tr class="oddeven">';
648 print
'<td>'.$langs->trans(
"TopMenuBackgroundColor").
'</td>';
649 print
'<td colspan="'.($colspan - 1).
'">';
651 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', $default).
' ';
655 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
657 print $langs->trans(
"Default");
660 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
661 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
667 if ($foruserprofile) {
691 print
'<tr class="oddeven">';
692 print
'<td>'.$langs->trans(
"LeftMenuBackgroundColor").
'</td>';
693 print
'<td colspan="'.($colspan - 1).
'">';
695 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', $default).
' ';
699 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
701 print $langs->trans(
"Default");
704 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
705 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
711 if ($foruserprofile) {
715 print
'<tr class="oddeven">';
716 print
'<td>'.$langs->trans(
"TextTitleColor").
'</td>';
717 print
'<td colspan="'.($colspan - 1).
'">';
719 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $conf->global->THEME_ELDY_TEXTTITLENOTAB :
''), array()),
''),
'THEME_ELDY_TEXTTITLENOTAB',
'', 1,
'',
'',
'colortexttitlenotab', $default).
' ';
721 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans(
"Default"));
723 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
724 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
731 if ($foruserprofile) {
735 print
'<tr class="oddeven">';
736 print
'<td>'.$langs->trans(
"BackgroundTableTitleColor").
'</td>';
737 print
'<td colspan="'.($colspan - 1).
'">';
739 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BACKTITLE1) ? $conf->global->THEME_ELDY_BACKTITLE1 :
''), array()),
''),
'THEME_ELDY_BACKTITLE1',
'', 1,
'',
'',
'colorbacktitle1', $default).
' ';
741 print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans(
"Default"));
743 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
744 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
751 if ($foruserprofile) {
755 print
'<tr class="oddeven">';
756 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextColor").
'</td>';
757 print
'<td colspan="'.($colspan - 1).
'">';
759 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLE) ? $conf->global->THEME_ELDY_TEXTTITLE :
''), array()),
''),
'THEME_ELDY_TEXTTITLE',
'', 1,
'',
'',
'colortexttitle', $default).
' ';
761 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans(
"Default"));
763 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
764 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
771 if ($foruserprofile) {
775 print
'<tr class="oddeven">';
776 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextlinkColor").
'</td>';
777 print
'<td colspan="'.($colspan - 1).
'">';
779 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $conf->global->THEME_ELDY_TEXTTITLELINK :
''), array()),
''),
'THEME_ELDY_TEXTTITLELINK',
'', 1,
'',
'',
'colortexttitlelink', $default).
' ';
781 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans(
"Default"));
783 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
784 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
792 if ($foruserprofile) {
796 print
'<tr class="oddeven">';
797 print
'<td>'.$langs->trans(
"BackgroundTableLineOddColor").
'</td>';
798 print
'<td colspan="'.($colspan - 1).
'">';
800 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_LINEIMPAIR1) ? $conf->global->THEME_ELDY_LINEIMPAIR1 :
''), array()),
''),
'THEME_ELDY_LINEIMPAIR1',
'', 1,
'',
'',
'colorbacklineimpair2', $default).
' ';
804 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
806 print $langs->trans(
"Default");
809 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
810 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
816 if ($foruserprofile) {
820 print
'<tr class="oddeven">';
821 print
'<td>'.$langs->trans(
"BackgroundTableLineEvenColor").
'</td>';
822 print
'<td colspan="'.($colspan - 1).
'">';
824 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_LINEPAIR1) ? $conf->global->THEME_ELDY_LINEPAIR1 :
''), array()),
''),
'THEME_ELDY_LINEPAIR1',
'', 1,
'',
'',
'colorbacklinepair2', $default).
' ';
828 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
830 print $langs->trans(
"Default");
833 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
834 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
840 if ($foruserprofile) {
864 print
'<tr class="oddeven">';
865 print
'<td>'.$langs->trans(
"LinkColor").
'</td>';
866 print
'<td colspan="'.($colspan - 1).
'">';
868 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTLINK) ? $conf->global->THEME_ELDY_TEXTLINK :
''), array()),
''),
'THEME_ELDY_TEXTLINK',
'', 1,
'',
'',
'colortextlink', $default).
' ';
872 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
876 print $langs->trans(
"Default");
879 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
880 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
886 if ($foruserprofile) {
900 print
'<tr class="oddeven">';
901 print
'<td>'.$langs->trans(
"HighlightLinesColor").
'</td>';
902 print
'<td colspan="'.($colspan - 1).
'">';
906 if (!empty($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER ==
'1') {
911 print $formother->selectColor($color,
'THEME_ELDY_USE_HOVER',
'', 1,
'',
'',
'colorbacklinepairhover', $default).
' ';
913 if ($conf->global->THEME_ELDY_USE_HOVER ==
'1') {
920 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
922 print $langs->trans(
"Default");
925 print $langs->trans(
"Default");
928 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
929 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
934 if ($foruserprofile) {
948 print
'<tr class="oddeven">';
949 print
'<td>'.$langs->trans(
"HighlightLinesChecked").
'</td>';
950 print
'<td colspan="'.($colspan - 1).
'">';
954 if (!empty($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED ==
'1') {
959 print $formother->selectColor($color,
'THEME_ELDY_USE_CHECKED',
'', 1,
'',
'',
'colorbacklinepairchecked', $default).
' ';
961 if ($conf->global->THEME_ELDY_USE_CHECKED ==
'1') {
967 if ($color !=
'e6edf0') {
968 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
970 print $langs->trans(
"Default");
973 print $langs->trans(
"Default");
976 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
977 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
983 if ($foruserprofile) {
1007 print
'<tr class="oddeven">';
1008 print
'<td>'.$langs->trans(
"BtnActionColor").
'</td>';
1009 print
'<td colspan="'.($colspan - 1).
'">';
1011 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION :
''), array()),
''),
'THEME_ELDY_BTNACTION',
'', 1,
'',
'',
'butactionbg', $default).
' ';
1015 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1019 print $langs->trans(
"Default");
1022 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
1023 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1029 if ($foruserprofile) {
1053 print
'<tr class="oddeven">';
1054 print
'<td>'.$langs->trans(
"TextBtnActionColor").
'</td>';
1055 print
'<td colspan="'.($colspan - 1).
'">';
1057 print $formother->selectColor(
colorArrayToHex(
colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION :
''), array()),
''),
'THEME_ELDY_TEXTBTNACTION',
'', 1,
'',
'',
'textbutaction', $default).
' ';
1061 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1065 print $langs->trans(
"Default");
1068 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #000">'.$default.
'</span></strong> ';
1069 print
$form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1075 if ($foruserprofile) {
1077 $default = $langs->trans(
'No');
1078 print
'<tr class="oddeven">';
1079 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSER").
'</td>';
1080 print
'<td colspan="'.($colspan - 1).
'">';
1083 print
$form->selectyesno(
'MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1);
1085 if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1086 print
yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0);
1089 if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1090 print
' ('.$langs->trans(
"ForcedByGlobalSetup").
')';
1094 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1095 print
$form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
1120 if ($foruserprofile) {
1122 $default = $langs->trans(
'No');
1123 print
'<tr class="oddeven">';
1124 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORCOLORBLIND").
'</td>';
1125 print
'<td colspan="'.($colspan - 1).
'">';
1127 $colorBlindOptions = array(
1128 0 => $langs->trans(
'No'),
1129 'flashy' => $langs->trans(
'Flashy'),
1130 'protanopia' => $langs->trans(
'Protanopia'),
1131 'deuteranopes' => $langs->trans(
'Deuteranopes'),
1132 'tritanopes' => $langs->trans(
'Tritanopes'),
1136 print
$form->selectArray(
'MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0);
1138 if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
1139 print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND];
1144 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1145 print
$form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORCOLORBLINDDesc"));