27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
41$langs->loadLangs(array(
"companies",
"products",
"admin",
"sms",
"other",
"errors"));
48$action =
GETPOST(
'action',
'aZ09');
49$optioncss =
GETPOST(
'optionscss',
'aZ09');
50$contextpage =
GETPOST(
'contextpage',
'aZ09');
52$mode =
GETPOST(
'mode',
'aZ09') ?
GETPOST(
'mode',
'aZ09') :
'searchkey';
54$langcode =
GETPOST(
'langcode',
'alphanohtml');
55$transkey =
GETPOST(
'transkey',
'alphanohtml');
56if ($mode ==
'searchkey') {
57 $transvalue =
GETPOST(
'transvalue',
'alphanohtml');
59 $transvalue =
GETPOST(
'transvalue',
'restricthtml');
64$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
65$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
67if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
71$offset = $limit * $page;
75 $sortfield =
'lang,transkey';
78 $sortorder =
'ASC,ASC';
82$hookmanager->initHooks(array(
'admintranslation',
'globaladmin'));
90if (
GETPOST(
'cancel',
'alpha')) {
94if (!
GETPOST(
'confirmmassaction',
'alpha') && !empty($massaction) && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
99$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
104include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
107if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
111 $search_array_options = array();
114if ($action ==
'setMAIN_ENABLE_OVERWRITE_TRANSLATION') {
122if ($action ==
'update') {
123 if ($transkey ==
'') {
124 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"TranslationKey")),
null,
'errors');
127 if ($transvalue ==
'') {
128 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
134 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"overwrite_trans set transkey = '".$db->escape($transkey).
"', transvalue = '".$db->escape($transvalue).
"' WHERE rowid = ".(
GETPOSTINT(
'rowid'));
135 $result = $db->query($sql);
144 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
145 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
154if ($action ==
'add') {
157 if (empty($langcode)) {
158 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Language")),
null,
'errors');
161 if ($transkey ==
'') {
162 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"TranslationKey")),
null,
'errors');
165 if ($transvalue ==
'') {
166 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
172 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode).
"','".$db->escape($transkey).
"','".$db->escape($transvalue).
"', ".((int)
$conf->entity).
")";
173 $result = $db->query($sql);
182 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
183 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
193if ($action ==
'delete') {
194 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"overwrite_trans WHERE rowid = ".((int) $id);
195 $result = $db->query($sql);
211$form =
new Form($db);
214$wikihelp =
'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
215llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-translation');
217$param =
'&mode='.urlencode($mode);
219$enabledisablehtml =
'';
220$enabledisablehtml .= $langs->trans(
"EnableOverwriteTranslation").
' ';
223 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.
newToken().
'&value=1'.$param.
'">';
224 $enabledisablehtml .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
225 $enabledisablehtml .=
'</a>';
228 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.
newToken().
'&value=0'.$param.
'">';
229 $enabledisablehtml .=
img_picto($langs->trans(
"Activated"),
'switch_on');
230 $enabledisablehtml .=
'</a>';
233print
load_fiche_titre($langs->trans(
"Translation"), $enabledisablehtml,
'title_setup');
235$current_language_code = $langs->defaultlang;
237print $form->textwithpicto(
'<span class="opacitymedium">'.$langs->trans(
"CurrentUserLanguage").
':</span> <strong>'.$s.
' '.$current_language_code.
'</strong>', $langs->trans(
"TranslationDesc")).
'</span><br>';
241if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
242 $param .=
'&contextpage='.urlencode($contextpage);
244if ($limit > 0 && $limit !=
$conf->liste_limit) {
245 $param .=
'&limit='.((int) $limit);
247if (isset($optioncss) && $optioncss !=
'') {
248 $param .=
'&optioncss='.urlencode($optioncss);
251 $param .=
'&langcode='.urlencode($langcode);
254 $param .=
'&transkey='.urlencode($transkey);
257 $param .=
'&transvalue='.urlencode($transvalue);
261print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
262if ($optioncss !=
'') {
263 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
265print
'<input type="hidden" name="token" value="'.newToken().
'">';
266print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
267print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
268print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
275$langcode = GETPOSTISSET(
'langcode') ?
GETPOST(
'langcode') : $langs->defaultlang;
278$newlang->setDefaultLang($langcode);
281$langsenfileonly->setDefaultLang(
'en_US');
284$newlangfileonly->setDefaultLang($langcode);
286$recordtoshow = array();
291$listoffiles = array();
292$listoffilesexternalmodules = array();
296foreach ($modulesdir as $keydir => $tmpsearchdir) {
297 $searchdir = $tmpsearchdir;
300 $dir_lang = dirname(dirname($searchdir)).
"/langs/".$langcode;
303 $filearray =
dol_dir_list($dir_lang_osencoded,
'files', 0,
'',
'',
"name", SORT_ASC, 1);
305 foreach ($filearray as $file) {
306 $tmpfile = preg_replace(
'/.lang/i',
'', basename($file[
'name']));
307 $moduledirname = (basename(dirname(dirname($dir_lang))));
311 $langkey .=
'@'.$moduledirname;
316 $result = $newlang->load($langkey, 0, 0,
'', 0);
318 $result = $newlangfileonly->load($langkey, 0, 0,
'', 1);
320 print
'Failed to load language file '.$tmpfile.
'<br>'.
"\n";
322 $listoffiles[$langkey] = $tmpfile;
323 if (strpos($langkey,
'@') !==
false) {
324 $listoffilesexternalmodules[$langkey] = $tmpfile;
330 $result = $langsenfileonly->load($langkey, 0, 0,
'', 1);
335$nbtotaloffiles = count($listoffiles);
336$nbtotaloffilesexternal = count($listoffilesexternalmodules);
338if ($mode ==
'overwrite') {
339 print
'<input type="hidden" name="page" value="'.$page.
'">';
343 $disabled =
' disabled="disabled"';
347 $disablededit =
' disabled';
350 print
'<div class="justify"><span class="opacitymedium">';
351 print
img_info().
' '.$langs->trans(
"SomeTranslationAreUncomplete");
352 $urlwikitranslatordoc =
'https://wiki.dolibarr.org/index.php/Translator_documentation';
353 print
' ('.str_replace(
'{s1}',
'<a href="'.$urlwikitranslatordoc.
'" target="_blank" rel="noopener noreferrer external">'.$langs->trans(
"Here").
'</a>', $langs->trans(
"SeeAlso",
'{s1}')).
')<br>';
355 print $langs->trans(
"TranslationOverwriteDesc", $langs->transnoentitiesnoconv(
"Language"), $langs->transnoentitiesnoconv(
"TranslationKey"), $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")).
"\n";
356 print
' ('.$langs->trans(
"TranslationOverwriteDesc2").
').'.
"<br>\n";
357 print
'</span></div>';
362 print
'<input type="hidden" name="action" value="'.($action ==
'edit' ?
'update' :
'add').
'">';
363 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
365 print
'<div class="div-table-responsive-no-min">';
366 print
'<table class="noborder centpercent">';
367 print
'<tr class="liste_titre">';
368 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
369 print_liste_field_titre(
"TranslationKey", $_SERVER[
"PHP_SELF"],
'transkey',
'', $param,
'', $sortfield, $sortorder);
370 print_liste_field_titre(
"NewTranslationStringToShow", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
372 print
'<td align="center"></td>';
379 print
'<tr class="oddeven"><td>';
380 print $formadmin->select_language(
GETPOST(
'langcode'),
'langcode', 0, array(), 1, 0, $disablededit ? 1 : 0,
'maxwidth250', 1);
383 print
'<input type="text" class="flat maxwidthonsmartphone"'.$disablededit.
' name="transkey" id="transkey" value="'.(!empty($transkey) ? $transkey :
"").
'">';
385 print
'<input type="text" class="quatrevingtpercent"'.$disablededit.
' name="transvalue" id="transvalue" value="'.(!empty($transvalue) ? $transvalue :
"").
'">';
387 print
'<td class="center">';
388 print
'<input type="hidden" name="entity" value="'.$conf->entity.
'">';
389 print
'<input type="submit" class="button"'.$disabled.
' value="'.$langs->trans(
"Add").
'" name="add" title="'.
dol_escape_htmltag($langs->trans(
"YouMustEnableTranslationOverwriteBefore")).
'">';
395 $sql =
"SELECT rowid, entity, lang, transkey, transvalue";
396 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
397 $sql .=
" WHERE 1 = 1";
398 $sql .=
" AND entity IN (".getEntity(
'overwrite_trans').
")";
399 $sql .= $db->order($sortfield, $sortorder);
401 dol_syslog(
"translation::select from table", LOG_DEBUG);
402 $result = $db->query($sql);
404 $num = $db->num_rows($result);
408 $obj = $db->fetch_object($result);
412 print
'<tr class="oddeven">';
414 print
'<td>'.dol_escape_htmltag($obj->lang).
'</td>'.
"\n";
416 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
417 print
'<input type="text" class="quatrevingtpercent" name="transkey" value="'.dol_escape_htmltag($obj->transkey).
'">';
424 print
'<td class="small">';
430 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
431 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($obj->transvalue).
'">';
434 $titleforvalue = $langs->trans(
"Translation").
' en_US for key '.$obj->transkey.
':<br>'.(!empty($langsenfileonly->tab_translate[$obj->transkey]) ? $langsenfileonly->trans($obj->transkey) :
'<span class="opacitymedium">'.$langs->trans(
"None").
'</span>');
438 print
'<span title="'.dol_escape_htmltag($titleforvalue).
'" class="classfortooltip">';
444 print
'<td class="center">';
445 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
446 print
'<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.
'">';
447 print
'<input type="submit" class="button buttongen button-save" name="save" value="'.dol_escape_htmltag($langs->trans(
"Save")).
'">';
449 print
'<input type="submit" class="button buttongen button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans(
"Cancel")).
'">';
451 print
'<a class="reposition editfielda paddingrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.$obj->entity.
'&mode='.urlencode($mode).
'&action=edit&token='.
newToken().
'">'.
img_edit().
'</a>';
453 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.$obj->entity.
'&mode='.urlencode($mode).
'&action=delete&token='.
newToken().
'">'.
img_delete().
'</a>';
467if ($mode ==
'searchkey') {
472 if (empty($langcode) || $langcode ==
'-1') {
475 if (empty($transkey)) {
478 if (empty($transvalue)) {
482 if ($action ==
'search' && ($nbempty > 999)) {
483 setEventMessages($langs->trans(
"WarningAtLeastKeyOrTranslationRequired"),
null,
'warnings');
486 foreach ($newlang->tab_translate as $key => $val) {
487 $newtranskey = preg_replace(
'/\$$/',
'', preg_replace(
'/^\^/',
'', $transkey));
488 $newtranskeystart = preg_match(
'/^\^/', $transkey);
489 $newtranskeyend = preg_match(
'/\$$/', $transkey);
490 $regexstring = ($newtranskeystart ?
'^' :
'').preg_quote($newtranskey,
'/').($newtranskeyend ?
'$' :
'');
491 if ($transkey && !preg_match(
'/'.$regexstring.
'/i', $key)) {
494 if ($transvalue && !preg_match(
'/'.preg_quote($transvalue,
'/').
'/i', $val)) {
497 $recordtoshow[$key] = $val;
502 $nbtotalofrecordswithoutfilters = count($newlang->tab_translate);
503 $nbtotalofrecords = count($recordtoshow);
505 if (($offset + $num) > $nbtotalofrecords) {
510 $title = $langs->trans(
"Translation");
511 if ($nbtotalofrecords > 0) {
512 $title .=
' <span class="opacitymedium colorblack paddingleft">('.$nbtotalofrecords.
' / '.$nbtotalofrecordswithoutfilters.
' - <span title="'.
dol_escape_htmltag(($nbtotaloffiles - $nbtotaloffilesexternal).
' core - '.($nbtotaloffilesexternal).
' external').
'">'.$nbtotaloffiles.
' '.$langs->trans(
"Files").
'</span>)</span>';
514 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, -1 * $nbtotalofrecords,
'', 0,
'',
'', $limit, 0, 0, 1);
516 $massactionbutton =
'';
518 print
'<input type="hidden" id="action" name="action" value="search">';
519 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
521 print
'<div class="div-table-responsive-no-min">';
522 print
'<table class="noborder centpercent">';
524 print
'<tr class="liste_titre liste_titre_filter"><td>';
526 print $formadmin->select_language($langcode,
'langcode', 0, array(), 0, 0, 0,
'maxwidth250', 1);
529 print
'<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.dol_escape_htmltag($transkey).
'">';
531 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($transvalue).
'">';
540 print
'<input type="hidden" name="entitysearch" value="'.$conf->entity.
'">';
544 print
'<td class="right nowraponall">';
545 $searchpicto = $form->showFilterAndCheckAddButtons(!empty($massactionbutton) ? 1 : 0,
'checkforselect', 1);
550 print
'<tr class="liste_titre">';
551 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
552 print_liste_field_titre(
"TranslationKey", $_SERVER[
"PHP_SELF"],
'transkey',
'', $param,
'', $sortfield, $sortorder);
553 print_liste_field_titre(
"CurrentTranslationString", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
555 print
'<td align="center"></td>';
559 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'asc') {
560 ksort($recordtoshow);
562 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'desc') {
563 krsort($recordtoshow);
565 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'asc') {
566 asort($recordtoshow);
568 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'desc') {
569 arsort($recordtoshow);
574 foreach ($recordtoshow as $key => $val) {
579 if ($limit && $i > ($offset + $limit)) {
582 print
'<tr class="oddeven"><td>'.$langcode.
'</td><td>'.$key.
'</td>';
583 print
'<td class="small">';
584 $titleforvalue = $langs->trans(
"Translation").
' en_US for key '.$key.
':<br>';
585 if (!empty($langsenfileonly->tab_translate[$key])) {
586 if (substr_count($langsenfileonly->tab_translate[$key],
'%s') <= 4) {
587 $titleforvalue .= $langsenfileonly->trans($key);
590 $titleforvalue .=
'<span class="opacitymedium">'.$langs->trans(
"None").
'</span>';
592 print
'<span title="'.dolPrintHTMLForAttribute($titleforvalue).
'" class="classfortooltip">';
594 if (substr_count($langsenfileonly->tab_translate[$key],
'%s') > 4) {
595 print
'<br><div class="warning">Error, more than 4 %s in the source</div>';
599 print
'<td class="right nowraponall">';
600 if (!empty($newlangfileonly->tab_translate[$key])) {
601 if ($val != $newlangfileonly->tab_translate[$key]) {
603 $sql =
"SELECT rowid";
604 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
605 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
606 $sql .=
" AND transkey = '".$db->escape($key).
"'";
607 dol_syslog(
"translation::select from table", LOG_DEBUG);
608 $result = $db->query($sql);
611 $obj = $db->fetch_object($result);
613 if (is_object($obj)) {
614 print
'<a class="editfielda reposition marginrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.
$conf->entity.
'&mode=overwrite&action=edit&token='.
newToken().
'">'.
img_edit().
'</a>';
616 print
'<a class="marginleftonly marginrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.
$conf->entity.
'&mode='.urlencode($mode).
'&action=delete&token='.
newToken().
'&mode='.urlencode($mode).
'">'.
img_delete().
'</a>';
617 print
' ';
618 $htmltext = $langs->trans(
"OriginalValueWas",
'<i>'.$newlangfileonly->tab_translate[$key].
'</i>');
619 print $form->textwithpicto(
'', $htmltext, 1,
'info');
623 print
'<a class="reposition paddingrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?mode=overwrite&langcode='.urlencode($langcode).
'&transkey='.urlencode($key).
'">'.
img_edit_add($langs->trans(
"TranslationOverwriteKey")).
'</a>';
627 $transifexlangfile =
'$';
629 $transifexurl =
'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.
'/'.$transifexlangfile.
'?q=key%3A'.$key;
631 print
' <a href="'.$transifexurl.
'" target="transifex">'.
img_picto($langs->trans(
'FixOnTransifex'),
'globe').
'</a>';
635 $sql =
"SELECT rowid";
636 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
637 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
638 $sql .=
" AND transkey = '".$db->escape($key).
"'";
639 dol_syslog(
"translation::select from table", LOG_DEBUG);
640 $result = $db->query($sql);
643 $obj = $db->fetch_object($result);
645 if (is_object($obj)) {
646 print
'<a class="editfielda reposition marginrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.
$conf->entity.
'&mode=overwrite&action=edit&token='.
newToken().
'">'.
img_edit().
'</a>';
648 print
'<a class="marginleftonly marginrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.
$conf->entity.
'&mode='.urlencode($mode).
'&action=delete&token='.
newToken().
'&mode='.urlencode($mode).
'">'.
img_delete().
'</a>';
649 print
' ';
652 $htmltext = $langs->trans(
"TransKeyWithoutOriginalValue", $key);
653 print $form->textwithpicto(
'', $htmltext, 1,
'warning');
660 print
'</td></tr>'.
"\n";
663 if (empty($recordtoshow)) {
664 print
'<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
675if (!empty($langcode)) {
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).
translation_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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage translations.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dolGetModulesDirs($subdir='')
Return list of directories that contain modules.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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.
dol_osencode($str)
Return a string encoded into OS filesystem encoding.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_set_focus($selector)
Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_edit_add($titlealt='default', $other='')
Show logo +.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
img_info($titlealt='default')
Show info logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.