28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
35$langs->loadLangs(array(
'companies',
'products',
'admin',
'users',
'languages',
'projects',
'members'));
38$canreaduser = ($user->admin || $user->hasRight(
"user",
"user",
"read"));
41$action =
GETPOST(
'action',
'aZ09');
42$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'userihm';
44if (!isset($id) || empty($id)) {
50 $caneditfield = ((($user->id ==
$id) && $user->hasRight(
"user",
"self",
"write"))
51 || (($user->id != $id) && $user->hasRight(
"user",
"user",
"write")));
56if ($user->socid > 0) {
57 $socid = $user->socid;
59$feature2 = (($socid && $user->hasRight(
"user",
"self",
"write")) ?
'' :
'user');
62$hookmanager->initHooks(array(
'usercard',
'userihm',
'globalcard'));
64$result =
restrictedArea($user,
'user', $id,
'user&user', $feature2);
65if ($user->id != $id && !$canreaduser) {
69$dirtop =
"../core/menus/standard";
70$dirleft =
"../core/menus/standard";
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_CHECKBOX_LEFT_COLUMN") ==
"on") {
121 $tabparam[
"MAIN_CHECKBOX_LEFT_COLUMN"] = array(
"forcevalue" => 1,
"value" =>
GETPOSTINT(
"MAIN_CHECKBOX_LEFT_COLUMN"));
123 $tabparam[
"MAIN_CHECKBOX_LEFT_COLUMN"] =
'';
126 if (
GETPOST(
"check_MAIN_SIZE_SHORTLIST_LIMIT") ==
"on") {
127 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
GETPOSTINT(
"MAIN_SIZE_SHORTLIST_LIMIT");
129 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
'';
132 if (
GETPOST(
"check_AGENDA_DEFAULT_VIEW") ==
"on") {
133 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
GETPOST(
"AGENDA_DEFAULT_VIEW",
'aZ09');
135 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
'';
138 if (
GETPOST(
"check_MAIN_THEME") ==
"on") {
139 $tabparam[
"MAIN_THEME"] =
GETPOST(
'main_theme',
'aZ09');
141 $tabparam[
"MAIN_THEME"] =
'';
146 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] =
'';
148 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] = implode(
156 $tabparam[
'THEME_ELDY_BACKTITLE1'] =
'';
158 $tabparam[
'THEME_ELDY_BACKTITLE1'] = implode(
164 if (
GETPOST(
'check_THEME_ELDY_USE_HOVER') ==
'on') {
165 $tabparam[
"THEME_ELDY_USE_HOVER"] = 1;
167 $tabparam[
"THEME_ELDY_USE_HOVER"] = 0;
170 if (
GETPOST(
'check_THEME_ELDY_USE_CHECKED') ==
'on') {
171 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 1;
173 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 0;
176 if (
GETPOST(
'MAIN_OPTIMIZEFORTEXTBROWSER')) {
177 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 1;
179 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 0;
182 if (
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND')) {
183 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] =
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND',
'aZ09');
185 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] = 0;
191 include_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
192 $cachedir = DOL_DATA_ROOT.
'/users/temp/widgets';
195 header(
'Location: '.$_SERVER[
"PHP_SELF"].
'?id='.$id);
207$title = $person_name.
" - ".$langs->trans(
'Card');
210llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-user page-card_param_ihm');
214$tmparray[
'index.php'] = array(
'label'=>
'Dashboard',
'picto'=>
'graph');
215if (isModEnabled(
"societe")) {
216 $tmparray[
'societe/index.php?mainmenu=companies&leftmenu='] = array(
'label'=>
'ThirdPartiesArea',
'picto'=>
'company');
218if (isModEnabled(
'project')) {
219 $tmparray[
'projet/index.php?mainmenu=project&leftmenu='] = array(
'label'=>
'ProjectsArea',
'picto'=>
'project');
221 $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');
224if (isModEnabled(
'holiday') || isModEnabled(
'expensereport')) {
225 $tmparray[
'hrm/index.php?mainmenu=hrm&leftmenu='] = array(
'label'=>
'HRMArea',
'picto'=>
'user');
227if (isModEnabled(
"product") || isModEnabled(
"service")) {
228 $tmparray[
'product/index.php?mainmenu=products&leftmenu='] = array(
'label'=>
'ProductsAndServicesArea',
'picto'=>
'product');
230if (isModEnabled(
"propal") || isModEnabled(
'order') || isModEnabled(
'intervention') || isModEnabled(
'contract')) {
231 $tmparray[
'comm/index.php?mainmenu=commercial&leftmenu='] = array(
'label'=>
'CommercialArea',
'picto'=>
'commercial');
233if (isModEnabled(
'invoice')) {
234 $tmparray[
'compta/index.php?mainmenu=billing&leftmenu='] = array(
'label'=>
'InvoicesArea',
'picto'=>
'bill');
236if (isModEnabled(
'comptabilite') || isModEnabled(
'accounting')) {
237 $tmparray[
'compta/index.php?mainmenu=accountancy&leftmenu='] = array(
'label'=>
'AccountancyTreasuryArea',
'picto'=>
'bill');
239if (isModEnabled(
'member')) {
240 $tmparray[
'adherents/index.php?mainmenu=members&leftmenu='] = array(
'label'=>
'MembersArea',
'picto'=>
'member');
242if (isModEnabled(
'agenda')) {
243 $tmparray[
'comm/action/index.php?mainmenu=agenda&leftmenu='] = array(
'label'=>
'Agenda',
'picto'=>
'action');
245if (isModEnabled(
'ticket')) {
246 $tmparray[
'ticket/list.php?mainmenu=ticket&leftmenu='] = array(
'label'=>
'Tickets',
'picto'=>
'ticket');
250 $sql =
"SELECT b.rowid, b.fk_user, b.url, b.title";
251 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bookmark as b";
252 $sql .=
" WHERE b.entity IN (".getEntity(
'bookmark').
")";
253 $sql .=
" AND b.url NOT LIKE 'http%'";
255 $sql .=
" AND (b.fk_user = ".((int)
$object->id).
" OR b.fk_user is NULL OR b.fk_user = 0)";
257 $resql = $db->query($sql);
260 $num_rows = $db->num_rows($resql);
262 $tmparray[
'sep'.$i] = array(
263 'data-html'=>
'<span class="opacitymedium">--- '.$langs->trans(
"Bookmarks").
'</span>',
264 'label'=>
'--- '.$langs->trans(
"Bookmarks"),
267 while ($i < $num_rows) {
268 $obj = $db->fetch_object($resql);
270 $landing_url = str_replace(DOL_URL_ROOT,
'', $obj->url);
271 $tmparray[$landing_url] = array(
'label'=>$obj->title,
'picto'=>
'generic');
279$reshook = $hookmanager->executeHooks(
'addToLandingPageList', $tmparray, $object);
282} elseif ($reshook > 0) {
283 $tmparray = $hookmanager->resArray;
284} elseif ($reshook == 0) {
285 $tmparray = array_merge($tmparray, $hookmanager->resArray);
288foreach ($tmparray as $key => $val) {
289 $tmparray[$key][
'data-html'] =
img_picto($langs->trans($val[
'label']), empty($val[
'picto']) ?
'generic' : $val[
'picto'],
'class="pictofixedwidth"').$langs->trans($val[
'label']);
290 $tmparray[$key][
'label'] = $langs->trans($val[
'label']);
291 $tmparray[$key][
'picto'] = empty($val[
'picto']) ?
'generic' : $val[
'picto'];
296$title = $langs->trans(
"User");
298if ($action ==
'edit') {
299 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
300 print
'<input type="hidden" name="token" value="'.newToken().
'">';
301 print
'<input type="hidden" name="action" value="update">';
302 print
'<input type="hidden" name="id" value="'.$id.
'">';
306if ($action ==
'edit') {
311 if ($user->hasRight(
"user",
"user",
"read") || $user->admin) {
312 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
315 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin);
317 print
'<div class="underbanner clearboth"></div>';
322 if (!empty($conf->use_javascript_ajax)) {
323 print
'<script type="text/javascript">
324 jQuery(document).ready(function() {
325 function init_myfunc()
327 if (jQuery("#check_MAIN_LANDING_PAGE").prop("checked")) { jQuery("#MAIN_LANDING_PAGE").removeAttr(\'disabled\'); }
328 else { jQuery("#MAIN_LANDING_PAGE").attr(\'disabled\',\'disabled\'); }
330 if (jQuery("#check_MAIN_LANG_DEFAULT").prop("checked")) { jQuery("#main_lang_default").removeAttr(\'disabled\'); }
331 else { jQuery("#main_lang_default").attr(\'disabled\',\'disabled\'); }
333 if (jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").prop("checked")) { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").removeAttr(\'disabled\');}
334 else { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").attr(\'disabled\',\'disabled\');}
336 if (jQuery("#check_MAIN_SIZE_LISTE_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_LISTE_LIMIT").removeAttr(\'disabled\'); }
337 else { jQuery("#MAIN_SIZE_LISTE_LIMIT").attr(\'disabled\',\'disabled\'); }
339 if (jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").removeAttr(\'disabled\'); }
340 else { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").attr(\'disabled\',\'disabled\'); }
342 if (jQuery("#check_AGENDA_DEFAULT_VIEW").prop("checked")) { jQuery("#AGENDA_DEFAULT_VIEW").removeAttr(\'disabled\'); }
343 else { jQuery("#AGENDA_DEFAULT_VIEW").attr(\'disabled\',\'disabled\'); }
345 if (jQuery("#check_MAIN_THEME").prop("checked")) { jQuery(".themethumbs").removeAttr(\'disabled\'); }
346 else { jQuery(".themethumbs").attr(\'disabled\',\'disabled\'); }
348 if (jQuery("#check_THEME_ELDY_TOPMENU_BACK1").prop("checked")) { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").removeAttr(\'disabled\'); }
349 else { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").attr(\'disabled\',\'disabled\'); }
352 jQuery("#check_MAIN_LANDING_PAGE").click(function() { init_myfunc(); });
353 jQuery("#check_MAIN_LANG_DEFAULT").click(function() { init_myfunc(); });
354 jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").click(function() { init_myfunc(); });
355 jQuery("#check_MAIN_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); });
356 jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").click(function() { init_myfunc(); });
357 jQuery("#check_AGENDA_DEFAULT_VIEW").click(function() { init_myfunc(); });
358 jQuery("#check_MAIN_THEME").click(function() { init_myfunc(); });
359 jQuery("#check_THEME_ELDY_TOPMENU_BACK1").click(function() { init_myfunc(); });
360 jQuery("#check_THEME_ELDY_BACKTITLE1").click(function() { init_myfunc(); });
368 print
'<table class="noborder centpercent">';
369 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"DefaultValue").
'</td><td> </td><td>'.$langs->trans(
"PersonalValue").
'</td></tr>';
372 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"Language").
'</td>';
375 print $s ? $s.
' ' :
'';
378 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" :
"");
379 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
380 print
'> <label for="check_MAIN_LANG_DEFAULT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
382 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)));
386 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
388 print(!
getDolGlobalString(
'MAIN_LANDING_PAGE') ?
'' : $conf->global->MAIN_LANDING_PAGE);
390 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" :
"");
391 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
392 print
'> <label for="check_MAIN_LANDING_PAGE">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
394 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');
399 print
'<tr class="oddeven">'.
"\n";
400 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
401 print
'<td class="center"> </td>'.
"\n";
402 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" :
"");
403 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
404 print
'> <label for="check_AGENDA_DEFAULT_VIEW">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
406 $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"));
407 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist, (isset(
$object->conf->AGENDA_DEFAULT_VIEW) ?
$object->conf->AGENDA_DEFAULT_VIEW :
''), 0, 0, 0,
'');
408 print
'</td></tr>'.
"\n";
411 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_CHECKBOX_LEFT_COLUMN").
'</td>';
412 print
'<td>'.(getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans(
"Yes") : $langs->trans(
"No")).
'</td>';
413 print
'<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_CHECKBOX_LEFT_COLUMN" id="check_MAIN_CHECKBOX_LEFT_COLUMN" type="checkbox" '.(isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?
" checked" :
"");
414 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
415 print
'> <label for="check_MAIN_CHECKBOX_LEFT_COLUMN">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
416 print
'<td>'.$form->selectyesno(
"MAIN_CHECKBOX_LEFT_COLUMN", isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN :
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'), 1).
'</td></tr>';
419 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
421 print
'<td>'.($mainsizelistelimit > 0 ?
getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT') :
'<span class="opacitymedium">'.$langs->trans(
"Automatic").
'</span>').
'</td>';
422 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" :
"");
423 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
424 print
'> <label for="check_MAIN_SIZE_LISTE_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
425 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>';
428 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
430 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" :
"");
431 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
432 print
'> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
433 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>';
435 print
'</table><br>';
438 showSkins($object, (($user->admin || empty($dolibarr_main_demo)) ? 1 : 0), true);
441 print $form->buttonsSaveCancel();
445 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
447 $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">';
448 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
449 $morehtmlref .=
'</a>';
451 $urltovirtualcard =
'/user/virtualcard.php?id='.((int)
$object->id);
452 $morehtmlref .=
dolButtonToOpenUrlInDialogPopup(
'publicvirtualcard', $langs->transnoentitiesnoconv(
"PublicVirtualCardUrl").
' - '.
$object->getFullName($langs),
img_picto($langs->trans(
"PublicVirtualCardUrl"),
'card',
'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard,
'',
'nohover');
454 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin,
'rowid',
'ref', $morehtmlref);
456 print
'<div class="fichecenter">';
458 print
'<div class="underbanner clearboth"></div>';
459 print
'<table class="border centpercent tableforfield">';
462 print
'<tr><td class="titlefield">'.$langs->trans(
"Login").
'</td>';
464 print
'<td class="error">';
465 print $langs->trans(
"LoginAccountDisableInDolibarr");
470 if (property_exists($object,
'admin')) {
471 if (isModEnabled(
'multicompany') && !empty(
$object->admin) && empty(
$object->entity)) {
472 $addadmin .=
img_picto($langs->trans(
"SuperAdministratorDesc"),
"redstar",
'class="paddingleft"');
473 } elseif (!empty(
$object->admin)) {
474 $addadmin .=
img_picto($langs->trans(
"AdministratorDesc"),
"star",
'class="paddingleft"');
489 print
'<div class="div-table-responsive">';
490 print
'<table class="noborder centpercent">';
491 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>';
494 print
'<tr class="oddeven"><td>'.$langs->trans(
"Language").
'</td>';
497 print($s ? $s.
' ' :
'');
500 print
'<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
503 print($s ? $s.
' ' :
'');
504 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) :
''));
508 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
510 print(!
getDolGlobalString(
'MAIN_LANDING_PAGE') ?
'' : $conf->global->MAIN_LANDING_PAGE);
512 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" :
"");
513 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
514 print
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
515 print
'<td class="tdoverflowmax300">';
516 if (!empty(
$object->conf->MAIN_LANDING_PAGE)) {
518 if (!empty($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
519 if (is_array($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
520 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'label']);
522 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE]);
525 $urltoshow =
$object->conf->MAIN_LANDING_PAGE;
527 print
'<a href="'.DOL_URL_ROOT.
'/'.
$object->conf->MAIN_LANDING_PAGE.
'" target="_blank" rel="noopener">';
529 if (isset($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto']) && !empty($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'])) {
530 $s =
img_picto($urltoshow, $tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'],
'class="pictofixedwidth"');
533 print
img_picto($urltoshow,
'globe',
'class="pictofixedwidth"');
543 print
'<tr class="oddeven">'.
"\n";
544 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
545 print
'<td class="center"> </td>'.
"\n";
546 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->AGENDA_DEFAULT_VIEW) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
548 $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"));
549 if (!empty(
$object->conf->AGENDA_DEFAULT_VIEW)) {
550 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist,
$object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0,
'', 0, 0, 1);
552 print
'</td></tr>'.
"\n";
555 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_CHECKBOX_LEFT_COLUMN").
'</td>';
556 print
'<td>'.(getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans(
"Yes") : $langs->trans(
"No")).
'</td>';
557 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
558 print
'<td>'.(isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans(
"Yes") : $langs->trans(
"No")) :
' ').
'</td></tr>';
561 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
563 print
'<td>'.($mainsizelistelimit > 0 ?
getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT') :
'<span class="opacitymedium">'.$langs->trans(
"Automatic").
'</span>').
'</td>';
564 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
565 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
$object->conf->MAIN_SIZE_LISTE_LIMIT :
' ').
'</td></tr>';
568 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
569 print
'<td>'.getDolGlobalString(
'MAIN_SIZE_SHORTLIST_LIMIT',
' ').
'</td>';
570 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
571 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT :
' ').
'</td></tr>';
582 print
'<div class="tabsAction">';
583 if (empty($user->admin) && !empty($dolibarr_main_demo)) {
584 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"FeatureDisabledInDemo").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
586 if ($caneditfield || !empty($user->admin)) {
587 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'&id='.
$object->id.
'">'.$langs->trans(
"Modify").
'</a>';
589 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
596if ($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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a 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.