28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
34$langs->loadLangs(array(
'companies',
'products',
'admin',
'users',
'languages',
'projects',
'members'));
37$canreaduser = ($user->admin || $user->hasRight(
"user",
"user",
"read"));
40$action =
GETPOST(
'action',
'aZ09');
41$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'userihm';
43if (!isset($id) || empty($id)) {
49 $caneditfield = ((($user->id == $id) && $user->hasRight(
"user",
"self",
"write"))
50 || (($user->id != $id) && $user->hasRight(
"user",
"user",
"write")));
55if ($user->socid > 0) {
56 $socid = $user->socid;
58$feature2 = (($socid && $user->hasRight(
"user",
"self",
"write")) ?
'' :
'user');
60$result =
restrictedArea($user,
'user', $id,
'user&user', $feature2);
61if ($user->id != $id && !$canreaduser) {
65$dirtop =
"../core/menus/standard";
66$dirleft =
"../core/menus/standard";
84$hookmanager->initHooks(array(
'usercard',
'userihm',
'globalcard'));
91$parameters = array(
'id'=>$socid);
92$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
98 if ($action ==
'update' && ($caneditfield || !empty($user->admin))) {
102 if (
GETPOST(
"check_MAIN_LANDING_PAGE") ==
"on") {
103 $tabparam[
"MAIN_LANDING_PAGE"] =
GETPOST(
"MAIN_LANDING_PAGE",
'alphanohtml');
105 $tabparam[
"MAIN_LANDING_PAGE"] =
'';
108 if (
GETPOST(
"check_MAIN_LANG_DEFAULT") ==
"on") {
109 $tabparam[
"MAIN_LANG_DEFAULT"] =
GETPOST(
"main_lang_default",
'aZ09');
111 $tabparam[
"MAIN_LANG_DEFAULT"] =
'';
114 if (
GETPOST(
"check_MAIN_SIZE_LISTE_LIMIT") ==
"on") {
115 $tabparam[
"MAIN_SIZE_LISTE_LIMIT"] =
GETPOSTINT(
"MAIN_SIZE_LISTE_LIMIT");
117 $tabparam[
"MAIN_SIZE_LISTE_LIMIT"] =
'';
120 if (
GETPOST(
"check_MAIN_SIZE_SHORTLIST_LIMIT") ==
"on") {
121 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
GETPOSTINT(
"MAIN_SIZE_SHORTLIST_LIMIT");
123 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
'';
126 if (
GETPOST(
"check_AGENDA_DEFAULT_VIEW") ==
"on") {
127 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
GETPOST(
"AGENDA_DEFAULT_VIEW",
'aZ09');
129 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
'';
132 if (
GETPOST(
"check_MAIN_THEME") ==
"on") {
133 $tabparam[
"MAIN_THEME"] =
GETPOST(
'main_theme',
'aZ09');
135 $tabparam[
"MAIN_THEME"] =
'';
140 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] =
'';
142 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] = implode(
150 $tabparam[
'THEME_ELDY_BACKTITLE1'] =
'';
152 $tabparam[
'THEME_ELDY_BACKTITLE1'] = implode(
158 if (
GETPOST(
'check_THEME_ELDY_USE_HOVER') ==
'on') {
159 $tabparam[
"THEME_ELDY_USE_HOVER"] = 1;
161 $tabparam[
"THEME_ELDY_USE_HOVER"] = 0;
164 if (
GETPOST(
'check_THEME_ELDY_USE_CHECKED') ==
'on') {
165 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 1;
167 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 0;
170 if (
GETPOST(
'MAIN_OPTIMIZEFORTEXTBROWSER')) {
171 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 1;
173 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 0;
176 if (
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND')) {
177 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] =
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND',
'aZ09');
179 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] = 0;
185 include_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
186 $cachedir = DOL_DATA_ROOT.
'/users/temp/widgets';
189 header(
'Location: '.$_SERVER[
"PHP_SELF"].
'?id='.$id);
201$title = $person_name.
" - ".$langs->trans(
'Card');
204llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-user page-card_param_ihm');
208$tmparray[
'index.php'] = array(
'label'=>
'Dashboard',
'picto'=>
'graph');
209if (isModEnabled(
"societe")) {
210 $tmparray[
'societe/index.php?mainmenu=companies&leftmenu='] = array(
'label'=>
'ThirdPartiesArea',
'picto'=>
'company');
212if (isModEnabled(
'project')) {
213 $tmparray[
'projet/index.php?mainmenu=project&leftmenu='] = array(
'label'=>
'ProjectsArea',
'picto'=>
'project');
215 $tmparray[
'projet/list.php?mainmenu=project&leftmenu=&search_usage_opportunity=1&search_status=99&search_opp_status=openedopp&contextpage=lead'] = array(
'label'=>
'ListOpenLeads',
'picto'=>
'project');
218if (isModEnabled(
'holiday') || isModEnabled(
'expensereport')) {
219 $tmparray[
'hrm/index.php?mainmenu=hrm&leftmenu='] = array(
'label'=>
'HRMArea',
'picto'=>
'user');
221if (isModEnabled(
"product") || isModEnabled(
"service")) {
222 $tmparray[
'product/index.php?mainmenu=products&leftmenu='] = array(
'label'=>
'ProductsAndServicesArea',
'picto'=>
'product');
224if (isModEnabled(
"propal") || isModEnabled(
'order') || isModEnabled(
'intervention') || isModEnabled(
'contract')) {
225 $tmparray[
'comm/index.php?mainmenu=commercial&leftmenu='] = array(
'label'=>
'CommercialArea',
'picto'=>
'commercial');
227if (isModEnabled(
'invoice')) {
228 $tmparray[
'compta/index.php?mainmenu=billing&leftmenu='] = array(
'label'=>
'InvoicesArea',
'picto'=>
'bill');
230if (isModEnabled(
'comptabilite') || isModEnabled(
'accounting')) {
231 $tmparray[
'compta/index.php?mainmenu=accountancy&leftmenu='] = array(
'label'=>
'AccountancyTreasuryArea',
'picto'=>
'bill');
233if (isModEnabled(
'member')) {
234 $tmparray[
'adherents/index.php?mainmenu=members&leftmenu='] = array(
'label'=>
'MembersArea',
'picto'=>
'member');
236if (isModEnabled(
'agenda')) {
237 $tmparray[
'comm/action/index.php?mainmenu=agenda&leftmenu='] = array(
'label'=>
'Agenda',
'picto'=>
'action');
239if (isModEnabled(
'ticket')) {
240 $tmparray[
'ticket/list.php?mainmenu=ticket&leftmenu='] = array(
'label'=>
'Tickets',
'picto'=>
'ticket');
244 $sql =
"SELECT b.rowid, b.fk_user, b.url, b.title";
245 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bookmark as b";
246 $sql .=
" WHERE b.entity IN (".getEntity(
'bookmark').
")";
247 $sql .=
" AND b.url NOT LIKE 'http%'";
249 $sql .=
" AND (b.fk_user = ".((int)
$object->id).
" OR b.fk_user is NULL OR b.fk_user = 0)";
251 $resql = $db->query($sql);
254 $num_rows = $db->num_rows($resql);
256 $tmparray[
'sep'.$i] = array(
257 'data-html'=>
'<span class="opacitymedium">--- '.$langs->trans(
"Bookmarks").
'</span>',
258 'label'=>
'--- '.$langs->trans(
"Bookmarks"),
261 while ($i < $num_rows) {
262 $obj = $db->fetch_object($resql);
264 $landing_url = str_replace(DOL_URL_ROOT,
'', $obj->url);
265 $tmparray[$landing_url] = array(
'label'=>$obj->title,
'picto'=>
'generic');
273$reshook = $hookmanager->executeHooks(
'addToLandingPageList', $tmparray, $object);
276} elseif ($reshook > 0) {
277 $tmparray = $hookmanager->resArray;
278} elseif ($reshook == 0) {
279 $tmparray = array_merge($tmparray, $hookmanager->resArray);
282foreach ($tmparray as $key => $val) {
283 $tmparray[$key][
'data-html'] =
img_picto($langs->trans($val[
'label']), empty($val[
'picto']) ?
'generic' : $val[
'picto'],
'class="pictofixedwidth"').$langs->trans($val[
'label']);
284 $tmparray[$key][
'label'] = $langs->trans($val[
'label']);
289$title = $langs->trans(
"User");
291if ($action ==
'edit') {
292 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
293 print
'<input type="hidden" name="token" value="'.newToken().
'">';
294 print
'<input type="hidden" name="action" value="update">';
295 print
'<input type="hidden" name="id" value="'.$id.
'">';
299if ($action ==
'edit') {
304 if ($user->hasRight(
"user",
"user",
"read") || $user->admin) {
305 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
308 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin);
310 print
'<div class="underbanner clearboth"></div>';
315 if (!empty($conf->use_javascript_ajax)) {
316 print
'<script type="text/javascript">
317 jQuery(document).ready(function() {
318 function init_myfunc()
320 if (jQuery("#check_MAIN_LANDING_PAGE").prop("checked")) { jQuery("#MAIN_LANDING_PAGE").removeAttr(\'disabled\'); }
321 else { jQuery("#MAIN_LANDING_PAGE").attr(\'disabled\',\'disabled\'); }
323 if (jQuery("#check_MAIN_LANG_DEFAULT").prop("checked")) { jQuery("#main_lang_default").removeAttr(\'disabled\'); }
324 else { jQuery("#main_lang_default").attr(\'disabled\',\'disabled\'); }
326 if (jQuery("#check_MAIN_SIZE_LISTE_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_LISTE_LIMIT").removeAttr(\'disabled\'); }
327 else { jQuery("#MAIN_SIZE_LISTE_LIMIT").attr(\'disabled\',\'disabled\'); }
329 if (jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").removeAttr(\'disabled\'); }
330 else { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").attr(\'disabled\',\'disabled\'); }
332 if (jQuery("#check_AGENDA_DEFAULT_VIEW").prop("checked")) { jQuery("#AGENDA_DEFAULT_VIEW").removeAttr(\'disabled\'); }
333 else { jQuery("#AGENDA_DEFAULT_VIEW").attr(\'disabled\',\'disabled\'); }
335 if (jQuery("#check_MAIN_THEME").prop("checked")) { jQuery(".themethumbs").removeAttr(\'disabled\'); }
336 else { jQuery(".themethumbs").attr(\'disabled\',\'disabled\'); }
338 if (jQuery("#check_THEME_ELDY_TOPMENU_BACK1").prop("checked")) { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").removeAttr(\'disabled\'); }
339 else { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").attr(\'disabled\',\'disabled\'); }
342 jQuery("#check_MAIN_LANDING_PAGE").click(function() { init_myfunc(); });
343 jQuery("#check_MAIN_LANG_DEFAULT").click(function() { init_myfunc(); });
344 jQuery("#check_MAIN_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); });
345 jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").click(function() { init_myfunc(); });
346 jQuery("#check_AGENDA_DEFAULT_VIEW").click(function() { init_myfunc(); });
347 jQuery("#check_MAIN_THEME").click(function() { init_myfunc(); });
348 jQuery("#check_THEME_ELDY_TOPMENU_BACK1").click(function() { init_myfunc(); });
349 jQuery("#check_THEME_ELDY_BACKTITLE1").click(function() { init_myfunc(); });
357 print
'<table class="noborder centpercent">';
358 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"DefaultValue").
'</td><td> </td><td>'.$langs->trans(
"PersonalValue").
'</td></tr>';
361 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"Language").
'</td>';
364 print $s ? $s.
' ' :
'';
367 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
" checked" :
"");
368 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
369 print
'> <label for="check_MAIN_LANG_DEFAULT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
371 print $formadmin->select_language((!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
$object->conf->MAIN_LANG_DEFAULT :
''),
'main_lang_default', 1, null, 0, 0, (!empty($dolibarr_main_demo)));
375 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
377 print(!
getDolGlobalString(
'MAIN_LANDING_PAGE') ?
'' : $conf->global->MAIN_LANDING_PAGE);
379 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANDING_PAGE" id="check_MAIN_LANDING_PAGE" type="checkbox" '.(!empty(
$object->conf->MAIN_LANDING_PAGE) ?
" checked" :
"");
380 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
381 print
'> <label for="check_MAIN_LANDING_PAGE">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
383 print $form->selectarray(
'MAIN_LANDING_PAGE', $tmparray, (!empty(
$object->conf->MAIN_LANDING_PAGE) ?
$object->conf->MAIN_LANDING_PAGE :
''), 0, 0, 0,
'', 0, 0, 0,
'',
'maxwidth250');
388 print
'<tr class="oddeven">'.
"\n";
389 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
390 print
'<td class="center"> </td>'.
"\n";
391 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_AGENDA_DEFAULT_VIEW" id="check_AGENDA_DEFAULT_VIEW" type="checkbox" '.(!empty(
$object->conf->AGENDA_DEFAULT_VIEW) ?
" checked" :
"");
392 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
393 print
'> <label for="check_AGENDA_DEFAULT_VIEW">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
395 $tmplist = array(
''=>
' ',
'show_list'=>$langs->trans(
"ViewList"),
'show_month'=>$langs->trans(
"ViewCal"),
'show_week'=>$langs->trans(
"ViewWeek"),
'show_day'=>$langs->trans(
"ViewDay"),
'show_peruser'=>$langs->trans(
"ViewPerUser"));
396 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist, (isset(
$object->conf->AGENDA_DEFAULT_VIEW) ?
$object->conf->AGENDA_DEFAULT_VIEW :
''), 0, 0, 0,
'');
397 print
'</td></tr>'.
"\n";
400 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
402 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_LISTE_LIMIT" id="check_MAIN_SIZE_LISTE_LIMIT" type="checkbox" '.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
" checked" :
"");
403 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
404 print
'> <label for="check_MAIN_SIZE_LISTE_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
405 print
'<td><input class="flat" name="MAIN_SIZE_LISTE_LIMIT" id="MAIN_SIZE_LISTE_LIMIT" size="4" value="'.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
$object->conf->MAIN_SIZE_LISTE_LIMIT :
'').
'"></td></tr>';
408 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
410 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_SHORTLIST_LIMIT" id="check_MAIN_SIZE_SHORTLIST_LIMIT" type="checkbox" '.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
" checked" :
"");
411 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
412 print
'> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
413 print
'<td><input class="flat" name="MAIN_SIZE_SHORTLIST_LIMIT" id="MAIN_SIZE_SHORTLIST_LIMIT" size="4" value="'.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT :
'').
'"></td></tr>';
415 print
'</table><br>';
418 showSkins($object, (($user->admin || empty($dolibarr_main_demo)) ? 1 : 0), true);
421 print $form->buttonsSaveCancel();
425 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
427 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/user/vcard.php?id='.
$object->id.
'&output=file&file='.urlencode(
dol_sanitizeFileName(
$object->getFullName($langs).
'.vcf')).
'" class="refid" rel="noopener">';
428 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
429 $morehtmlref .=
'</a>';
431 $urltovirtualcard =
'/user/virtualcard.php?id='.((int)
$object->id);
432 $morehtmlref .=
dolButtonToOpenUrlInDialogPopup(
'publicvirtualcard', $langs->transnoentitiesnoconv(
"PublicVirtualCardUrl").
' - '.
$object->getFullName($langs),
img_picto($langs->trans(
"PublicVirtualCardUrl"),
'card',
'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard,
'',
'nohover');
434 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin,
'rowid',
'ref', $morehtmlref);
436 print
'<div class="fichecenter">';
438 print
'<div class="underbanner clearboth"></div>';
439 print
'<table class="border centpercent tableforfield">';
442 print
'<tr><td class="titlefield">'.$langs->trans(
"Login").
'</td>';
444 print
'<td class="error">';
445 print $langs->trans(
"LoginAccountDisableInDolibarr");
450 if (property_exists($object,
'admin')) {
451 if (isModEnabled(
'multicompany') && !empty(
$object->admin) && empty(
$object->entity)) {
452 $addadmin .=
img_picto($langs->trans(
"SuperAdministratorDesc"),
"redstar",
'class="paddingleft"');
453 } elseif (!empty(
$object->admin)) {
454 $addadmin .=
img_picto($langs->trans(
"AdministratorDesc"),
"star",
'class="paddingleft"');
469 print
'<div class="div-table-responsive">';
470 print
'<table class="noborder centpercent">';
471 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"DefaultValue").
'</td><td> </td><td>'.$langs->trans(
"PersonalValue").
'</td></tr>';
474 print
'<tr class="oddeven"><td>'.$langs->trans(
"Language").
'</td>';
477 print($s ? $s.
' ' :
'');
480 print
'<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
483 print($s ? $s.
' ' :
'');
484 print(isset(
$object->conf->MAIN_LANG_DEFAULT) &&
$object->conf->MAIN_LANG_DEFAULT ==
'auto' ? $langs->trans(
"AutoDetectLang") : (!empty(
$object->
conf->MAIN_LANG_DEFAULT) ? $langs->trans(
"Language_".
$object->
conf->MAIN_LANG_DEFAULT) :
''));
488 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
490 print(!
getDolGlobalString(
'MAIN_LANDING_PAGE') ?
'' : $conf->global->MAIN_LANDING_PAGE);
492 print
'<td class="nowrap"><input class="oddeven" name="check_MAIN_LANDING_PAGE" disabled id="check_MAIN_LANDING_PAGE" type="checkbox" '.(!empty(
$object->conf->MAIN_LANDING_PAGE) ?
" checked" :
"");
493 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
494 print
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
495 print
'<td class="tdoverflowmax300">';
496 if (!empty(
$object->conf->MAIN_LANDING_PAGE)) {
498 if (!empty($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
499 if (is_array($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
500 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'label']);
502 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE]);
505 $urltoshow =
$object->conf->MAIN_LANDING_PAGE;
507 print
'<a href="'.DOL_URL_ROOT.
'/'.
$object->conf->MAIN_LANDING_PAGE.
'" target="_blank" rel="noopener">';
509 if (isset($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto']) && !empty($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'])) {
510 $s =
img_picto($urltoshow, $tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'],
'class="pictofixedwidth"');
513 print
img_picto($urltoshow,
'globe',
'class="pictofixedwidth"');
523 print
'<tr class="oddeven">'.
"\n";
524 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
525 print
'<td class="center"> </td>'.
"\n";
526 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->AGENDA_DEFAULT_VIEW) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
528 $tmplist = array(
''=>
' ',
'show_list'=>$langs->trans(
"ViewList"),
'show_month'=>$langs->trans(
"ViewCal"),
'show_week'=>$langs->trans(
"ViewWeek"),
'show_day'=>$langs->trans(
"ViewDay"),
'show_peruser'=>$langs->trans(
"ViewPerUser"));
529 if (!empty(
$object->conf->AGENDA_DEFAULT_VIEW)) {
530 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist,
$object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0,
'', 0, 0, 1);
532 print
'</td></tr>'.
"\n";
535 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
536 print
'<td>'.getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT',
' ').
'</td>';
537 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
538 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
$object->conf->MAIN_SIZE_LISTE_LIMIT :
' ').
'</td></tr>';
541 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
542 print
'<td>'.getDolGlobalString(
'MAIN_SIZE_SHORTLIST_LIMIT',
' ').
'</td>';
543 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
544 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT :
' ').
'</td></tr>';
555 print
'<div class="tabsAction">';
556 if (empty($user->admin) && !empty($dolibarr_main_demo)) {
557 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"FeatureDisabledInDemo").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
559 if ($caneditfield || !empty($user->admin)) {
560 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'&id='.
$object->id.
'">'.$langs->trans(
"Modify").
'</a>';
562 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
569if ($action ==
'edit') {
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage Dolibarr users.
dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$countdeleted=0, $indexdatabase=1, $nolog=0)
Remove a directory $dir and its subdirectories (or only files and subdirectories)
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
dol_set_user_param($db, $conf, &$user, $tab)
Save personal parameter.
picto_from_langcode($codelang, $moreatt='', $notitlealt=0)
Return img flag of country for a language code or country code.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $backtopagejsfields='', $accesskey='')
Return HTML code to output a button to open a dialog popup box.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
conf($dolibarr_main_document_root)
Load conf file (file must exists)
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
user_prepare_head(User $object)
Prepare array with list of tabs.
showSkins($fuser, $edit=0, $foruserprofile=false)
Show list of themes.