27 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
37 $langs->loadLangs(array(
'admin',
'languages',
'other',
'companies',
'products',
'members',
'projects',
'hrm',
'agenda'));
41 $action =
GETPOST(
'action',
'aZ09');
42 $contextpage=
GETPOST(
'contextpage',
'aZ')?
GETPOST(
'contextpage',
'aZ'):
'adminihm';
44 if (! defined(
"MAIN_MOTD")) define(
"MAIN_MOTD",
"");
53 $reshook=$hookmanager->executeHooks(
'doActions',$parameters,$object,$action);
54 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
61 if ($action ==
'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACKGROUND))
63 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
65 $logofile=$conf->mycompany->dir_output.
'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND;
81 if ($action ==
'update')
83 dolibarr_set_const($db,
"MAIN_LANG_DEFAULT", $_POST[
"MAIN_LANG_DEFAULT"],
'chaine',0,
'',$conf->entity);
84 dolibarr_set_const($db,
"MAIN_MULTILANGS", $_POST[
"MAIN_MULTILANGS"],
'chaine',0,
'',$conf->entity);
86 dolibarr_set_const($db,
"MAIN_THEME", $_POST[
"main_theme"],
'chaine',0,
'',$conf->entity);
88 $val=
GETPOST(
'THEME_TOPMENU_DISABLE_IMAGE');
90 else dolibarr_set_const($db,
'THEME_TOPMENU_DISABLE_IMAGE',
GETPOST(
'THEME_TOPMENU_DISABLE_IMAGE'),
'chaine',0,
'',$conf->entity);
98 else dolibarr_set_const($db,
'THEME_ELDY_TOPMENU_BACK1', $val,
'chaine',0,
'',$conf->entity);
102 else dolibarr_set_const($db,
'THEME_ELDY_VERMENU_BACK1', $val,
'chaine',0,
'',$conf->entity);
106 else dolibarr_set_const($db,
'THEME_ELDY_TEXTTITLENOTAB', $val,
'chaine',0,
'',$conf->entity);
110 else dolibarr_set_const($db,
'THEME_ELDY_BACKTITLE1', $val,
'chaine',0,
'',$conf->entity);
114 else dolibarr_set_const($db,
'THEME_ELDY_TEXTTITLE', $val,
'chaine',0,
'',$conf->entity);
118 else dolibarr_set_const($db,
'THEME_ELDY_LINEIMPAIR1', $val,
'chaine',0,
'',$conf->entity);
121 else dolibarr_set_const($db,
'THEME_ELDY_LINEIMPAIR2', $val,
'chaine',0,
'',$conf->entity);
125 else dolibarr_set_const($db,
'THEME_ELDY_LINEPAIR1', $val,
'chaine',0,
'',$conf->entity);
128 else dolibarr_set_const($db,
'THEME_ELDY_LINEPAIR2', $val,
'chaine',0,
'',$conf->entity);
132 else dolibarr_set_const($db,
'THEME_ELDY_TEXTLINK', $val,
'chaine',0,
'',$conf->entity);
134 if (
GETPOST(
'THEME_ELDY_USE_HOVER') ==
'')
dolibarr_set_const($db,
"THEME_ELDY_USE_HOVER",
'0',
'chaine', 0,
'', $conf->entity);
135 else dolibarr_set_const($db,
"THEME_ELDY_USE_HOVER", $_POST[
"THEME_ELDY_USE_HOVER"],
'chaine', 0,
'', $conf->entity);
137 if (
GETPOST(
'THEME_ELDY_USE_CHECKED') ==
'')
dolibarr_set_const($db,
"THEME_ELDY_USE_CHECKED",
'0',
'chaine', 0,
'', $conf->entity);
138 else dolibarr_set_const($db,
"THEME_ELDY_USE_CHECKED", $_POST[
"THEME_ELDY_USE_CHECKED"],
'chaine', 0,
'', $conf->entity);
140 dolibarr_set_const($db,
"MAIN_SIZE_LISTE_LIMIT", $_POST[
"main_size_liste_limit"],
'chaine',0,
'',$conf->entity);
141 dolibarr_set_const($db,
"MAIN_SIZE_SHORTLIST_LIMIT", $_POST[
"main_size_shortliste_limit"],
'chaine',0,
'',$conf->entity);
142 dolibarr_set_const($db,
"MAIN_DISABLE_JAVASCRIPT", $_POST[
"main_disable_javascript"],
'chaine',0,
'',$conf->entity);
143 dolibarr_set_const($db,
"MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST[
"MAIN_BUTTON_HIDE_UNAUTHORIZED"],
'chaine',0,
'',$conf->entity);
144 dolibarr_set_const($db,
"MAIN_START_WEEK", $_POST[
"MAIN_START_WEEK"],
'chaine',0,
'',$conf->entity);
145 dolibarr_set_const($db,
"MAIN_DEFAULT_WORKING_DAYS", $_POST[
"MAIN_DEFAULT_WORKING_DAYS"],
'chaine',0,
'',$conf->entity);
146 dolibarr_set_const($db,
"MAIN_DEFAULT_WORKING_HOURS", $_POST[
"MAIN_DEFAULT_WORKING_HOURS"],
'chaine',0,
'',$conf->entity);
147 dolibarr_set_const($db,
"MAIN_SHOW_LOGO", $_POST[
"MAIN_SHOW_LOGO"],
'chaine',0,
'',$conf->entity);
148 dolibarr_set_const($db,
"MAIN_FIRSTNAME_NAME_POSITION", $_POST[
"MAIN_FIRSTNAME_NAME_POSITION"],
'chaine',0,
'',$conf->entity);
150 dolibarr_set_const($db,
"MAIN_HELPCENTER_DISABLELINK", $_POST[
"MAIN_HELPCENTER_DISABLELINK"],
'chaine',0,
'',0);
153 dolibarr_set_const($db,
"MAIN_HELP_DISABLELINK", $_POST[
"MAIN_HELP_DISABLELINK"],
'chaine',0,
'',0);
154 dolibarr_set_const($db,
"MAIN_BUGTRACK_ENABLELINK", $_POST[
"MAIN_BUGTRACK_ENABLELINK"],
'chaine',0,
'',$conf->entity);
156 $varforimage=
'imagebackground'; $dirforimage=$conf->mycompany->dir_output.
'/logos/';
157 if ($_FILES[$varforimage][
"tmp_name"])
159 if (preg_match(
'/([^\\/:]+)$/i',$_FILES[$varforimage][
"name"],$reg))
161 $original_file=$reg[1];
166 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
167 if (! is_dir($dirforimage))
171 $result=
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"],$dirforimage.$original_file,1,0,$_FILES[$varforimage][
'error']);
174 dolibarr_set_const($db,
"MAIN_LOGIN_BACKGROUND",$original_file,
'chaine',0,
'',$conf->entity);
176 else if (preg_match(
'/^ErrorFileIsInfectedWithAVirus/',$result))
179 $langs->load(
"errors");
180 $tmparray=explode(
':',$result);
181 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus',$tmparray[1]), null,
'errors');
192 $langs->load(
"errors");
200 $_SESSION[
"mainmenu"]=
"";
202 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
211 $wikihelp=
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
220 print $langs->trans(
"DisplayDesc").
"<br>\n";
224 if ($action ==
'edit')
227 require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
229 print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
230 print '<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'">';
231 print '<input type="hidden" name="action" value="update">';
236 print '<table summary="edit" class="noborder" width="100%">';
237 print '<tr class="liste_titre"><td>'.$langs->trans(
"Language").
'</td><td></td>';
238 print '<td width="20"> </td>';
242 print '<tr><td class="titlefield">'.$langs->trans(
"DefaultLanguage").
'</td><td>';
243 print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,
'MAIN_LANG_DEFAULT', 1, 0, 0, 0, 0,
'minwidth300', 2);
245 print '<td width="20"> </td>';
249 print '<tr><td class="titlefield">'.$langs->trans(
"EnableMultilangInterface").
'</td><td>';
250 print $form->selectyesno(
'MAIN_MULTILANGS',$conf->global->MAIN_MULTILANGS,1);
252 print '<td width="20"> </td>';
255 print '</table><br>'.
"\n";
262 print '<table summary="edit" class="noborder" width="100%">';
263 print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameters").
'</td><td>'.$langs->trans(
"Value").
'</td>';
264 print '<td width="20"> </td>';
268 print '<tr><td>'.$langs->trans(
"DefaultMaxSizeList").
'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT .
'"></td>';
269 print '<td width="20"> </td>';
273 print '<tr><td>'.$langs->trans(
"DefaultMaxSizeShortList").
'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT .
'"></td>';
274 print '<td width="20"> </td>';
287 print '<tr><td>'.$langs->trans(
"DisableJavascript").
'</td><td>';
288 print $form->selectyesno(
'main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
290 print '<td width="20"> </td>';
294 print '<tr><td class="titlefield">'.$langs->trans(
"WeekStartOnDay").
'</td><td>';
295 print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:
'1'),
'MAIN_START_WEEK',0);
297 print '<td width="20"> </td>';
301 print '<tr><td class="titlefield">'.$langs->trans(
"DefaultWorkingDays").
'</td><td>';
302 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').
'">';
304 print
'<td width="20"> </td>';
308 print
'<tr><td class="titlefield">'.$langs->trans(
"DefaultWorkingHours").
'</td><td>';
309 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').
'">';
311 print
'<td width="20"> </td>';
315 print
'<tr><td class="titlefield">'.$langs->trans(
"FirstnameNamePosition").
'</td><td>';
316 $array=array(0=>$langs->trans(
"Firstname").
' '.$langs->trans(
"Lastname"), 1=>$langs->trans(
"Lastname").
' '.$langs->trans(
"Firstname"));
317 print $form->selectarray(
'MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0));
319 print
'<td width="20"> </td>';
323 print
'<tr><td class="titlefield">'.$langs->trans(
"ButtonHideUnauthorized").
'</td><td>';
324 print $form->selectyesno(
'MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1);
326 print
'<td width="20"> </td>';
330 print
'<tr><td class="titlefield">'.$langs->trans(
"EnableShowLogo").
'</td><td>';
331 print $form->selectyesno(
'MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
333 print
'<td width="20"> </td>';
347 print
'<tr><td class="titlefield">'.$langs->trans(
"ShowBugTrackLink", $langs->transnoentitiesnoconv(
"FindBug")).
'</td><td>';
348 print $form->selectyesno(
'MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
350 print
'<td width="20"> </td>';
354 $pictohelp=
'<span class="fa fa-question-circle"></span>';
355 print
'<tr><td class="titlefield">'.$langs->trans(
"DisableLinkToHelp",$pictohelp).
'</td><td>';
356 print $form->selectyesno(
'MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
358 print
'<td width="20"> </td>';
365 print
'<tr><td class="titlefield">';
366 $texthelp=$langs->trans(
"FollowingConstantsWillBeSubstituted").
'<br>';
367 foreach($substitutionarray as $key => $val)
369 $texthelp.=$key.
'<br>';
371 print $form->textwithpicto($langs->trans(
"MessageOfDay"), $texthelp, 1,
'help',
'', 0, 2,
'tooltipmessageofday');
373 print
'</td><td colspan="2">';
375 $doleditor =
new DolEditor(
'main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:
''),
'', 142,
'dolibarr_notes',
'In',
false,
true,
true, ROWS_4,
'90%');
376 $doleditor->Create();
378 print
'</td></tr>'.
"\n";
380 print
'</table>'.
"\n";
385 print
'<table summary="edit" class="noborder" width="100%">';
386 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"LoginPage").
'</td><td></td>';
387 print
'<td width="20"> </td>';
394 $texthelp=$langs->trans(
"FollowingConstantsWillBeSubstituted").
'<br>';
395 foreach($substitutionarray as $key => $val)
397 $texthelp.=$key.
'<br>';
399 print $form->textwithpicto($langs->trans(
"MessageLogin"), $texthelp, 1,
'help',
'', 0, 2,
'tooltipmessagelogin');
400 print
'</td><td colspan="2">';
401 $doleditor =
new DolEditor(
'main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:
''),
'', 142,
'dolibarr_notes',
'In',
false,
true,
true, ROWS_4,
'90%');
402 $doleditor->Create();
403 print
'</td></tr>'.
"\n";
406 print
'<tr><td class="titlefield">'.$langs->trans(
"DisableLinkToHelpCenter").
'</td><td>';
407 print $form->selectyesno(
'MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
409 print
'<td width="20"> </td>';
413 print
'<tr><td><label for="imagebackground">'.$langs->trans(
"BackgroundImageLogin").
' (png,jpg)</label></td><td colspan="2">';
414 print
'<div class="centpercent inline-block">';
415 print
'<input type="file" class="flat class=minwidth200" name="imagebackground" id="imagebackground">';
416 if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
417 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=removebackgroundlogin">'.
img_delete($langs->trans(
"Delete")).
'</a>';
418 if (file_exists($conf->mycompany->dir_output.
'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
420 print
'<img class="paddingleft valignmiddle" width="100px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).
'">';
423 print
'<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png">';
428 print
'</table>'.
"\n";
431 print
'<br><div class="center">';
432 print
'<input class="button" type="submit" name="submit" value="'.$langs->trans(
"Save").
'">';
434 print
'<input class="button" type="submit" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
442 print
'<table class="noborder" width="100%">';
443 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Language").
'</td><td> </td><td> </td></tr>';
445 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DefaultLanguage").
'</td><td>';
447 print ($s?$s.
' ':
'');
448 print ($conf->global->MAIN_LANG_DEFAULT==
'auto'?$langs->trans(
"AutoDetectLang"):$langs->trans(
"Language_".$conf->global->MAIN_LANG_DEFAULT));
450 print
'<td width="20">';
451 if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!=
'auto') print
info_admin($langs->trans(
"SubmitTranslation".($conf->global->MAIN_LANG_DEFAULT==
'en_US'?
'ENUS':
''),$conf->global->MAIN_LANG_DEFAULT),1);
455 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"EnableMultilangInterface").
'</td><td>' .
yn($conf->global->MAIN_MULTILANGS) .
'</td>';
456 print
'<td width="20"> </td>';
459 print
'</table><br>'.
"\n";
468 print
'<table class="noborder" width="100%">';
469 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameters").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
471 print
'<tr class="oddeven"><td>'.$langs->trans(
"DefaultMaxSizeList").
'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT .
'</td>';
474 print
'<tr class="oddeven"><td>'.$langs->trans(
"DefaultMaxSizeShortList").
'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT .
'</td>';
478 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DisableJavascript").
'</td><td>';
479 print
yn($conf->global->MAIN_DISABLE_JAVASCRIPT).
"</td>";
483 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"WeekStartOnDay").
'</td><td>';
484 print $langs->trans(
"Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:
'1'));
489 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DefaultWorkingDays").
'</td><td>';
490 print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:
'1-5';
495 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DefaultWorkingHours").
'</td><td>';
496 print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:
'9-18';
501 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"FirstnameNamePosition").
'</td><td>';
502 if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans(
"Firstname").
' '.$langs->trans(
"Lastname"); }
503 else { print $langs->trans(
"Lastname").
' '.$langs->trans(
"Firstname"); }
508 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"ButtonHideUnauthorized").
'</td><td>';
509 print
yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0),1);
513 print
'<tr class="oddeven"><td>'.$langs->trans(
"EnableShowLogo").
'</td><td>' .
yn($conf->global->MAIN_SHOW_LOGO) .
'</td>';
525 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"ShowBugTrackLink", $langs->transnoentitiesnoconv(
"FindBug")).
'</td><td>';
526 print
yn($conf->global->MAIN_BUGTRACK_ENABLELINK).
"</td>";
530 $pictohelp=
'<span class="fa fa-question-circle"></span>';
531 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DisableLinkToHelp",$pictohelp).
'</td><td>';
532 print
yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
536 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"MessageOfDay").
'</td><td>';
539 print
'</td></tr>'.
"\n";
541 print
'</table>'.
"\n";
546 print
'<div class="div-table-responsive">';
548 print
'<table class="noborder" width="100%">';
549 print
'<tr class="liste_titre"><td>'.$langs->trans(
"LoginPage").
'</td><td></td></tr>';
552 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"MessageLogin").
'</td><td>';
555 print
'</td></tr>'.
"\n";
558 print
'<tr class="oddeven"><td class="titlefield">'.$langs->trans(
"DisableLinkToHelpCenter").
'</td><td>';
559 print
yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
563 print
'<tr class="oddeven"><td>'.$langs->trans(
"BackgroundImageLogin").
'</td><td>';
564 print
'<div class="centpercent inline-block">';
565 print $conf->global->MAIN_LOGIN_BACKGROUND;
566 if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.
'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND))
568 print
'<img class="img_logo paddingleft valignmiddle" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).
'">';
572 print
'<img class="img_logo paddingleft valignmiddle" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png">';
577 print
'</table>'.
"\n";
580 print
'<div class="tabsAction tabsActionNoBottom">';
581 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
image_format_supported($file)
Return if a filename is file name of a supported image format.
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
print
Draft customers invoices.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile')
Make control on an uploaded file from an GUI page and move it to final destination.
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
picto_from_langcode($codelang, $moreatt='')
Return img flag of country for a language code or country code.
show_theme($fuser, $edit=0, $foruserprofile=false)
Show list of themes.
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).
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).
img_delete($titlealt='default', $other='class="pictodelete"')
Show delete logo.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null)
Return array of possible common substitutions.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='')
Show information for admin users or standard users.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1)
Remove a file or several files with a mask.
dol_mkdir($dir, $dataroot='', $newmask=null)
Creation of a directory (this can create recursive subdir)
dol_htmlcleanlastbr($stringtodecode)
This function remove all ending and br at end.
Class to manage a WYSIWYG editor.
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...
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $wikihelp
View.