29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
44$langs->loadLangs(array(
'companies',
'products',
'admin',
'users',
'languages',
'projects',
'members'));
47$canreaduser = ($user->admin || $user->hasRight(
"user",
"user",
"read"));
51$action =
GETPOST(
'action',
'aZ09');
52$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'userihm';
54if (!isset($id) || empty($id)) {
60 $caneditfield = ((($user->id ==
$id) && $user->hasRight(
"user",
"self",
"write"))
61 || (($user->id != $id) && $user->hasRight(
"user",
"user",
"write")));
66if ($user->socid > 0) {
67 $socid = $user->socid;
69$feature2 = (($socid && $user->hasRight(
"user",
"self",
"write")) ?
'' :
'user');
72$hookmanager->initHooks(array(
'usercard',
'userihm',
'globalcard'));
74$result =
restrictedArea($user,
'user', $id,
'user&user', $feature2);
75if ($user->id != $id && !$canreaduser) {
79$dirtop =
"../core/menus/standard";
80$dirleft =
"../core/menus/standard";
102$parameters = array(
'id' => $socid);
103$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
108if (empty($reshook)) {
109 if ($action ==
'update' && ($caneditfield || !empty($user->admin))) {
113 if (
GETPOST(
"check_MAIN_LANDING_PAGE") ==
"on") {
114 $tabparam[
"MAIN_LANDING_PAGE"] =
GETPOST(
"MAIN_LANDING_PAGE",
'alphanohtml');
116 $tabparam[
"MAIN_LANDING_PAGE"] =
'';
119 if (
GETPOST(
"check_MAIN_LANG_DEFAULT") ==
"on") {
120 $tabparam[
"MAIN_LANG_DEFAULT"] =
GETPOST(
"main_lang_default",
'aZ09');
122 $tabparam[
"MAIN_LANG_DEFAULT"] =
'';
125 if (
GETPOST(
"check_MAIN_SIZE_LISTE_LIMIT") ==
"on") {
126 $tabparam[
"MAIN_SIZE_LISTE_LIMIT"] =
GETPOSTINT(
"MAIN_SIZE_LISTE_LIMIT");
128 $tabparam[
"MAIN_SIZE_LISTE_LIMIT"] =
'';
131 if (
GETPOST(
"check_MAIN_CHECKBOX_LEFT_COLUMN") ==
"on") {
132 $tabparam[
"MAIN_CHECKBOX_LEFT_COLUMN"] = array(
"forcevalue" => 1,
"value" =>
GETPOSTINT(
"MAIN_CHECKBOX_LEFT_COLUMN"));
134 $tabparam[
"MAIN_CHECKBOX_LEFT_COLUMN"] =
'';
137 if (
GETPOST(
"check_MAIN_SIZE_SHORTLIST_LIMIT") ==
"on") {
138 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
GETPOSTINT(
"MAIN_SIZE_SHORTLIST_LIMIT");
140 $tabparam[
"MAIN_SIZE_SHORTLIST_LIMIT"] =
'';
143 if (
GETPOST(
"check_AGENDA_DEFAULT_VIEW") ==
"on") {
144 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
GETPOST(
"AGENDA_DEFAULT_VIEW",
'aZ09');
146 $tabparam[
"AGENDA_DEFAULT_VIEW"] =
'';
149 if (
GETPOST(
"check_MAIN_THEME") ==
"on") {
150 $tabparam[
"MAIN_THEME"] =
GETPOST(
'main_theme',
'aZ09');
152 $tabparam[
"MAIN_THEME"] =
'';
157 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] =
'';
159 $tabparam[
'THEME_ELDY_TOPMENU_BACK1'] = implode(
167 $tabparam[
'THEME_ELDY_BACKTITLE1'] =
'';
169 $tabparam[
'THEME_ELDY_BACKTITLE1'] = implode(
175 if (
GETPOST(
'check_THEME_ELDY_USE_HOVER') ==
'on') {
176 $tabparam[
"THEME_ELDY_USE_HOVER"] = 1;
178 $tabparam[
"THEME_ELDY_USE_HOVER"] = 0;
181 if (
GETPOST(
'check_THEME_ELDY_USE_CHECKED') ==
'on') {
182 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 1;
184 $tabparam[
"THEME_ELDY_USE_CHECKED"] = 0;
187 if (
GETPOST(
'MAIN_OPTIMIZEFORTEXTBROWSER')) {
188 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 1;
190 $tabparam[
"MAIN_OPTIMIZEFORTEXTBROWSER"] = 0;
193 if (
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND')) {
194 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] =
GETPOST(
'MAIN_OPTIMIZEFORCOLORBLIND',
'aZ09');
196 $tabparam[
"MAIN_OPTIMIZEFORCOLORBLIND"] = 0;
202 include_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
203 $cachedir = DOL_DATA_ROOT.
'/users/temp/widgets';
206 header(
'Location: '.$_SERVER[
"PHP_SELF"].
'?id='.$id);
218$title = $person_name.
" - ".$langs->trans(
'Card');
221llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-user page-card_param_ihm');
225$tmparray[
'index.php'] = array(
'label' =>
'Dashboard',
'picto' =>
'graph');
226if (isModEnabled(
"societe")) {
227 $tmparray[
'societe/index.php?mainmenu=companies&leftmenu='] = array(
'label' =>
'ThirdPartiesArea',
'picto' =>
'company');
229if (isModEnabled(
'project')) {
230 $tmparray[
'projet/index.php?mainmenu=project&leftmenu='] = array(
'label' =>
'ProjectsArea',
'picto' =>
'project');
232 $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');
235if (isModEnabled(
'holiday') || isModEnabled(
'expensereport')) {
236 $tmparray[
'hrm/index.php?mainmenu=hrm&leftmenu='] = array(
'label' =>
'HRMArea',
'picto' =>
'user');
238if (isModEnabled(
"product") || isModEnabled(
"service")) {
239 $tmparray[
'product/index.php?mainmenu=products&leftmenu='] = array(
'label' =>
'ProductsAndServicesArea',
'picto' =>
'product');
241if (isModEnabled(
"propal") || isModEnabled(
'order') || isModEnabled(
'intervention') || isModEnabled(
'contract')) {
242 $tmparray[
'comm/index.php?mainmenu=commercial&leftmenu='] = array(
'label' =>
'CommercialArea',
'picto' =>
'commercial');
244if (isModEnabled(
'invoice')) {
245 $tmparray[
'compta/index.php?mainmenu=billing&leftmenu='] = array(
'label' =>
'InvoicesArea',
'picto' =>
'bill');
247if (isModEnabled(
'comptabilite') || isModEnabled(
'accounting')) {
248 $tmparray[
'compta/index.php?mainmenu=accountancy&leftmenu='] = array(
'label' =>
'AccountancyTreasuryArea',
'picto' =>
'bill');
250if (isModEnabled(
'member')) {
251 $tmparray[
'adherents/index.php?mainmenu=members&leftmenu='] = array(
'label' =>
'MembersArea',
'picto' =>
'member');
253if (isModEnabled(
'agenda')) {
254 $tmparray[
'comm/action/index.php?mainmenu=agenda&leftmenu='] = array(
'label' =>
'Agenda',
'picto' =>
'action');
256if (isModEnabled(
'ticket')) {
257 $tmparray[
'ticket/list.php?mainmenu=ticket&leftmenu='] = array(
'label' =>
'Tickets',
'picto' =>
'ticket');
261 $sql =
"SELECT b.rowid, b.fk_user, b.url, b.title";
262 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bookmark as b";
263 $sql .=
" WHERE b.entity IN (".getEntity(
'bookmark').
")";
264 $sql .=
" AND b.url NOT LIKE 'http%'";
266 $sql .=
" AND (b.fk_user = ".((int)
$object->id).
" OR b.fk_user is NULL OR b.fk_user = 0)";
268 $resql = $db->query($sql);
271 $num_rows = $db->num_rows($resql);
273 $tmparray[
'sep'.$i] = array(
274 'data-html' =>
'<span class="opacitymedium">--- '.$langs->trans(
"Bookmarks").
'</span>',
275 'label' =>
'--- '.$langs->trans(
"Bookmarks"),
278 while ($i < $num_rows) {
279 $obj = $db->fetch_object($resql);
281 $landing_url = str_replace(DOL_URL_ROOT,
'', $obj->url);
282 $tmparray[$landing_url] = array(
'label' => $obj->title,
'picto' =>
'generic');
290$reshook = $hookmanager->executeHooks(
'addToLandingPageList', $tmparray, $object);
293} elseif ($reshook > 0) {
294 $tmparray = $hookmanager->resArray;
295} elseif ($reshook == 0) {
296 $tmparray = array_merge($tmparray, $hookmanager->resArray);
299foreach ($tmparray as $key => $val) {
300 $tmparray[$key][
'data-html'] =
img_picto($langs->trans($val[
'label']), empty($val[
'picto']) ?
'generic' : $val[
'picto'],
'class="pictofixedwidth"').$langs->trans($val[
'label']);
301 $tmparray[$key][
'label'] = $langs->trans($val[
'label']);
302 $tmparray[$key][
'picto'] = empty($val[
'picto']) ?
'generic' : $val[
'picto'];
307$title = $langs->trans(
"User");
309if ($action ==
'edit') {
310 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
311 print
'<input type="hidden" name="token" value="'.newToken().
'">';
312 print
'<input type="hidden" name="action" value="update">';
313 print
'<input type="hidden" name="id" value="'.$id.
'">';
317if ($action ==
'edit') {
322 if ($user->hasRight(
"user",
"user",
"read") || $user->admin) {
323 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
326 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin);
328 print
'<div class="underbanner clearboth"></div>';
333 if (!empty(
$conf->use_javascript_ajax)) {
334 print
'<script type="text/javascript">
335 jQuery(document).ready(function() {
336 function init_myfunc()
338 if (jQuery("#check_MAIN_LANDING_PAGE").prop("checked")) { jQuery("#MAIN_LANDING_PAGE").removeAttr(\'disabled\'); }
339 else { jQuery("#MAIN_LANDING_PAGE").attr(\'disabled\',\'disabled\'); }
341 if (jQuery("#check_MAIN_LANG_DEFAULT").prop("checked")) { jQuery("#main_lang_default").removeAttr(\'disabled\'); }
342 else { jQuery("#main_lang_default").attr(\'disabled\',\'disabled\'); }
344 if (jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").prop("checked")) { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").removeAttr(\'disabled\');}
345 else { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").attr(\'disabled\',\'disabled\');}
347 if (jQuery("#check_MAIN_SIZE_LISTE_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_LISTE_LIMIT").removeAttr(\'disabled\'); }
348 else { jQuery("#MAIN_SIZE_LISTE_LIMIT").attr(\'disabled\',\'disabled\'); }
350 if (jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").removeAttr(\'disabled\'); }
351 else { jQuery("#MAIN_SIZE_SHORTLIST_LIMIT").attr(\'disabled\',\'disabled\'); }
353 if (jQuery("#check_AGENDA_DEFAULT_VIEW").prop("checked")) { jQuery("#AGENDA_DEFAULT_VIEW").removeAttr(\'disabled\'); }
354 else { jQuery("#AGENDA_DEFAULT_VIEW").attr(\'disabled\',\'disabled\'); }
356 if (jQuery("#check_MAIN_THEME").prop("checked")) { jQuery(".themethumbs").removeAttr(\'disabled\'); }
357 else { jQuery(".themethumbs").attr(\'disabled\',\'disabled\'); }
359 if (jQuery("#check_THEME_ELDY_TOPMENU_BACK1").prop("checked")) { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").removeAttr(\'disabled\'); }
360 else { jQuery("#colorpickerTHEME_ELDY_TOPMENU_BACK1").attr(\'disabled\',\'disabled\'); }
363 jQuery("#check_MAIN_LANDING_PAGE").click(function() { init_myfunc(); });
364 jQuery("#check_MAIN_LANG_DEFAULT").click(function() { init_myfunc(); });
365 jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").click(function() { init_myfunc(); });
366 jQuery("#check_MAIN_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); });
367 jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").click(function() { init_myfunc(); });
368 jQuery("#check_AGENDA_DEFAULT_VIEW").click(function() { init_myfunc(); });
369 jQuery("#check_MAIN_THEME").click(function() { init_myfunc(); });
370 jQuery("#check_THEME_ELDY_TOPMENU_BACK1").click(function() { init_myfunc(); });
371 jQuery("#check_THEME_ELDY_BACKTITLE1").click(function() { init_myfunc(); });
379 print
'<table class="noborder centpercent">';
380 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"DefaultValue").
'</td><td> </td><td>'.$langs->trans(
"PersonalValue").
'</td></tr>';
383 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"Language").
'</td>';
386 print $s ? $s.
' ' :
'';
387 print(
getDolGlobalString(
'MAIN_LANG_DEFAULT') ==
'auto' ? $form->textwithpicto($langs->trans(
"Automatic"), $langs->trans(
"AutoDetectLang")) : $langs->trans(
"Language_" .
getDolGlobalString(
'MAIN_LANG_DEFAULT')));
389 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" :
"");
390 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
391 print
'> <label for="check_MAIN_LANG_DEFAULT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
393 print $formadmin->select_language((!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
$object->conf->MAIN_LANG_DEFAULT :
''),
'main_lang_default', 1, array(), 0, 0, (!empty($dolibarr_main_demo)));
397 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
401 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" :
"");
402 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
403 print
'> <label for="check_MAIN_LANDING_PAGE">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
405 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');
410 print
'<tr class="oddeven">'.
"\n";
411 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
412 print
'<td class="center"> </td>'.
"\n";
413 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" :
"");
414 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
415 print
'> <label for="check_AGENDA_DEFAULT_VIEW">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
417 $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"));
418 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist, (isset(
$object->conf->AGENDA_DEFAULT_VIEW) ?
$object->conf->AGENDA_DEFAULT_VIEW :
''), 0, 0, 0,
'');
419 print
'</td></tr>'.
"\n";
422 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_CHECKBOX_LEFT_COLUMN").
'</td>';
423 print
'<td>'.(getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans(
"Yes") : $langs->trans(
"No")).
'</td>';
424 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" :
"");
425 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
426 print
'> <label for="check_MAIN_CHECKBOX_LEFT_COLUMN">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
427 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>';
430 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
432 print
'<td>'.($mainsizelistelimit > 0 ?
getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT') :
'<span class="">'.$langs->trans(
"Automatic").
'</span>').
'</td>';
433 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" :
"");
434 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
435 print
'> <label for="check_MAIN_SIZE_LISTE_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
436 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>';
439 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
441 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" :
"");
442 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
443 print
'> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
444 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>';
446 print
'</table><br>';
449 showSkins($object, (($user->admin || empty($dolibarr_main_demo)) ? 1 : 0), true);
452 print $form->buttonsSaveCancel();
456 $linkback =
'<a href="'.DOL_URL_ROOT.
'/user/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
458 $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">';
459 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
460 $morehtmlref .=
'</a>';
462 $urltovirtualcard =
'/user/virtualcard.php?id='.((int)
$object->id);
463 $morehtmlref .=
dolButtonToOpenUrlInDialogPopup(
'publicvirtualcard', $langs->transnoentitiesnoconv(
"PublicVirtualCardUrl").
' - '.
$object->getFullName($langs),
img_picto($langs->trans(
"PublicVirtualCardUrl"),
'card',
'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard,
'',
'nohover');
465 dol_banner_tab($object,
'id', $linkback, $user->hasRight(
"user",
"user",
"read") || $user->admin,
'rowid',
'ref', $morehtmlref);
467 print
'<div class="fichecenter">';
469 print
'<div class="underbanner clearboth"></div>';
470 print
'<table class="border centpercent tableforfield">';
473 print
'<tr><td class="titlefield">'.$langs->trans(
"Login").
'</td>';
475 print
'<td class="error">';
476 print $langs->trans(
"LoginAccountDisableInDolibarr");
481 if (property_exists($object,
'admin')) {
482 if (isModEnabled(
'multicompany') && !empty(
$object->admin) && empty(
$object->entity)) {
483 $addadmin .=
img_picto($langs->trans(
"SuperAdministratorDesc"),
"redstar",
'class="paddingleft"');
484 } elseif (!empty(
$object->admin)) {
485 $addadmin .=
img_picto($langs->trans(
"AdministratorDesc"),
"star",
'class="paddingleft"');
500 print
'<div class="div-table-responsive">';
501 print
'<table class="noborder centpercent">';
502 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>';
505 print
'<tr class="oddeven"><td>'.$langs->trans(
"Language").
'</td>';
508 print($s ? $s.
' ' :
'');
509 print(
getDolGlobalString(
'MAIN_LANG_DEFAULT') ==
'auto' ? $form->textwithpicto($langs->trans(
"Automatic"), $langs->trans(
"AutoDetectLang")) : $langs->trans(
"Language_" .
getDolGlobalString(
'MAIN_LANG_DEFAULT')));
511 print
'<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_LANG_DEFAULT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
514 print($s ? $s.
' ' :
'');
515 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) :
''));
519 print
'<tr class="oddeven"><td>'.$langs->trans(
"LandingPage").
'</td>';
523 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" :
"");
524 print empty($dolibarr_main_demo) ?
'' :
' disabled="disabled"';
525 print
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
526 print
'<td class="tdoverflowmax300">';
527 if (!empty(
$object->conf->MAIN_LANDING_PAGE)) {
529 if (!empty($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
530 if (is_array($tmparray[
$object->conf->MAIN_LANDING_PAGE])) {
531 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'label']);
533 $urltoshow = $langs->trans($tmparray[
$object->conf->MAIN_LANDING_PAGE]);
536 $urltoshow =
$object->conf->MAIN_LANDING_PAGE;
538 print
'<a href="'.DOL_URL_ROOT.
'/'.
$object->conf->MAIN_LANDING_PAGE.
'" target="_blank" rel="noopener">';
540 if (isset($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto']) && !empty($tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'])) {
541 $s =
img_picto($urltoshow, $tmparray[
$object->conf->MAIN_LANDING_PAGE][
'picto'],
'class="pictofixedwidth"');
544 print
img_picto($urltoshow,
'globe',
'class="pictofixedwidth"');
554 print
'<tr class="oddeven">'.
"\n";
555 print
'<td>'.$langs->trans(
"AGENDA_DEFAULT_VIEW").
'</td>'.
"\n";
556 print
'<td class="center"> </td>'.
"\n";
557 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->AGENDA_DEFAULT_VIEW) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
559 $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"));
560 if (!empty(
$object->conf->AGENDA_DEFAULT_VIEW)) {
561 print $form->selectarray(
'AGENDA_DEFAULT_VIEW', $tmplist,
$object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0,
'', 0, 0, 1);
563 print
'</td></tr>'.
"\n";
566 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_CHECKBOX_LEFT_COLUMN").
'</td>';
567 print
'<td>'.(getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans(
"Yes") : $langs->trans(
"No")).
'</td>';
568 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
569 print
'<td>'.(isset(
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? (
$object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans(
"Yes") : $langs->trans(
"No")) :
' ').
'</td></tr>';
572 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeList").
'</td>';
574 print
'<td>'.($mainsizelistelimit > 0 ?
getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT') :
'<span class="">'.$langs->trans(
"Automatic").
'</span>').
'</td>';
575 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
576 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_LISTE_LIMIT) ?
$object->conf->MAIN_SIZE_LISTE_LIMIT :
' ').
'</td></tr>';
579 print
'<tr class="oddeven"><td>'.$langs->trans(
"MaxSizeShortList").
'</td>';
580 print
'<td>'.getDolGlobalString(
'MAIN_SIZE_SHORTLIST_LIMIT',
' ').
'</td>';
581 print
'<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
" checked" :
"").
'> '.$langs->trans(
"UsePersonalValue").
'</td>';
582 print
'<td>'.(!empty(
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ?
$object->conf->MAIN_SIZE_SHORTLIST_LIMIT :
' ').
'</td></tr>';
593 print
'<div class="tabsAction">';
594 if (empty($user->admin) && !empty($dolibarr_main_demo)) {
595 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"FeatureDisabledInDemo").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
597 if ($caneditfield || !empty($user->admin)) {
598 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'&id='.
$object->id.
'">'.$langs->trans(
"Modify").
'</a>';
600 print
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$langs->trans(
"Modify").
'</a>';
607if ($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)
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.