31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
41$langs->loadLangs(array(
'admin',
'languages',
'other',
'companies',
'products',
'members',
'projects',
'hrm',
'agenda'));
47$action =
GETPOST(
'action',
'aZ09');
48$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'adminihm';
50$mode =
GETPOST(
'mode',
'aZ09') ?
GETPOST(
'mode',
'aZ09') :
'other';
52if (!defined(
"MAIN_MOTD")) {
53 define(
"MAIN_MOTD",
"");
61$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
66if (
GETPOST(
'cancel',
'alpha')) {
72if (preg_match(
'/^(set|del)_([A-Z_]+)$/', $action, $regs)) {
73 if ($regs[1] ==
'set') {
80if ($action ==
'removebackgroundlogin' &&
getDolGlobalString(
'MAIN_LOGIN_BACKGROUND')) {
82 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
84 $logofile = $conf->mycompany->dir_output.
'/logos/' .
getDolGlobalString(
'MAIN_LOGIN_BACKGROUND');
100if ($action ==
'update') {
103 if ($mode ==
'template') {
109 if (GETPOSTISSET(
'THEME_ELDY_USECOMOACTROW')) {
110 dolibarr_set_const($db,
"THEME_ELDY_USECOMOACTROW",
GETPOST(
'THEME_ELDY_USECOMOACTROW'),
'chaine', 0,
'', $conf->entity);
113 if (GETPOSTISSET(
'THEME_DARKMODEENABLED')) {
114 $val =
GETPOST(
'THEME_DARKMODEENABLED');
119 dolibarr_set_const($db,
"THEME_DARKMODEENABLED", $val,
'chaine', 0,
'', $conf->entity);
123 if (GETPOSTISSET(
'THEME_TOPMENU_DISABLE_IMAGE')) {
124 $val =
GETPOST(
'THEME_TOPMENU_DISABLE_IMAGE');
128 dolibarr_set_const($db,
'THEME_TOPMENU_DISABLE_IMAGE',
GETPOST(
'THEME_TOPMENU_DISABLE_IMAGE'),
'chaine', 0,
'', $conf->entity);
143 dolibarr_set_const($db,
'THEME_ELDY_TOPMENU_BACK1', $val,
'chaine', 0,
'', $conf->entity);
150 dolibarr_set_const($db,
'THEME_ELDY_VERMENU_BACK1', $val,
'chaine', 0,
'', $conf->entity);
157 dolibarr_set_const($db,
'THEME_ELDY_TEXTTITLENOTAB', $val,
'chaine', 0,
'', $conf->entity);
164 dolibarr_set_const($db,
'THEME_ELDY_BACKTITLE1', $val,
'chaine', 0,
'', $conf->entity);
171 dolibarr_set_const($db,
'THEME_ELDY_TEXTTITLE', $val,
'chaine', 0,
'', $conf->entity);
178 dolibarr_set_const($db,
'THEME_ELDY_TEXTTITLELINK', $val,
'chaine', 0,
'', $conf->entity);
185 dolibarr_set_const($db,
'THEME_ELDY_LINEIMPAIR1', $val,
'chaine', 0,
'', $conf->entity);
191 dolibarr_set_const($db,
'THEME_ELDY_LINEIMPAIR2', $val,
'chaine', 0,
'', $conf->entity);
198 dolibarr_set_const($db,
'THEME_ELDY_LINEPAIR1', $val,
'chaine', 0,
'', $conf->entity);
204 dolibarr_set_const($db,
'THEME_ELDY_LINEPAIR2', $val,
'chaine', 0,
'', $conf->entity);
218 dolibarr_set_const($db,
"THEME_ELDY_USE_HOVER", $val,
'chaine', 0,
'', $conf->entity);
225 dolibarr_set_const($db,
"THEME_ELDY_USE_CHECKED", $val,
'chaine', 0,
'', $conf->entity);
232 dolibarr_set_const($db,
'THEME_ELDY_BTNACTION', $val,
'chaine', 0,
'', $conf->entity);
239 dolibarr_set_const($db,
'THEME_ELDY_TEXTBTNACTION', $val,
'chaine', 0,
'', $conf->entity);
243 if ($mode ==
'dashboard') {
247 if ($mode ==
'other') {
254 if (GETPOSTISSET(
"MAIN_CHECKBOX_LEFT_COLUMN")) {
263 dolibarr_set_const($db,
"MAIN_DEFAULT_WORKING_DAYS",
GETPOST(
"MAIN_DEFAULT_WORKING_DAYS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
264 dolibarr_set_const($db,
"MAIN_DEFAULT_WORKING_HOURS",
GETPOST(
"MAIN_DEFAULT_WORKING_HOURS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
266 dolibarr_set_const($db,
"MAIN_BUGTRACK_ENABLELINK",
GETPOST(
"MAIN_BUGTRACK_ENABLELINK",
'alpha'),
'chaine', 0,
'', $conf->entity);
268 dolibarr_set_const($db,
"MAIN_FIRSTNAME_NAME_POSITION",
GETPOST(
"MAIN_FIRSTNAME_NAME_POSITION",
'aZ09'),
'chaine', 0,
'', $conf->entity);
271 if ($mode ==
'login') {
275 $varforimage =
'imagebackground';
276 $dirforimage = $conf->mycompany->dir_output .
'/logos/';
277 if ($_FILES[$varforimage][
"tmp_name"]) {
279 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
280 $original_file = $reg[1];
284 dol_syslog(
"Move file " . $_FILES[$varforimage][
"tmp_name"] .
" to " . $dirforimage . $original_file);
285 if (!is_dir($dirforimage)) {
288 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage][
'error']);
290 dolibarr_set_const($db,
"MAIN_LOGIN_BACKGROUND", $original_file,
'chaine', 0,
'', $conf->entity);
291 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
293 $langs->load(
"errors");
294 $tmparray = explode(
':', $result);
295 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
302 $langs->load(
"errors");
309 if ($mode ==
'css') {
312 dolibarr_set_const($db,
"MAIN_IHM_CUSTOM_CSS",
GETPOST(
'MAIN_IHM_CUSTOM_CSS',
'restricthtml'),
'chaine', 0,
'', $conf->entity);
315 $_SESSION[
"mainmenu"] =
"";
317 if (
GETPOST(
'dol_resetcache')) {
321 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET(
'page_y') ?
'&page_y='.GETPOSTINT(
'page_y') :
''));
330$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
334 $langs->trans(
"Setup"),
340 '/includes/ace/src/ace.js',
341 '/includes/ace/src/ext-statusbar.js',
342 '/includes/ace/src/ext-language_tools.js',
349$form =
new Form($db);
355print
'<span class="opacitymedium">'.$langs->trans(
"DisplayDesc").
"</span><br>\n";
359require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
361print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
362print
'<input type="hidden" name="token" value="'.newToken().
'">';
363print
'<input type="hidden" name="action" value="update">';
364print
'<input type="hidden" name="page_y" value="">';
365print
'<input type="hidden" id="mode" name="mode" value="'.dol_escape_htmltag($mode).
'">';
366print
'<input type="hidden" name="dol_resetcache" value="1">';
376if ($mode ==
'other') {
377 print
'<div class="div-table-responsive-no-min">';
378 print
'<table summary="edit" class="noborder centpercent editmode tableforfield">';
380 print
'<tr class="liste_titre"><td class="titlefieldmiddle">';
381 print $langs->trans(
"Language");
382 print
'</td><td class="titlefieldmiddle">';
386 print
'<tr class="oddeven"><td>'.$langs->trans(
"DefaultLanguage").
'</td><td>';
387 print
img_picto(
'',
'language',
'class="pictofixedwidth"');
388 print $formadmin->select_language(
getDolGlobalString(
'MAIN_LANG_DEFAULT'),
'MAIN_LANG_DEFAULT', 1,
null,
'', 0, 0,
'minwidth300', 2);
394 print
'<tr class="oddeven"><td>' . $langs->trans(
"EnableMultilangInterface") .
'</td><td>';
395 print ajax_constantonoff(
"MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'language');
399 print
'</table>' .
"\n";
402 print
'<div class="center">';
403 print
'<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans(
"Save") .
'">';
404 print
'<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
411 print
'<div class="div-table-responsive-no-min">';
412 print
'<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
414 print
'<tr class="liste_titre"><td class="titlefieldmiddle">';
415 print $langs->trans(
"Miscellaneous");
417 print
'<td class="titlefieldmiddle"></td>';
420 if (!empty($conf->use_javascript_ajax)) {
422 print
'<tr class="oddeven"><td>' . $langs->trans(
"ShowQuickAddLink") .
'</td><td>';
423 print ajax_constantonoff(
"MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
429 $pictohelp =
'<span class="fa fa-question-circle"></span>';
430 print
'<tr class="oddeven"><td>' . str_replace(
'{picto}', $pictohelp, $langs->trans(
"DisableLinkToHelp",
'{picto}')) .
'</td><td>';
431 print ajax_constantonoff(
"MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
437 print
'<tr class="oddeven"><td>' . $langs->trans(
"DefaultMaxSizeList") .
'</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="' .
getDolGlobalString(
'MAIN_SIZE_LISTE_LIMIT') .
'"></td>';
441 print
'<tr class="oddeven"><td>' . $langs->trans(
"DefaultMaxSizeShortList") .
'</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="' .
getDolGlobalString(
'MAIN_SIZE_SHORTLIST_LIMIT') .
'"></td>';
445 print
'<tr class="oddeven"><td>' . $langs->trans(
"MAIN_CHECKBOX_LEFT_COLUMN") .
'</td><td>';
446 print ajax_constantonoff(
"MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 1,
'',
'other');
459 print
'<tr class="oddeven"><td>' . $langs->trans(
"WeekStartOnDay") .
'</td><td>';
460 print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK :
'1'),
'MAIN_START_WEEK', 0);
465 print
'<tr class="oddeven"><td>' . $langs->trans(
"DefaultWorkingDays") .
'</td><td>';
466 print
'<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS :
'1-5') .
'">';
471 print
'<tr class="oddeven"><td>' . $langs->trans(
"DefaultWorkingHours") .
'</td><td>';
472 print
'<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS :
'9-18') .
'">';
477 print
'<tr class="oddeven"><td>' . $langs->trans(
"FirstnameNamePosition") .
'</td><td>';
478 $array = array(0 => $langs->trans(
"Firstname") .
' ' . $langs->trans(
"Lastname"), 1 => $langs->trans(
"Lastname") .
' ' . $langs->trans(
"Firstname"));
479 print $form->selectarray(
'MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
484 print
'<tr class="oddeven"><td>' . $langs->trans(
"HideUnauthorizedMenu") .
'</td><td>';
486 print ajax_constantonoff(
"MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
491 print
'<tr class="oddeven"><td>' . $langs->trans(
"ButtonHideUnauthorized") .
'</td><td>';
493 print ajax_constantonoff(
"MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
508 print
'<tr class="oddeven"><td>' . $langs->trans(
"ShowSearchAreaInTopMenu") .
'</td><td>';
509 print ajax_constantonoff(
"MAIN_USE_TOP_MENU_SEARCH_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
514 print
'<tr class="oddeven"><td>';
515 print $form->textwithpicto($langs->trans(
"ShowBugTrackLink", $langs->transnoentitiesnoconv(
"FindBug")), $langs->trans(
"ShowBugTrackLinkDesc"));
517 print
'<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (!
getDolGlobalString(
'MAIN_BUGTRACK_ENABLELINK') ?
'' : $conf->global->MAIN_BUGTRACK_ENABLELINK) .
'">';
522 print
'<tr class="oddeven"><td>' . $form->textwithpicto($langs->trans(
"DisableJavascript"), $langs->trans(
"DisableJavascriptNote")) .
'</td><td>';
523 print ajax_constantonoff(
"MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'',
'other');
527 print
'</table>' .
"\n";
532if ($mode ==
'template') {
538if ($mode ==
'dashboard') {
539 print
'<div class="div-table-responsive-no-min">';
540 print
'<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
546 print
'<tr class="oddeven width25p"><td>';
547 $texthelp = $langs->trans(
"FollowingConstantsWillBeSubstituted") .
'<br>';
548 foreach ($substitutionarray as $key => $val) {
549 $texthelp .= $key .
'<br>';
551 print $form->textwithpicto($langs->trans(
"MessageOfDay"), $texthelp, 1,
'help',
'', 0, 2,
'tooltipmessageofday');
555 $doleditor =
new DolEditor(
'main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD :
''),
'', 142,
'dolibarr_notes',
'In', false, true, true, ROWS_4,
'90%');
556 $doleditor->Create();
558 print
'</td></tr>' .
"\n";
572 print
'<div class="div-table-responsive-no-min">';
573 print
'<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
575 print
'<tr class="liste_titre"><td class="titlefieldmiddle">';
576 print $langs->trans(
"DashboardDisableBlocks");
577 print
'</td><td class="titlefieldmiddle">';
580 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableGlobal') .
'</td><td>';
581 print ajax_constantonoff(
"MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
587 print
'<tr class="oddeven"><td>' . $langs->trans(
'MAIN_DISABLE_METEO') .
'</td><td>';
588 print ajax_constantonoff(
"MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
593 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockAgenda') .
'</td><td>';
594 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
599 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockProject') .
'</td><td>';
600 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
605 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockCustomer') .
'</td><td>';
606 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
611 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockSupplier') .
'</td><td>';
612 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
617 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockContract') .
'</td><td>';
618 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
623 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockTicket') .
'</td><td>';
624 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
629 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockBank') .
'</td><td>';
630 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
635 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockAdherent') .
'</td><td>';
636 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
641 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockExpenseReport') .
'</td><td>';
642 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
647 print
'<tr class="oddeven"><td>' . $langs->trans(
'DashboardDisableBlockHoliday') .
'</td><td>';
648 print ajax_constantonoff(
"MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0,
'_red',
'dashboard');
653 print
'</table>' .
"\n";
658if ($mode ==
'login') {
660 print
'<div class="div-table-responsive-no-min">';
661 print
'<table summary="edit" class="noborder centpercent editmode tableforfield">';
663 print
'<tr class="liste_titre"><td class="titlefieldmax45">';
664 print $langs->trans(
"Parameter");
666 print $langs->trans(
"Value");
670 print
'<tr class="oddeven"><td>' . $langs->trans(
"DisableLinkToHelpCenter") .
'</td><td>';
671 print ajax_constantonoff(
"MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0,
'',
'login');
678 print
'<tr class="oddeven"><td>';
679 $texthelp = $langs->trans(
"FollowingConstantsWillBeSubstituted") .
'<br>';
680 foreach ($substitutionarray as $key => $val) {
681 $texthelp .= $key .
'<br>';
683 print $form->textwithpicto($langs->trans(
"MessageLogin"), $texthelp, 1,
'help',
'', 0, 2,
'tooltipmessagelogin');
685 $doleditor =
new DolEditor(
'main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME :
''),
'', 142,
'dolibarr_notes',
'In', false, true, true, ROWS_4,
'90%');
686 $doleditor->Create();
687 print
'</td></tr>' .
"\n";
690 print
'<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans(
"BackgroundImageLogin") .
' (png,jpg)</label></td><td>';
691 print
'<div class="centpercent inline-block">';
694 $disabled =
' disabled="disabled"';
697 $maxmin = $maxfilesizearray[
'maxmin'];
699 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
701 print
'<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled .
'>';
703 print
'(' . $langs->trans(
"DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") .
') ';
706 print
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?action=removebackgroundlogin&token='.newToken().
'&mode=login">' .
img_delete($langs->trans(
"Delete")) .
'</a>';
707 if (file_exists($conf->mycompany->dir_output .
'/logos/' .
getDolGlobalString(
'MAIN_LOGIN_BACKGROUND'))) {
709 print
'<img class="marginleftonly boxshadow valignmiddle" width="100" src="' . DOL_URL_ROOT .
'/viewimage.php?modulepart=mycompany&file=' . urlencode(
'logos/' .
getDolGlobalString(
'MAIN_LOGIN_BACKGROUND')) .
'">';
712 print
'<img class="marginleftonly valignmiddle" width="100" src="' . DOL_URL_ROOT .
'/public/theme/common/nophoto.png">';
717 print
'</table>' .
"\n";
722 print
'<div class="div-table-responsive-no-min">';
723 print
'<table summary="edit" class="noborder centpercent editmode tableforfield">';
725 print
'<tr class="liste_titre">';
726 print
'<td colspan="2">';
731 $doleditor =
new DolEditor(
'MAIN_IHM_CUSTOM_CSS', $customcssValue,
'80%', 400,
'Basic',
'In',
true,
false,
'ace', 10,
'90%');
732 $doleditor->Create(0,
'',
true,
'css',
'css');
733 print
'</td></tr>'.
"\n";
735 print
'</table>'.
"\n";
740print
'<div class="center">';
741print
'<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans(
"Save") .
'">';
742print
'<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
ihm_prepare_head()
Prepare array with list of tabs.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile', $upload_dir='')
Check validity of a file upload from an GUI page, and move it to its final destination.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_htmlcleanlastbr($stringtodecode)
This function remove all ending and br at end.
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
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.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
image_format_supported($file, $acceptsvg=0)
Return if a filename is file name of a supported image format.
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
showSkins($fuser, $edit=0, $foruserprofile=false)
Show list of themes.