dolibarr 21.0.0-beta
usergroups.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2010-2017 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
5 * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
6 * Copyright (C) 2021-2023 Anthony Berton <anthony.berton@bb2a.fr>
7 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 * or see https://www.gnu.org/
23 */
24
25
38{
39 global $langs, $conf, $user, $db;
40
41 $langs->load("users");
42
43 $canreadperms = true;
44 if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
45 $canreadperms = ($user->admin || ($user->id != $object->id && $user->hasRight('user', 'user_advance', 'readperms')) || ($user->id == $object->id && $user->hasRight('user', 'self_advance', 'readperms')));
46 }
47
48 $h = 0;
49 $head = array();
50
51 $head[$h][0] = DOL_URL_ROOT.'/user/card.php?id='.$object->id;
52 $head[$h][1] = $langs->trans("User");
53 $head[$h][2] = 'user';
54 $h++;
55
56 if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
57 && (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
58 $langs->load("ldap");
59 $head[$h][0] = DOL_URL_ROOT.'/user/ldap.php?id='.$object->id;
60 $head[$h][1] = $langs->trans("LDAPCard");
61 $head[$h][2] = 'ldap';
62 $h++;
63 }
64
65 if ($canreadperms) {
66 $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id;
67 $head[$h][1] = $langs->trans("Rights").(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>' : '');
68 $head[$h][2] = 'rights';
69 $h++;
70 }
71
72 $head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
73 $head[$h][1] = $langs->trans("UserGUISetup");
74 $head[$h][2] = 'guisetup';
75 $h++;
76
77 if (isModEnabled('agenda')) {
78 if (!getDolGlobalString('AGENDA_EXT_NB')) {
79 $conf->global->AGENDA_EXT_NB = 5;
80 }
81 $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB');
82
83 $i = 1;
84 $nbagenda = 0;
85 while ($i <= $MAXAGENDA) {
86 $key = $i;
87 $name = 'AGENDA_EXT_NAME_'.$object->id.'_'.$key;
88 $src = 'AGENDA_EXT_SRC_'.$object->id.'_'.$key;
89 $offsettz = 'AGENDA_EXT_OFFSETTZ_'.$object->id.'_'.$key;
90 $color = 'AGENDA_EXT_COLOR_'.$object->id.'_'.$key;
91 $i++;
92
93 if (!empty($object->conf->$name)) {
94 $nbagenda++;
95 }
96 }
97
98 $head[$h][0] = DOL_URL_ROOT.'/user/agenda_extsites.php?id='.$object->id;
99 $head[$h][1] = $langs->trans("ExtSites").($nbagenda ? '<span class="badge marginleftonlyshort">'.$nbagenda.'</span>' : '');
100 $head[$h][2] = 'extsites';
101 $h++;
102 }
103
104 if (isModEnabled('clicktodial')) {
105 $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$object->id;
106 $head[$h][1] = $langs->trans("ClickToDial");
107 $head[$h][2] = 'clicktodial';
108 $h++;
109 }
110
111 // Notifications
112 if ($user->socid == 0 && isModEnabled('notification')) {
113 $nbNote = 0;
114 $sql = "SELECT COUNT(n.rowid) as nb";
115 // Make a join with c_action_trigger to exclude orphelin of notify_def and be consistent with page /usr/notify_def
116 $sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n, ".MAIN_DB_PREFIX."c_action_trigger as a";
117 $sql .= " WHERE fk_user = ".((int) $object->id);
118 $sql .= " AND a.rowid = n.fk_action AND n.fk_user = ".((int) $object->id);
119 $sql .= " AND entity IN (".getEntity('notify_def').')';
120
121 $resql = $db->query($sql);
122 if ($resql) {
123 $num = $db->num_rows($resql);
124 $i = 0;
125 while ($i < $num) {
126 $obj = $db->fetch_object($resql);
127 $nbNote = $obj->nb;
128 $i++;
129 }
130 } else {
131 dol_print_error($db);
132 }
133
134 $langs->load("mails");
135 $head[$h][0] = DOL_URL_ROOT.'/user/notify/card.php?id='.$object->id;
136 $head[$h][1] = $langs->trans("NotificationsAuto");
137 if ($nbNote > 0) {
138 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
139 }
140 $head[$h][2] = 'notify';
141 $h++;
142 }
143
144 // Show more tabs from modules
145 // Entries must be declared in modules descriptor with line
146 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
147 // $this->tabs = array('entity:-tabname); to remove a tab
148 complete_head_from_modules($conf, $langs, $object, $head, $h, 'user');
149
150 if ((isModEnabled('salaries') && $user->hasRight('salaries', 'read'))
151 || (isModEnabled('hrm') && $user->hasRight('hrm', 'employee', 'read'))
152 || (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire') && ($user->id == $object->id || $user->hasRight('expensereport', 'readall')))
153 || (isModEnabled('holiday') && $user->hasRight('holiday', 'read') && ($user->id == $object->id || $user->hasRight('holiday', 'readall')))
154 ) {
155 // Bank
156 $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id;
157 $head[$h][1] = $langs->trans("HRAndBank");
158 $head[$h][2] = 'bank';
159 $h++;
160 }
161
162 // Such info on users is visible only by internal user
163 if (empty($user->socid)) {
164 // Notes
165 $nbNote = 0;
166 if (!empty($object->note_public)) {
167 $nbNote++;
168 }
169 if (!empty($object->note_private)) {
170 $nbNote++;
171 }
172 $head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
173 $head[$h][1] = $langs->trans("Note");
174 if ($nbNote > 0) {
175 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
176 }
177 $head[$h][2] = 'note';
178 $h++;
179
180 // Attached files
181 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
182 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
183 $upload_dir = $conf->user->dir_output."/".$object->id;
184 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
185 $nbLinks = Link::count($db, $object->element, $object->id);
186 $head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id;
187 $head[$h][1] = $langs->trans("Documents");
188 if (($nbFiles + $nbLinks) > 0) {
189 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
190 }
191 $head[$h][2] = 'document';
192 $h++;
193
194 $head[$h][0] = DOL_URL_ROOT.'/user/agenda.php?id='.$object->id;
195 $head[$h][1] = $langs->trans("Events");
196 if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
197 $nbEvent = 0;
198 // Enable caching of thirdparty count actioncomm
199 require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
200 $cachekey = 'count_events_user_'.$object->id;
201 $dataretrieved = dol_getcache($cachekey);
202 if (!is_null($dataretrieved)) {
203 $nbEvent = $dataretrieved;
204 } else {
205 $sql = "SELECT COUNT(ac.id) as nb";
206 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as ac";
207 $sql .= " WHERE ac.fk_user_action = ".((int) $object->id);
208 $sql .= " AND ac.entity IN (".getEntity('agenda').")";
209 $resql = $db->query($sql);
210 if ($resql) {
211 $obj = $db->fetch_object($resql);
212 $nbEvent = $obj->nb;
213 } else {
214 dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
215 }
216 dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
217 }
218
219 $head[$h][1] .= '/';
220 $head[$h][1] .= $langs->trans("Agenda");
221 if ($nbEvent > 0) {
222 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbEvent.'</span>';
223 }
224 }
225 $head[$h][2] = 'info';
226 $h++;
227 }
228
229 complete_head_from_modules($conf, $langs, $object, $head, $h, 'user', 'remove');
230
231 return $head;
232}
233
241{
242 global $langs, $conf, $user;
243
244 $canreadperms = true;
245 if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
246 $canreadperms = ($user->admin || $user->hasRight('user', 'group_advance', 'readperms'));
247 }
248
249 $h = 0;
250 $head = array();
251
252 $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id;
253 $head[$h][1] = $langs->trans("Card");
254 $head[$h][2] = 'group';
255 $h++;
256
257 if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
258 && (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
259 $langs->load("ldap");
260 $head[$h][0] = DOL_URL_ROOT.'/user/group/ldap.php?id='.$object->id;
261 $head[$h][1] = $langs->trans("LDAPCard");
262 $head[$h][2] = 'ldap';
263 $h++;
264 }
265
266 if ($canreadperms) {
267 $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id;
268 $head[$h][1] = $langs->trans("GroupRights").'<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>';
269 $head[$h][2] = 'rights';
270 $h++;
271 }
272
273 // Show more tabs from modules
274 // Entries must be declared in modules descriptor with line
275 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
276 // $this->tabs = array('entity:-tabname); to remove a tab
277 complete_head_from_modules($conf, $langs, $object, $head, $h, 'group');
278
279 complete_head_from_modules($conf, $langs, $object, $head, $h, 'group', 'remove');
280
281 return $head;
282}
283
290{
291 global $langs, $conf, $user, $db;
292
293 $extrafields = new ExtraFields($db);
294 $extrafields->fetch_name_optionals_label('user');
295 $extrafields->fetch_name_optionals_label('usergroup');
296
297 $langs->load("users");
298 $h = 0;
299 $head = array();
300
301 $head[$h][0] = DOL_URL_ROOT.'/admin/user.php';
302 $head[$h][1] = $langs->trans("Parameters");
303 $head[$h][2] = 'card';
304 $h++;
305
306 $head[$h][0] = DOL_URL_ROOT.'/admin/usergroup.php';
307 $head[$h][1] = $langs->trans("Group");
308 $head[$h][2] = 'usergroupcard';
309 $h++;
310
311 $head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
312 $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Users").")";
313 $nbExtrafields = $extrafields->attributes['user']['count'];
314 if ($nbExtrafields > 0) {
315 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
316 }
317 $head[$h][2] = 'attributes';
318 $h++;
319
320 $head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php';
321 $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Groups").")";
322 $nbExtrafields = $extrafields->attributes['usergroup']['count'];
323 if ($nbExtrafields > 0) {
324 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
325 }
326 $head[$h][2] = 'attributes_group';
327 $h++;
328
329 // Show more tabs from modules
330 // Entries must be declared in modules descriptor with line
331 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
332 // $this->tabs = array('entity:-tabname); to remove a tab
333 complete_head_from_modules($conf, $langs, null, $head, $h, 'useradmin');
334
335 complete_head_from_modules($conf, $langs, null, $head, $h, 'useradmin', 'remove');
336
337 return $head;
338}
339
348function showSkins($fuser, $edit = 0, $foruserprofile = false)
349{
350 global $conf, $langs, $db, $form;
351
352 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
353
354 $formother = new FormOther($db);
355
356 $dirthemes = array('/theme');
357 if (!empty($conf->modules_parts['theme'])) { // Using this feature slow down application
358 foreach ($conf->modules_parts['theme'] as $reldir) {
359 $dirthemes = array_merge($dirthemes, (array) ($reldir.'theme'));
360 }
361 }
362 $dirthemes = array_unique($dirthemes);
363 // Now dir_themes=array('/themes') or dir_themes=array('/theme','/mymodule/theme')
364
365 $selected_theme = '';
366 if (empty($foruserprofile)) {
367 $selected_theme = getDolGlobalString('MAIN_THEME');
368 } else {
369 $selected_theme = ((is_object($fuser) && !empty($fuser->conf->MAIN_THEME)) ? $fuser->conf->MAIN_THEME : '');
370 }
371
372 $hoverdisabled = '';
373 if (empty($foruserprofile)) {
374 $hoverdisabled = (getDolGlobalString('THEME_ELDY_USE_HOVER') == '0');
375 } else {
376 $hoverdisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER == '0') : '');
377 }
378
379 $checkeddisabled = '';
380 if (empty($foruserprofile)) {
381 $checkeddisabled = (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '0');
382 } else {
383 $checkeddisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_CHECKED) || $fuser->conf->THEME_ELDY_USE_CHECKED == '0') : '');
384 }
385
386 $colspan = 2;
387 if ($foruserprofile) {
388 $colspan = 4;
389 }
390
391 $thumbsbyrow = 6;
392 print '<div class="div-table-responsive-no-min">';
393 print '<table class="noborder centpercent'.($edit ? ' editmodeforshowskin' : '').'">';
394
395 // Title
396 if ($foruserprofile) {
397 print '<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans("Parameter").'</th><th>'.$langs->trans("DefaultValue").'</th>';
398 print '<th colspan="2">&nbsp;</th>';
399 print '</tr>';
400
401 print '<tr>';
402 print '<td>'.$langs->trans("DefaultSkin").'</td>';
403 print '<td>' . getDolGlobalString('MAIN_THEME').'</td>';
404 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>';
405 print '<td>&nbsp;</td>';
406 print '</tr>';
407 } else {
408 $dirthemestring = '';
409 foreach ($dirthemes as $dirtheme) {
410 $dirthemestring .= '"'.$dirtheme.'" ';
411 }
412
413 print '<tr class="liste_titre"><th class="titlefieldmiddle">';
414 print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring);
415 print '</th>';
416 print '<th class="right">';
417 $url = 'https://www.dolistore.com/9-skins';
418 print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
419 print $langs->trans('DownloadMoreSkins');
420 print img_picto('', 'globe', 'class="paddingleft"');
421 print '</a>';
422 print '</th></tr>';
423 }
424
425 print '<tr><td colspan="'.$colspan.'" class="center">';
426
427 if (getDolGlobalString('MAIN_FORCETHEME')) {
428 $langs->load("errors");
429 print $langs->trans("WarningThemeForcedTo", getDolGlobalString('MAIN_FORCETHEME'));
430 }
431
432 print '<table class="nobordernopadding centpercent"><tr><td><div class="center">';
433
434 $i = 0;
435 foreach ($dirthemes as $dir) {
436 //print $dirroot.$dir;exit;
437 $dirtheme = dol_buildpath($dir, 0); // This include loop on $conf->file->dol_document_root
438 $urltheme = dol_buildpath($dir, 1);
439
440 if (is_dir($dirtheme)) {
441 $handle = opendir($dirtheme);
442 if (is_resource($handle)) {
443 while (($subdir = readdir($handle)) !== false) {
444 if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) != '.'
445 && substr($subdir, 0, 3) != 'CVS' && !preg_match('/common|phones/i', $subdir)) {
446 // Disable not stable themes (dir ends with _exp or _dev)
447 if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && preg_match('/_dev$/i', $subdir)) {
448 continue;
449 }
450 if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && preg_match('/_exp$/i', $subdir)) {
451 continue;
452 }
453
454 print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
455 $file = $dirtheme."/".$subdir."/thumb.png";
456 $url = $urltheme."/".$subdir."/thumb.png";
457 if (!file_exists($file)) {
458 $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png';
459 }
460 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").'">';
461 if ($subdir == $conf->global->MAIN_THEME) {
462 $title = $langs->trans("ThemeCurrentlyActive");
463 } else {
464 $title = $langs->trans("ShowPreview");
465 }
466 print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'" style="border: none; margin-bottom: 5px;">';
467 print '</a><br>';
468 if ($subdir == $selected_theme) {
469 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>';
470 } else {
471 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>';
472 }
473 print '</div>';
474
475 $i++;
476 }
477 }
478 }
479 }
480 }
481
482 print '</div></td></tr></table>';
483
484 print '</td></tr>';
485
486 // Set variables of theme
487 $colorbackhmenu1 = '';
488 $colorbackvmenu1 = '';
489 $colortexttitlenotab = '';
490 $colortexttitlelink = '';
491 $colorbacktitle1 = '';
492 $colortexttitle = '';
493 $colorbacklineimpair1 = '';
494 $colorbacklineimpair2 = '';
495 $colorbacklinepair1 = '';
496 $colorbacklinepair2 = '';
497 $colortextlink = '';
498 $colorbacklinepairhover = '';
499 $colorbacklinepairchecked = '';
500 $butactionbg = '';
501 $textbutaction = '';
502 // Set the variables with the default value
503 if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
504 include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
505 }
506
507 // Dark mode
508 if ($foruserprofile) {
509 //Nothing
510 } else {
511 $listofdarkmodes = array(
512 $langs->trans("AlwaysDisabled"),
513 $langs->trans("AccordingToBrowser"),
514 $langs->trans("AlwaysEnabled")
515 );
516 print '<tr class="oddeven">';
517 print '<td>'.$langs->trans("DarkThemeMode").'</td>';
518 print '<td colspan="'.($colspan - 1).'">';
519 if ($edit) {
520 print $form->selectarray('THEME_DARKMODEENABLED', $listofdarkmodes, getDolGlobalInt('THEME_DARKMODEENABLED'));
521 } else {
522 print $listofdarkmodes[getDolGlobalInt('THEME_DARKMODEENABLED')];
523 }
524 print $form->textwithpicto('', $langs->trans("DoesNotWorkWithAllThemes"));
525 print '</tr>';
526 }
527
528
529 // TopMenuDisableImages
530 if ($foruserprofile) {
531 /*
532 print '<tr class="oddeven">';
533 print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
534 print '<td>'.(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE',$langs->trans("Default")).'</td>';
535 print '<td class="left" class="nowrap" width="20%"><input name="check_THEME_TOPMENU_DISABLE_IMAGE" id="check_THEME_TOPMENU_DISABLE_IMAGE" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
536 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
537 print '> '.$langs->trans("UsePersonalValue").'</td>';
538 print '<td>';
539 if ($edit)
540 {
541 print $formother->selectColor(colorArrayToHex(colorStringToArray(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE'),array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
542 }
543 else
544 {
545 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),'');
546 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
547 else print '';
548 }
549 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
550 print '</td>';*/
551 } else {
552 $listoftopmenumodes = array(
553 $langs->transnoentitiesnoconv("IconAndText"),
554 $langs->transnoentitiesnoconv("TextOnly"),
555 $langs->transnoentitiesnoconv("IconOnlyAllTextsOnHover"),
556 $langs->transnoentitiesnoconv("IconOnlyTextOnHover"),
557 $langs->transnoentitiesnoconv("IconOnly"),
558 );
559 print '<tr class="oddeven">';
560 print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
561 print '<td colspan="'.($colspan - 1).'">';
562 if ($edit) {
563 print $form->selectarray('THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx maxwidth500');
564 } else {
565 print $listoftopmenumodes[getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE')];
566 }
567 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"));
568 print '</td>';
569 print '</tr>';
570 }
571
572 // Show logo
573 if ($foruserprofile) {
574 // Nothing
575 } else {
576 // Show logo
577 print '<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans("EnableShowLogo").'</td>';
578 print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
579 if ($edit) {
580 print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1);
581 //print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1);
582 } else {
583 print yn(getDolGlobalString('MAIN_SHOW_LOGO'));
584 }
585 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
586 print '</td>';
587 print '</tr>';
588 }
589
590 // Main menu color on pictos
591 if ($foruserprofile) {
592 // Nothing
593 } else {
594 // Show logo
595 print '<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans("THEME_MENU_COLORLOGO").'</td>';
596 print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
597 if ($edit) {
598 print ajax_constantonoff('THEME_MENU_COLORLOGO', array(), null, 0, 0, 1);
599 } else {
600 print yn(getDolGlobalString('THEME_MENU_COLORLOGO'));
601 }
602 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
603 print '</td>';
604 print '</tr>';
605 }
606
607 // Use border on tables
608 if ($foruserprofile) {
609 } else {
610 print '<tr class="oddeven">';
611 print '<td>'.$langs->trans("UseBorderOnTable").'</td>';
612 print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
613 if ($edit) {
614 print ajax_constantonoff('THEME_ELDY_USEBORDERONTABLE', array(), null, 0, 0, 1, 2, 0, 1);
615 } else {
616 print yn(getDolGlobalString('THEME_ELDY_USEBORDERONTABLE'));
617 }
618 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
619 print '</td>';
620 print '</tr>';
621 }
622
623 if ($foruserprofile) {
624 } else {
625 if (getDolGlobalString('THEME_ELDY_USEBORDERONTABLE')) {
626 $listofborderradius = array(
627 0 => $langs->transnoentitiesnoconv("No"),
628 4 => $langs->transnoentitiesnoconv("Size").' 4',
629 6 => $langs->transnoentitiesnoconv("Size").' 6',
630 8 => $langs->transnoentitiesnoconv("Size").' 8',
631 10 => $langs->transnoentitiesnoconv("Size").' 10',
632 20 => $langs->transnoentitiesnoconv("Size").' 20',
633 );
634
635 print '<tr class="oddeven">';
636 print '<td>'.$langs->trans("RoundBorders").'</td>';
637 print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
638 if ($edit) {
639 print $form->selectarray('THEME_ELDY_BORDER_RADIUS', $listofborderradius, getDolGlobalInt('THEME_ELDY_BORDER_RADIUS'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx maxwidth100');
640 } else {
641 print $listofborderradius[getDolGlobalInt('THEME_ELDY_BORDER_RADIUS')];
642 }
643 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
644 print '</td>';
645 print '</tr>';
646 }
647 }
648 // Table line height
649 /* removed. height of column must use padding of td and not lineheight that has bad side effect
650 if ($foruserprofile) {
651 } else {
652 $listoftopmenumodes = array(
653 '0' => $langs->transnoentitiesnoconv("Normal"),
654 '1' => $langs->transnoentitiesnoconv("LargeModern"),
655 );
656 print '<tr class="oddeven">';
657 print '<td>'.$langs->trans("TableLineHeight").'</td>';
658 print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
659 if ($edit) {
660 //print ajax_constantonoff('THEME_ELDY_USECOMOACTROW', array(), null, 0, 0, 1);
661 print $form->selectarray('THEME_ELDY_USECOMOACTROW', $listoftopmenumodes, getDolGlobalString('THEME_ELDY_USECOMOACTROW'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx maxwidth300');
662 } else {
663 print $listoftopmenumodes[getDolGlobalString('THEME_ELDY_USECOMOACTROW')];
664 }
665 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
666 print '</td>';
667 print '</tr>';
668 }
669 */
670
671 // Background color for top menu - TopMenuBackgroundColor
672 if ($foruserprofile) {
673 /*
674 print '<tr class="oddeven">';
675 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
676 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
677 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
678 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
679 print '> '.$langs->trans("UsePersonalValue").'</td>';
680 print '<td>';
681 if ($edit)
682 {
683 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' ';
684 }
685 else
686 {
687 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
688 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
689 else print '';
690 }
691 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
692 print '</td>';*/
693 } else {
694 $default = (empty($colorbackhmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackhmenu1)));
695
696 print '<tr class="oddeven">';
697 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
698 print '<td colspan="'.($colspan - 1).'">';
699 if ($edit) {
700 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TOPMENU_BACK1') ? $conf->global->THEME_ELDY_TOPMENU_BACK1 : ''), array()), ''), 'THEME_ELDY_TOPMENU_BACK1', '', 1, array(), '', 'colorbackhmenu1', $default).' ';
701 } else {
702 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
703 if ($color) {
704 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
705 } else {
706 print $langs->trans("Default");
707 }
708 }
709 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
710 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
711 print '</td>';
712 print '</tr>';
713 }
714
715 // Background color for left menu - LeftMenuBackgroundColor
716 if ($foruserprofile) {
717 /*
718 print '<tr class="oddeven">';
719 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
720 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_VERMENU_BACK1:$langs->trans("Default")).'</td>';
721 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_VERMENU_BACK1" id="check_THEME_ELDY_VERMENU_BACK1" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
722 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
723 print '> '.$langs->trans("UsePersonalValue").'</td>';
724 print '<td>';
725 if ($edit)
726 {
727 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','',1).' ';
728 }
729 else
730 {
731 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),'');
732 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
733 else print '';
734 }
735 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
736 print '</td>';*/
737 } else {
738 $default = (empty($colorbackvmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackvmenu1)));
739
740 print '<tr class="oddeven">';
741 print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
742 print '<td colspan="'.($colspan - 1).'">';
743 if ($edit) {
744 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_VERMENU_BACK1') ? $conf->global->THEME_ELDY_VERMENU_BACK1 : ''), array()), ''), 'THEME_ELDY_VERMENU_BACK1', '', 1, array(), '', 'colorbackvmenu1', $default).' ';
745 } else {
746 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), '');
747 if ($color) {
748 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
749 } else {
750 print $langs->trans("Default");
751 }
752 }
753 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
754 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
755 print '</td>';
756 print '</tr>';
757 }
758
759 // Background color for main area THEME_ELDY_BACKBODY
760 if ($foruserprofile) {
761 /*
762 print '<tr class="oddeven">';
763 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
764 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
765 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
766 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
767 print '> '.$langs->trans("UsePersonalValue").'</td>';
768 print '<td>';
769 if ($edit) {
770 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' ';
771 } else {
772 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
773 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
774 else print '';
775 }
776 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
777 print '</td>';*/
778 } else {
779 $default = 'ffffff';
780 print '<tr class="oddeven">';
781 print '<td>'.$langs->trans("BackgroundColor").'</td>';
782 print '<td colspan="'.($colspan - 1).'">';
783 //var_dump($conf->global->THEME_ELDY_BACKBODY);
784 if ($edit) {
785 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_BACKBODY') ? $conf->global->THEME_ELDY_BACKBODY : ''), array()), ''), 'THEME_ELDY_BACKBODY', '', 1, array(), '', 'colorbackbody', $default).' ';
786 } else {
787 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), '');
788 if ($color) {
789 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
790 } else {
791 print $langs->trans("Default");
792 }
793 }
794 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
795 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
796 print '</td>';
797 print '</tr>';
798 }
799
800 // TextTitleColor for title of Pages
801 if ($foruserprofile) {
802 } else {
803 $default = (empty($colortexttitlenotab) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlenotab)));
804
805 print '<tr class="oddeven">';
806 print '<td>'.$langs->trans("TextTitleColor").'</td>';
807 print '<td colspan="'.($colspan - 1).'">';
808 if ($edit) {
809 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TEXTTITLENOTAB') ? $conf->global->THEME_ELDY_TEXTTITLENOTAB : ''), array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', '', 1, array(), '', 'colortexttitlenotab', $default).' ';
810 } else {
811 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
812 }
813 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
814 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
815 print '</td>';
816
817 print '</tr>';
818 }
819
820 // BackgroundTableTitleColor
821 if ($foruserprofile) {
822 } else {
823 $default = (empty($colorbacktitle1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacktitle1)));
824
825 print '<tr class="oddeven">';
826 print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
827 print '<td colspan="'.($colspan - 1).'">';
828 if ($edit) {
829 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_BACKTITLE1') ? $conf->global->THEME_ELDY_BACKTITLE1 : ''), array()), ''), 'THEME_ELDY_BACKTITLE1', '', 1, array(), '', 'colorbacktitle1', $default).' ';
830 } else {
831 print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
832 }
833 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> '; // $colorbacktitle1 in CSS
834 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
835 print '</td>';
836
837 print '</tr>';
838 }
839
840 // TextTitleColor
841 if ($foruserprofile) {
842 } else {
843 $default = (empty($colortexttitle) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitle)));
844
845 print '<tr class="oddeven">';
846 print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
847 print '<td colspan="'.($colspan - 1).'">';
848 if ($edit) {
849 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TEXTTITLE') ? $conf->global->THEME_ELDY_TEXTTITLE : ''), array()), ''), 'THEME_ELDY_TEXTTITLE', '', 1, array(), '', 'colortexttitle', $default).' ';
850 } else {
851 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
852 }
853 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
854 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
855 print '</td>';
856
857 print '</tr>';
858 }
859
860 // TextTitleLinkColor
861 if ($foruserprofile) {
862 } else {
863 $default = (empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink)));
864
865 print '<tr class="oddeven">';
866 print '<td>'.$langs->trans("BackgroundTableTitleTextlinkColor").'</td>';
867 print '<td colspan="'.($colspan - 1).'">';
868 if ($edit) {
869 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TEXTTITLELINK') ? $conf->global->THEME_ELDY_TEXTTITLELINK : ''), array()), ''), 'THEME_ELDY_TEXTTITLELINK', '', 1, array(), '', 'colortexttitlelink', $default).' ';
870 } else {
871 print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default"));
872 }
873 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
874 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
875 print '</span>';
876 print '</td>';
877
878 print '</tr>';
879 }
880
881 // BackgroundTableLineOddColor
882 if ($foruserprofile) {
883 } else {
884 $default = (empty($colorbacklineimpair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklineimpair1)));
885
886 print '<tr class="oddeven">';
887 print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
888 print '<td colspan="'.($colspan - 1).'">';
889 if ($edit) {
890 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_LINEIMPAIR1') ? $conf->global->THEME_ELDY_LINEIMPAIR1 : ''), array()), ''), 'THEME_ELDY_LINEIMPAIR1', '', 1, array(), '', 'colorbacklineimpair2', $default).' ';
891 } else {
892 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), '');
893 if ($color) {
894 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
895 } else {
896 print $langs->trans("Default");
897 }
898 }
899 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
900 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
901 print '</td>';
902 print '</tr>';
903 }
904
905 // BackgroundTableLineEvenColor
906 if ($foruserprofile) {
907 } else {
908 $default = (empty($colorbacklinepair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepair1)));
909
910 print '<tr class="oddeven">';
911 print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
912 print '<td colspan="'.($colspan - 1).'">';
913 if ($edit) {
914 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_LINEPAIR1') ? $conf->global->THEME_ELDY_LINEPAIR1 : ''), array()), ''), 'THEME_ELDY_LINEPAIR1', '', 1, array(), '', 'colorbacklinepair2', $default).' ';
915 } else {
916 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), '');
917 if ($color) {
918 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
919 } else {
920 print $langs->trans("Default");
921 }
922 }
923 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
924 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
925 print '</td>';
926 print '</tr>';
927 }
928
929 // Text LinkColor
930 if ($foruserprofile) {
931 /*
932 print '<tr class="oddeven">';
933 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
934 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTLINK:$langs->trans("Default")).'</td>';
935 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_TEXTLINK" id="check_THEME_ELDY_TEXTLINK" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
936 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
937 print '> '.$langs->trans("UsePersonalValue").'</td>';
938 print '<td>';
939 if ($edit)
940 {
941 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','',1).' ';
942 }
943 else
944 {
945 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),'');
946 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
947 else print '';
948 }
949 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
950 print '</td>';*/
951 } else {
952 $default = (empty($colortextlink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortextlink)));
953
954 print '<tr class="oddeven">';
955 print '<td>'.$langs->trans("LinkColor").'</td>';
956 print '<td colspan="'.($colspan - 1).'">';
957 if ($edit) {
958 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TEXTLINK') ? $conf->global->THEME_ELDY_TEXTLINK : ''), array()), ''), 'THEME_ELDY_TEXTLINK', '', 1, array(), '', 'colortextlink', $default).' ';
959 } else {
960 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), '');
961 if ($color) {
962 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
963 } else {
964 //print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$defaultcolor.'" value="'.$langs->trans("Default").'">';
965 //print '<span style="color: #000078">'.$langs->trans("Default").'</span>';
966 print $langs->trans("Default");
967 }
968 }
969 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
970 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
971 print '</td>';
972 print '</tr>';
973 }
974
975 // Use Hover
976 if ($foruserprofile) {
977 /* Must first change option to choose color of highlight instead of yes or no.
978 print '<tr class="oddeven">';
979 print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
980 print '<td><input name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
981 print '<td class="nowrap left" width="20%"><input name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
982 print '<td><input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
983 print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
984 print '</td>';
985 print '</tr>';
986 */
987 } else {
988 $default = (empty($colorbacklinepairhover) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairhover)));
989
990 print '<tr class="oddeven">';
991 print '<td>'.$langs->trans("HighlightLinesColor").'</td>';
992 print '<td colspan="'.($colspan - 1).'">';
993 //print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
994 //print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
995 if ($edit) {
996 if (getDolGlobalString('THEME_ELDY_USE_HOVER') == '1') {
997 $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
998 } else {
999 $color = colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_USE_HOVER') ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
1000 }
1001 print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, array(), '', 'colorbacklinepairhover', $default).' ';
1002 } else {
1003 if (getDolGlobalString('THEME_ELDY_USE_HOVER') == '1') {
1004 $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
1005 } else {
1006 $color = colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_USE_HOVER') ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
1007 }
1008 if ($color) {
1009 if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) {
1010 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1011 } else {
1012 print $langs->trans("Default");
1013 }
1014 } else {
1015 print $langs->trans("Default");
1016 }
1017 }
1018 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
1019 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
1020 print '</td>';
1021 }
1022
1023 // Use Checked
1024 if ($foruserprofile) {
1025 /* Must first change option to choose color of highlight instead of yes or no.
1026 print '<tr class="oddeven">';
1027 print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
1028 print '<td><input name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
1029 print '<td class="nowrap left" width="20%"><input name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
1030 print '<td><input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
1031 print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
1032 print '</td>';
1033 print '</tr>';
1034 */
1035 } else {
1036 $default = (empty($colorbacklinepairchecked) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairchecked)));
1037
1038 print '<tr class="oddeven">';
1039 print '<td>'.$langs->trans("HighlightLinesChecked").'</td>';
1040 print '<td colspan="'.($colspan - 1).'">';
1041 //print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
1042 //print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
1043 if ($edit) {
1044 if (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '1') {
1045 $color = 'e6edf0';
1046 } else {
1047 $color = colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_USE_CHECKED') ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
1048 }
1049 print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, array(), '', 'colorbacklinepairchecked', $default).' ';
1050 } else {
1051 if (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '1') {
1052 $color = 'e6edf0';
1053 } else {
1054 $color = colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_USE_CHECKED') ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
1055 }
1056 if ($color) {
1057 if ($color != 'e6edf0') {
1058 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1059 } else {
1060 print $langs->trans("Default");
1061 }
1062 } else {
1063 print $langs->trans("Default");
1064 }
1065 }
1066 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
1067 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
1068 print '</td>';
1069 print '</tr>';
1070 }
1071
1072 // Btn action
1073 if ($foruserprofile) {
1074 /*
1075 print '<tr class="oddeven">';
1076 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
1077 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_BTNACTION:$langs->trans("Default")).'</td>';
1078 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_BTNACTION" id="check_THEME_ELDY_BTNACTION" type="checkbox" '.(!empty($object->conf->THEME_ELDY_BTNACTION)?" checked":"");
1079 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
1080 print '> '.$langs->trans("UsePersonalValue").'</td>';
1081 print '<td>';
1082 if ($edit)
1083 {
1084 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),''),'THEME_ELDY_BTNACTION','',1).' ';
1085 }
1086 else
1087 {
1088 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),'');
1089 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1090 else print '';
1091 }
1092 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
1093 print '</td>';*/
1094 } else {
1095 $default = (empty($butactionbg) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($butactionbg)));
1096
1097 print '<tr class="oddeven">';
1098 print '<td>'.$langs->trans("BtnActionColor").'</td>';
1099 print '<td colspan="'.($colspan - 1).'">';
1100 if ($edit) {
1101 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_BTNACTION') ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, array(), '', 'butactionbg', $default).' ';
1102 } else {
1103 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION, array()), '');
1104 if ($color) {
1105 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1106 } else {
1107 //print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$defaultcolor.'" value="'.$langs->trans("Default").'">';
1108 //print '<span style="color: #000078">'.$langs->trans("Default").'</span>';
1109 print $langs->trans("Default");
1110 }
1111 }
1112 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
1113 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
1114 print '</td>';
1115 print '</tr>';
1116 }
1117
1118 // Text btn action
1119 if ($foruserprofile) {
1120 /*
1121 print '<tr class="oddeven">';
1122 print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
1123 print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTBTNACTION:$langs->trans("Default")).'</td>';
1124 print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_TEXTBTNACTION" id="check_THEME_ELDY_TEXTBTNACTION" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TEXTBTNACTION)?" checked":"");
1125 print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
1126 print '> '.$langs->trans("UsePersonalValue").'</td>';
1127 print '<td>';
1128 if ($edit)
1129 {
1130 print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTBTNACTION,array()),''),'THEME_ELDY_TEXTBTNACTION','',1).' ';
1131 }
1132 else
1133 {
1134 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),'');
1135 if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1136 else print '';
1137 }
1138 if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
1139 print '</td>';*/
1140 } else {
1141 $default = (empty($textbutaction) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($textbutaction)));
1142
1143 print '<tr class="oddeven">';
1144 print '<td>'.$langs->trans("TextBtnActionColor").'</td>';
1145 print '<td colspan="'.($colspan - 1).'">';
1146 if ($edit) {
1147 print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_TEXTBTNACTION') ? $conf->global->THEME_ELDY_TEXTBTNACTION : ''), array()), ''), 'THEME_ELDY_TEXTBTNACTION', '', 1, array(), '', 'textbutaction', $default).' ';
1148 } else {
1149 $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTBTNACTION, array()), '');
1150 if ($color) {
1151 print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
1152 } else {
1153 //print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$defaultcolor.'" value="'.$langs->trans("Default").'">';
1154 //print '<span style="color: #000078">'.$langs->trans("Default").'</span>';
1155 print $langs->trans("Default");
1156 }
1157 }
1158 print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #000">'.$default.'</span></strong> ';
1159 print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
1160 print '</td>';
1161 print '</tr>';
1162 }
1163
1164 // Use MAIN_OPTIMIZEFORTEXTBROWSER
1165 if ($foruserprofile) {
1166 //$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
1167 $default = $langs->trans('No');
1168 print '<tr class="oddeven">';
1169 print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
1170 print '<td colspan="'.($colspan - 1).'">';
1171 //print ajax_constantonoff("MAIN_OPTIMIZEFORTEXTBROWSER", array(), null, 0, 0, 1, 0);
1172 if ($edit) {
1173 print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1);
1174 } else {
1175 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
1176 print yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0);
1177 } else {
1178 print yn(1);
1179 if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1180 print ' ('.$langs->trans("ForcedByGlobalSetup").')';
1181 }
1182 }
1183 }
1184 print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
1185 print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
1186 print '</td>';
1187 print '</tr>';
1188 } else {
1189 //var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
1190 /*
1191 $default=$langs->trans('No');
1192 print '<tr class="oddeven">';
1193 print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
1194 print '<td colspan="'.($colspan-1).'">';
1195 if ($edit) {
1196 print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
1197 } else {
1198 print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
1199 }
1200 print ' &nbsp; wspan class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
1201 print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
1202 print '</span>';
1203 print '</td>';
1204 print '</tr>';
1205 */
1206 }
1207
1208
1209 // Use MAIN_OPTIMIZEFORCOLORBLIND
1210 if ($foruserprofile) {
1211 //$default=yn($conf->global->MAIN_OPTIMIZEFORCOLORBLIND);
1212 $default = $langs->trans('No');
1213 print '<tr class="oddeven">';
1214 print '<td>'.$langs->trans("MAIN_OPTIMIZEFORCOLORBLIND").'</td>';
1215 print '<td colspan="'.($colspan - 1).'">';
1216
1217 $colorBlindOptions = array(
1218 0 => $langs->trans('No'),
1219 'flashy' => $langs->trans('Flashy'),
1220 'protanopia' => $langs->trans('Protanopia'),
1221 'deuteranopes' => $langs->trans('Deuteranopes'),
1222 'tritanopes' => $langs->trans('Tritanopes'),
1223 );
1224
1225 if ($edit) {
1226 print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0);
1227 } else {
1228 if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
1229 print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND];
1230 } else {
1231 print yn(0);
1232 }
1233 }
1234 print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
1235 print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORCOLORBLINDDesc"));
1236 print '</td>';
1237 print '</tr>';
1238 } else {
1239 }
1240 print '</table>';
1241 print '</div>';
1242}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
Class to manage standard extra fields.
Class permettant la generation de composants html autre Only common components are here.
Class to manage Dolibarr users.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:63
colorArrayToHex($arraycolor, $colorifnotfound='888888')
Convert an array with RGB value into hex RGB value.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
dol_setcache($memoryid, $data, $expire=0)
Save data into a memory area shared by all users, all sessions on server.
dol_getcache($memoryid)
Read a memory area shared by all users, all sessions on server.
user_prepare_head(User $object)
Prepare array with list of tabs.
user_admin_prepare_head()
Prepare array with list of tabs.
showSkins($fuser, $edit=0, $foruserprofile=false)
Show list of themes.
group_prepare_head($object)
Prepare array with list of tabs.