36 global $langs, $conf, $user, $db;
38 $langs->load(
"users");
41 if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
42 $canreadperms = ($user->admin || ($user->id != $object->id && $user->rights->user->user_advance->readperms) || ($user->id == $object->id && $user->rights->user->self_advance->readperms));
48 $head[$h][0] = DOL_URL_ROOT.
'/user/card.php?id='.$object->id;
49 $head[$h][1] = $langs->trans(
"User");
50 $head[$h][2] =
'user';
53 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
54 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
56 $head[$h][0] = DOL_URL_ROOT.
'/user/ldap.php?id='.$object->id;
57 $head[$h][1] = $langs->trans(
"LDAPCard");
58 $head[$h][2] =
'ldap';
63 $head[$h][0] = DOL_URL_ROOT.
'/user/perms.php?id='.$object->id;
64 $head[$h][1] = $langs->trans(
"Rights").(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'<span class="badge marginleftonlyshort">'.($object->nb_rights).
'</span>' :
'');
65 $head[$h][2] =
'rights';
69 $head[$h][0] = DOL_URL_ROOT.
'/user/param_ihm.php?id='.$object->id;
70 $head[$h][1] = $langs->trans(
"UserGUISetup");
71 $head[$h][2] =
'guisetup';
74 if (!empty($conf->agenda->enabled)) {
75 if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5;
76 $MAXAGENDA = $conf->global->AGENDA_EXT_NB;
80 while ($i <= $MAXAGENDA) {
82 $name =
'AGENDA_EXT_NAME_'.$object->id.
'_'.$key;
83 $src =
'AGENDA_EXT_SRC_'.$object->id.
'_'.$key;
84 $offsettz =
'AGENDA_EXT_OFFSETTZ_'.$object->id.
'_'.$key;
85 $color =
'AGENDA_EXT_COLOR_'.$object->id.
'_'.$key;
88 if (!empty($object->conf->$name)) $nbagenda++;
91 $head[$h][0] = DOL_URL_ROOT.
'/user/agenda_extsites.php?id='.$object->id;
92 $head[$h][1] = $langs->trans(
"ExtSites").($nbagenda ?
'<span class="badge marginleftonlyshort">'.$nbagenda.
'</span>' :
'');
93 $head[$h][2] =
'extsites';
97 if (!empty($conf->clicktodial->enabled)) {
98 $head[$h][0] = DOL_URL_ROOT.
'/user/clicktodial.php?id='.$object->id;
99 $head[$h][1] = $langs->trans(
"ClickToDial");
100 $head[$h][2] =
'clicktodial';
105 if ($user->socid == 0 && !empty($conf->notification->enabled)) {
107 $sql =
"SELECT COUNT(n.rowid) as nb";
108 $sql .=
" FROM ".MAIN_DB_PREFIX.
"notify_def as n";
109 $sql .=
" WHERE fk_user = ".$object->id;
110 $resql = $db->query($sql);
112 $num = $db->num_rows(
$resql);
115 $obj = $db->fetch_object(
$resql);
123 $langs->load(
"mails");
124 $head[$h][0] = DOL_URL_ROOT.
'/user/notify/card.php?id='.$object->id;
125 $head[$h][1] = $langs->trans(
"NotificationsAuto");
126 if ($nbNote > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
127 $head[$h][2] =
'notify';
137 if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
138 || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))
139 || (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall))
140 || (!empty($conf->holiday->enabled) && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->readall))
143 $head[$h][0] = DOL_URL_ROOT.
'/user/bank.php?id='.$object->id;
144 $head[$h][1] = $langs->trans(
"HRAndBank");
145 $head[$h][2] =
'bank';
150 if (empty($user->socid)) {
153 if (!empty($object->note)) $nbNote++;
154 $head[$h][0] = DOL_URL_ROOT.
'/user/note.php?id='.$object->id;
155 $head[$h][1] = $langs->trans(
"Note");
156 if ($nbNote > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
157 $head[$h][2] =
'note';
161 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
162 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
163 $upload_dir = $conf->user->dir_output.
"/".$object->id;
164 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
165 $nbLinks =
Link::count($db, $object->element, $object->id);
166 $head[$h][0] = DOL_URL_ROOT.
'/user/document.php?userid='.$object->id;
167 $head[$h][1] = $langs->trans(
"Documents");
168 if (($nbFiles + $nbLinks) > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
169 $head[$h][2] =
'document';
172 $head[$h][0] = DOL_URL_ROOT.
'/user/info.php?id='.$object->id;
173 $head[$h][1] = $langs->trans(
"Info");
174 $head[$h][2] =
'info';
191 global $langs, $conf, $user;
193 $canreadperms =
true;
194 if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
195 $canreadperms = ($user->admin || $user->rights->user->group_advance->readperms);
201 $head[$h][0] = DOL_URL_ROOT.
'/user/group/card.php?id='.$object->id;
202 $head[$h][1] = $langs->trans(
"GroupCard");
203 $head[$h][2] =
'group';
206 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
207 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
208 $langs->load(
"ldap");
209 $head[$h][0] = DOL_URL_ROOT.
'/user/group/ldap.php?id='.$object->id;
210 $head[$h][1] = $langs->trans(
"LDAPCard");
211 $head[$h][2] =
'ldap';
216 $head[$h][0] = DOL_URL_ROOT.
'/user/group/perms.php?id='.$object->id;
217 $head[$h][1] = $langs->trans(
"GroupRights").
'<span class="badge marginleftonlyshort">'.($object->nb_rights).
'</span>';
218 $head[$h][2] =
'rights';
240 global $langs, $conf, $user;
242 $langs->load(
"users");
246 $head[$h][0] = DOL_URL_ROOT.
'/admin/user.php';
247 $head[$h][1] = $langs->trans(
"Parameters");
248 $head[$h][2] =
'card';
251 $head[$h][0] = DOL_URL_ROOT.
'/admin/usergroup.php';
252 $head[$h][1] = $langs->trans(
"Group");
253 $head[$h][2] =
'usergroupcard';
256 $head[$h][0] = DOL_URL_ROOT.
'/user/admin/user_extrafields.php';
257 $head[$h][1] = $langs->trans(
"ExtraFields").
" (".$langs->trans(
"Users").
")";
258 $head[$h][2] =
'attributes';
261 $head[$h][0] = DOL_URL_ROOT.
'/user/admin/group_extrafields.php';
262 $head[$h][1] = $langs->trans(
"ExtraFields").
" (".$langs->trans(
"Groups").
")";
263 $head[$h][2] =
'attributes_group';
285 function showSkins($fuser, $edit = 0, $foruserprofile =
false)
287 global $conf, $langs, $db, $form;
289 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
293 $dirthemes = array(
'/theme');
294 if (!empty($conf->modules_parts[
'theme'])) {
295 foreach ($conf->modules_parts[
'theme'] as $reldir) {
296 $dirthemes = array_merge($dirthemes, (array) ($reldir.
'theme'));
299 $dirthemes = array_unique($dirthemes);
302 $selected_theme =
'';
303 if (empty($foruserprofile)) $selected_theme = $conf->global->MAIN_THEME;
304 else $selected_theme = ((is_object($fuser) && !empty($fuser->conf->MAIN_THEME)) ? $fuser->conf->MAIN_THEME :
'');
307 if (empty($foruserprofile)) $hoverdisabled = (isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER ==
'0');
308 else $hoverdisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER ==
'0') :
'');
310 $checkeddisabled =
'';
311 if (empty($foruserprofile)) $checkeddisabled = (isset($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED ==
'0');
312 else $checkeddisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_CHECKED) || $fuser->conf->THEME_ELDY_USE_CHECKED ==
'0') :
'');
315 if ($foruserprofile) $colspan = 4;
318 print '<div class="div-table-responsive-no-min">';
319 print '<table class="noborder centpercent'.($edit ?
' editmode' :
'').
' tableforfield">';
322 if ($foruserprofile) {
323 print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans(
"Parameter").
'</th><th>'.$langs->trans(
"DefaultValue").
'</th>';
324 print '<th colspan="2"> </th>';
328 print '<td>'.$langs->trans(
"DefaultSkin").
'</td>';
329 print '<td>'.$conf->global->MAIN_THEME.
'</td>';
330 print '<td class="nowrap left" width="20%"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit ?
'' :
' disabled').
' type="checkbox" '.($selected_theme ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
331 print '<td> </td>';
334 $dirthemestring =
'';
335 foreach ($dirthemes as $dirtheme) {
336 $dirthemestring .=
'"'.$dirtheme.
'" ';
339 print '<tr class="liste_titre"><th class="titlefield">';
340 print $form->textwithpicto($langs->trans(
"DefaultSkin"), $langs->trans(
"ThemeDir").
' : '.$dirthemestring);
342 print '<th class="right">';
343 $url =
'https://www.dolistore.com/9-skins';
344 print '<a href="'.$url.
'" target="_blank">';
345 print $langs->trans(
'DownloadMoreSkins');
350 print '<tr><td colspan="'.$colspan.
'">';
352 print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
355 foreach ($dirthemes as $dir) {
360 if (is_dir($dirtheme)) {
361 $handle = opendir($dirtheme);
362 if (is_resource($handle)) {
363 while (($subdir = readdir($handle)) !==
false) {
364 if (is_dir($dirtheme.
"/".$subdir) && substr($subdir, 0, 1) <>
'.'
365 && substr($subdir, 0, 3) <>
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
367 if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match(
'/_dev$/i', $subdir))
continue;
368 if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match(
'/_exp$/i', $subdir))
continue;
370 print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
371 $file = $dirtheme.
"/".$subdir.
"/thumb.png";
372 $url = $urltheme.
"/".$subdir.
"/thumb.png";
373 if (!file_exists($file)) $url = DOL_URL_ROOT.
'/public/theme/common/nophoto.png';
374 print '<a href="'.$_SERVER[
"PHP_SELF"].($edit ?
'?action=edit&theme=' :
'?theme=').$subdir.(GETPOST(
'optioncss',
'alpha', 1) ?
'&optioncss='.GETPOST(
'optioncss',
'alpha', 1) :
'').($fuser ?
'&id='.$fuser->id :
'').
'" style="font-weight: normal;" alt="'.$langs->trans(
"Preview").
'">';
375 if ($subdir == $conf->global->MAIN_THEME) $title = $langs->trans(
"ThemeCurrentlyActive");
376 else $title = $langs->trans(
"ShowPreview");
377 print '<img class="img-skinthumb shadow" src="'.$url.
'" alt="'.$title.
'" title="'.$title.
'" style="border: none; margin-bottom: 5px;">';
379 if ($subdir == $selected_theme) {
380 print '<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" checked name="main_theme" value="'.$subdir.
'"> <b>'.$subdir.
'</b>';
382 print '<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" name="main_theme" value="'.$subdir.
'"> '.$subdir;
393 print '</div></td></tr></table>';
398 $colorbackhmenu1 =
'';
399 $colorbackvmenu1 =
'';
400 $colortexttitlenotab =
'';
401 $colortexttitlelink =
'';
402 $colorbacktitle1 =
'';
403 $colortexttitle =
'';
404 $colorbacklineimpair1 =
'';
405 $colorbacklinepair1 =
'';
407 $colorbacklinepairhover =
'';
408 $colorbacklinepairhover =
'';
409 $colorbacklinepairchecked =
'';
410 if (file_exists(DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php')) {
411 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
415 if ($foruserprofile) {
419 print '<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"EnableShowLogo").
'</td><td>';
424 print yn($conf->global->MAIN_SHOW_LOGO);
435 if ($foruserprofile) {
457 $default = $langs->trans(
'No');
458 print '<tr class="oddeven">';
459 print '<td>'.$langs->trans(
"TopMenuDisableImages").
'</td>';
460 print '<td colspan="'.($colspan - 1).
'">';
465 print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
467 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
468 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
474 if ($foruserprofile) {
496 print '<tr class="oddeven">';
497 print '<td>'.$langs->trans(
"BackgroundColor").
'</td>';
498 print '<td colspan="'.($colspan - 1).
'">';
504 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
505 else print $langs->trans(
"Default");
507 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>ffffff</strong> ';
508 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
514 if ($foruserprofile) {
538 print '<tr class="oddeven">';
539 print '<td>'.$langs->trans(
"TopMenuBackgroundColor").
'</td>';
540 print '<td colspan="'.($colspan - 1).
'">';
542 print $formother->selectColor(
colorArrayToHex(
colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()),
''),
'THEME_ELDY_TOPMENU_BACK1',
'', 1,
'',
'',
'colorbackhmenu1').
' ';
545 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
546 else print $langs->trans(
"Default");
548 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
549 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
555 if ($foruserprofile) {
579 print '<tr class="oddeven">';
580 print '<td>'.$langs->trans(
"LeftMenuBackgroundColor").
'</td>';
581 print '<td colspan="'.($colspan - 1).
'">';
583 print $formother->selectColor(
colorArrayToHex(
colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()),
''),
'THEME_ELDY_VERMENU_BACK1',
'', 1,
'',
'',
'colorbackvmenu1').
' ';
586 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
587 else print $langs->trans(
"Default");
589 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
590 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
596 if ($foruserprofile) {
600 print '<tr class="oddeven">';
601 print '<td>'.$langs->trans(
"TextTitleColor").
'</td>';
602 print '<td colspan="'.($colspan - 1).
'">';
604 print $formother->selectColor(
colorArrayToHex(
colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()),
''),
'THEME_ELDY_TEXTTITLENOTAB',
'', 1,
'',
'',
'colortexttitlenotab').
' ';
606 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans(
"Default"));
608 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
609 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
616 if ($foruserprofile) {
620 print '<tr class="oddeven">';
621 print '<td>'.$langs->trans(
"BackgroundTableTitleColor").
'</td>';
622 print '<td colspan="'.($colspan - 1).
'">';
626 print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans(
"Default"));
628 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
629 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
636 if ($foruserprofile) {
640 print '<tr class="oddeven">';
641 print '<td>'.$langs->trans(
"BackgroundTableTitleTextColor").
'</td>';
642 print '<td colspan="'.($colspan - 1).
'">';
646 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans(
"Default"));
648 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
649 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
656 if ($foruserprofile) {
660 print '<tr class="oddeven">';
661 print '<td>'.$langs->trans(
"BackgroundTableTitleTextlinkColor").
'</td>';
662 print '<td colspan="'.($colspan - 1).
'">';
664 print $formother->selectColor(
colorArrayToHex(
colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()),
''),
'THEME_ELDY_TEXTTITLELINK',
'', 1,
'',
'',
'colortexttitlelink').
' ';
666 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans(
"Default"));
668 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
669 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
677 if ($foruserprofile) {
681 print '<tr class="oddeven">';
682 print '<td>'.$langs->trans(
"BackgroundTableLineOddColor").
'</td>';
683 print '<td colspan="'.($colspan - 1).
'">';
685 print $formother->selectColor(
colorArrayToHex(
colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()),
''),
'THEME_ELDY_LINEIMPAIR1',
'', 1,
'',
'',
'colorbacklinepair2').
' ';
688 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
689 else print $langs->trans(
"Default");
691 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
692 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
698 if ($foruserprofile) {
702 print '<tr class="oddeven">';
703 print '<td>'.$langs->trans(
"BackgroundTableLineEvenColor").
'</td>';
704 print '<td colspan="'.($colspan - 1).
'">';
709 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
710 else print $langs->trans(
"Default");
712 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
713 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
719 if ($foruserprofile) {
743 print '<tr class="oddeven">';
744 print '<td>'.$langs->trans(
"LinkColor").
'</td>';
745 print '<td colspan="'.($colspan - 1).
'">';
750 if ($color)
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
754 print $langs->trans(
"Default");
757 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
758 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
764 if ($foruserprofile) {
778 print '<tr class="oddeven">';
779 print '<td>'.$langs->trans(
"HighlightLinesColor").
'</td>';
780 print '<td colspan="'.($colspan - 1).
'">';
786 print $formother->selectColor($color,
'THEME_ELDY_USE_HOVER',
'', 1,
'',
'',
'colorbacklinepairhover').
' ';
791 if ($color !=
colorArrayToHex(
colorStringToArray($colorbacklinepairhover)))
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
792 else print $langs->trans(
"Default");
793 }
else print $langs->trans(
"Default");
795 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
796 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
801 if ($foruserprofile) {
815 print '<tr class="oddeven">';
816 print '<td>'.$langs->trans(
"HighlightLinesChecked").
'</td>';
817 print '<td colspan="'.($colspan - 1).
'">';
821 if ($conf->global->THEME_ELDY_USE_CHECKED ==
'1') $color =
'e6edf0';
823 print $formother->selectColor($color,
'THEME_ELDY_USE_CHECKED',
'', 1,
'',
'',
'colorbacklinepairchecked').
' ';
825 if ($conf->global->THEME_ELDY_USE_CHECKED ==
'1') $color =
'e6edf0';
828 if ($color !=
'e6edf0')
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
829 else print $langs->trans(
"Default");
830 }
else print $langs->trans(
"Default");
832 print ' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
833 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
839 if ($foruserprofile) {
841 $default = $langs->trans(
'No');
842 print '<tr class="oddeven">';
843 print '<td>'.$langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSER").
'</td>';
844 print '<td colspan="'.($colspan - 1).
'">';
847 print $form->selectyesno(
'MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
849 if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
850 print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER);
853 if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER))
print ' ('.$langs->trans(
"ForcedByGlobalSetup").
')';
856 print ' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
857 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
884 if ($foruserprofile) {
886 $default = $langs->trans(
'No');
887 print '<tr class="oddeven">';
888 print '<td>'.$langs->trans(
"MAIN_OPTIMIZEFORCOLORBLIND").
'</td>';
889 print '<td colspan="'.($colspan - 1).
'">';
891 $colorBlindOptions = array(
892 0 => $langs->trans(
'No'),
893 'flashy' => $langs->trans(
'Flashy'),
894 'protanopia' => $langs->trans(
'Protanopia'),
895 'deuteranopes' => $langs->trans(
'Deuteranopes'),
896 'tritanopes' => $langs->trans(
'Tritanopes'),
900 print $form->selectArray(
'MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0);
902 if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
903 print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND];
908 print ' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
909 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORCOLORBLINDDesc"));
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
user_prepare_head($object)
Prepare array with list of tabs.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).
showSkins($fuser, $edit=0, $foruserprofile=false)
Show list of themes.
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0)
On/off button for constant.
group_prepare_head($object)
Prepare array with list of tabs.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
static count($db, $objecttype, $objectid)
Return nb of links.
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
user_admin_prepare_head()
Prepare array with list of tabs.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).
colorArrayToHex($arraycolor, $colorifnotfound= '888888')
Convert an array with RGB value into hex RGB value.