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';
33$langs->loadLangs(array(
"companies",
"products",
"admin",
"sms",
"other",
"errors"));
40$action =
GETPOST(
'action',
'aZ09');
41$optioncss =
GETPOST(
'optionscss',
'aZ09');
42$contextpage =
GETPOST(
'contextpage',
'aZ09');
44$mode =
GETPOST(
'mode',
'aZ09') ?
GETPOST(
'mode',
'aZ09') :
'searchkey';
46$langcode =
GETPOST(
'langcode',
'alphanohtml');
47$transkey =
GETPOST(
'transkey',
'alphanohtml');
48if ($mode ==
'searchkey') {
49 $transvalue =
GETPOST(
'transvalue',
'alphanohtml');
51 $transvalue =
GETPOST(
'transvalue',
'restricthtml');
56$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
57$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
59if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
63$offset = $limit * $page;
67 $sortfield =
'lang,transkey';
70 $sortorder =
'ASC,ASC';
74$hookmanager->initHooks(array(
'admintranslation',
'globaladmin'));
81if (
GETPOST(
'cancel',
'alpha')) {
85if (!
GETPOST(
'confirmmassaction',
'alpha') && !empty($massaction) && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
90$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
95include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
98if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
102 $search_array_options = array();
105if ($action ==
'setMAIN_ENABLE_OVERWRITE_TRANSLATION') {
107 dolibarr_set_const($db,
'MAIN_ENABLE_OVERWRITE_TRANSLATION', 1,
'chaine', 0,
'', $conf->entity);
109 dolibarr_set_const($db,
'MAIN_ENABLE_OVERWRITE_TRANSLATION', 0,
'chaine', 0,
'', $conf->entity);
113if ($action ==
'update') {
114 if ($transkey ==
'') {
115 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"TranslationKey")),
null,
'errors');
118 if ($transvalue ==
'') {
119 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
125 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"overwrite_trans set transkey = '".$db->escape($transkey).
"', transvalue = '".$db->escape($transvalue).
"' WHERE rowid = ".(
GETPOSTINT(
'rowid'));
126 $result = $db->query($sql);
135 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
136 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
145if ($action ==
'add') {
148 if (empty($langcode)) {
149 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Language")),
null,
'errors');
152 if ($transkey ==
'') {
153 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"TranslationKey")),
null,
'errors');
156 if ($transvalue ==
'') {
157 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
163 $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).
")";
164 $result = $db->query($sql);
173 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
174 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
184if ($action ==
'delete') {
185 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"overwrite_trans WHERE rowid = ".((int) $id);
186 $result = $db->query($sql);
202$form =
new Form($db);
205$wikihelp =
'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
206llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-translation');
208$param =
'&mode='.urlencode($mode);
210$enabledisablehtml =
'';
211$enabledisablehtml .= $langs->trans(
"EnableOverwriteTranslation").
' ';
214 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.
newToken().
'&value=1'.$param.
'">';
215 $enabledisablehtml .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
216 $enabledisablehtml .=
'</a>';
219 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.
newToken().
'&value=0'.$param.
'">';
220 $enabledisablehtml .=
img_picto($langs->trans(
"Activated"),
'switch_on');
221 $enabledisablehtml .=
'</a>';
224print
load_fiche_titre($langs->trans(
"Translation"), $enabledisablehtml,
'title_setup');
226$current_language_code = $langs->defaultlang;
228print $form->textwithpicto(
'<span class="opacitymedium">'.$langs->trans(
"CurrentUserLanguage").
':</span> <strong>'.$s.
' '.$current_language_code.
'</strong>', $langs->trans(
"TranslationDesc")).
'</span><br>';
232if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
233 $param .=
'&contextpage='.urlencode($contextpage);
235if ($limit > 0 && $limit != $conf->liste_limit) {
236 $param .=
'&limit='.((int) $limit);
238if (isset($optioncss) && $optioncss !=
'') {
239 $param .=
'&optioncss='.urlencode($optioncss);
242 $param .=
'&langcode='.urlencode($langcode);
245 $param .=
'&transkey='.urlencode($transkey);
248 $param .=
'&transvalue='.urlencode($transvalue);
252print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
253if (isset($optioncss) && $optioncss !=
'') {
254 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
256print
'<input type="hidden" name="token" value="'.newToken().
'">';
257print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
258print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
259print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
266$langcode = GETPOSTISSET(
'langcode') ?
GETPOST(
'langcode') : $langs->defaultlang;
269$newlang->setDefaultLang($langcode);
271$langsenfileonly =
new Translate(
'', $conf);
272$langsenfileonly->setDefaultLang(
'en_US');
274$newlangfileonly =
new Translate(
'', $conf);
275$newlangfileonly->setDefaultLang($langcode);
277$recordtoshow = array();
282$listoffiles = array();
283$listoffilesexternalmodules = array();
287foreach ($modulesdir as $keydir => $tmpsearchdir) {
288 $searchdir = $tmpsearchdir;
291 $dir_lang = dirname(dirname($searchdir)).
"/langs/".$langcode;
294 $filearray =
dol_dir_list($dir_lang_osencoded,
'files', 0,
'',
'',
"name", SORT_ASC, 1);
296 foreach ($filearray as $file) {
297 $tmpfile = preg_replace(
'/.lang/i',
'', basename($file[
'name']));
298 $moduledirname = (basename(dirname(dirname($dir_lang))));
302 $langkey .=
'@'.$moduledirname;
307 $result = $newlang->load($langkey, 0, 0,
'', 0);
309 $result = $newlangfileonly->load($langkey, 0, 0,
'', 1);
311 print
'Failed to load language file '.$tmpfile.
'<br>'.
"\n";
313 $listoffiles[$langkey] = $tmpfile;
314 if (strpos($langkey,
'@') !==
false) {
315 $listoffilesexternalmodules[$langkey] = $tmpfile;
321 $result = $langsenfileonly->load($langkey, 0, 0,
'', 1);
326$nbtotaloffiles = count($listoffiles);
327$nbtotaloffilesexternal = count($listoffilesexternalmodules);
329if ($mode ==
'overwrite') {
330 print
'<input type="hidden" name="page" value="'.$page.
'">';
334 $disabled =
' disabled="disabled"';
338 $disablededit =
' disabled';
341 print
'<div class="justify"><span class="opacitymedium">';
342 print
img_info().
' '.$langs->trans(
"SomeTranslationAreUncomplete");
343 $urlwikitranslatordoc =
'https://wiki.dolibarr.org/index.php/Translator_documentation';
344 print
' ('.str_replace(
'{s1}',
'<a href="'.$urlwikitranslatordoc.
'" target="_blank" rel="noopener noreferrer external">'.$langs->trans(
"Here").
'</a>', $langs->trans(
"SeeAlso",
'{s1}')).
')<br>';
345 print $langs->trans(
"TranslationOverwriteDesc", $langs->transnoentitiesnoconv(
"Language"), $langs->transnoentitiesnoconv(
"TranslationKey"), $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")).
"\n";
346 print
' ('.$langs->trans(
"TranslationOverwriteDesc2").
').'.
"<br>\n";
347 print
'</span></div>';
352 print
'<input type="hidden" name="action" value="'.($action ==
'edit' ?
'update' :
'add').
'">';
353 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
355 print
'<div class="div-table-responsive-no-min">';
356 print
'<table class="noborder centpercent">';
357 print
'<tr class="liste_titre">';
358 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
359 print_liste_field_titre(
"TranslationKey", $_SERVER[
"PHP_SELF"],
'transkey',
'', $param,
'', $sortfield, $sortorder);
360 print_liste_field_titre(
"NewTranslationStringToShow", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
362 print
'<td align="center"></td>';
369 print
'<tr class="oddeven"><td>';
370 print $formadmin->select_language(
GETPOST(
'langcode'),
'langcode', 0,
null, 1, 0, $disablededit ? 1 : 0,
'maxwidth250', 1);
373 print
'<input type="text" class="flat maxwidthonsmartphone"'.$disablededit.
' name="transkey" id="transkey" value="'.(!empty($transkey) ? $transkey :
"").
'">';
375 print
'<input type="text" class="quatrevingtpercent"'.$disablededit.
' name="transvalue" id="transvalue" value="'.(!empty($transvalue) ? $transvalue :
"").
'">';
377 print
'<td class="center">';
378 print
'<input type="hidden" name="entity" value="'.$conf->entity.
'">';
379 print
'<input type="submit" class="button"'.$disabled.
' value="'.$langs->trans(
"Add").
'" name="add" title="'.
dol_escape_htmltag($langs->trans(
"YouMustEnableTranslationOverwriteBefore")).
'">';
385 $sql =
"SELECT rowid, entity, lang, transkey, transvalue";
386 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
387 $sql .=
" WHERE 1 = 1";
388 $sql .=
" AND entity IN (".getEntity(
'overwrite_trans').
")";
389 $sql .= $db->order($sortfield, $sortorder);
391 dol_syslog(
"translation::select from table", LOG_DEBUG);
392 $result = $db->query($sql);
394 $num = $db->num_rows($result);
398 $obj = $db->fetch_object($result);
402 print
'<tr class="oddeven">';
404 print
'<td>'.dol_escape_htmltag($obj->lang).
'</td>'.
"\n";
406 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
407 print
'<input type="text" class="quatrevingtpercent" name="transkey" value="'.dol_escape_htmltag($obj->transkey).
'">';
414 print
'<td class="small">';
420 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
421 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($obj->transvalue).
'">';
424 $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>');
428 print
'<span title="'.dol_escape_htmltag($titleforvalue).
'" class="classfortooltip">';
434 print
'<td class="center">';
435 if ($action ==
'edit' && $obj->rowid ==
GETPOSTINT(
'rowid')) {
436 print
'<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.
'">';
437 print
'<input type="submit" class="button buttongen button-save" name="save" value="'.dol_escape_htmltag($langs->trans(
"Save")).
'">';
439 print
'<input type="submit" class="button buttongen button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans(
"Cancel")).
'">';
441 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>';
443 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.$obj->entity.
'&mode='.urlencode($mode).
'&action=delete&token='.
newToken().
'">'.
img_delete().
'</a>';
457if ($mode ==
'searchkey') {
462 if (empty($langcode) || $langcode ==
'-1') {
465 if (empty($transkey)) {
468 if (empty($transvalue)) {
472 if ($action ==
'search' && ($nbempty > 999)) {
473 setEventMessages($langs->trans(
"WarningAtLeastKeyOrTranslationRequired"),
null,
'warnings');
476 foreach ($newlang->tab_translate as $key => $val) {
477 $newtranskey = preg_replace(
'/\$$/',
'', preg_replace(
'/^\^/',
'', $transkey));
478 $newtranskeystart = preg_match(
'/^\^/', $transkey);
479 $newtranskeyend = preg_match(
'/\$$/', $transkey);
480 $regexstring = ($newtranskeystart ?
'^' :
'').preg_quote($newtranskey,
'/').($newtranskeyend ?
'$' :
'');
481 if ($transkey && !preg_match(
'/'.$regexstring.
'/i', $key)) {
484 if ($transvalue && !preg_match(
'/'.preg_quote($transvalue,
'/').
'/i', $val)) {
487 $recordtoshow[$key] = $val;
492 $nbtotalofrecordswithoutfilters = count($newlang->tab_translate);
493 $nbtotalofrecords = count($recordtoshow);
495 if (($offset + $num) > $nbtotalofrecords) {
500 $title = $langs->trans(
"Translation");
501 if ($nbtotalofrecords > 0) {
502 $title .=
' <span class="opacitymedium colorblack paddingleft">('.$nbtotalofrecords.
' / '.$nbtotalofrecordswithoutfilters.
' - <span title="'.
dol_escape_htmltag(($nbtotaloffiles - $nbtotaloffilesexternal).
' core - '.($nbtotaloffilesexternal).
' external').
'">'.$nbtotaloffiles.
' '.$langs->trans(
"Files").
'</span>)</span>';
504 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, -1 * $nbtotalofrecords,
'', 0,
'',
'', $limit, 0, 0, 1);
506 $massactionbutton =
'';
508 print
'<input type="hidden" id="action" name="action" value="search">';
509 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
511 print
'<div class="div-table-responsive-no-min">';
512 print
'<table class="noborder centpercent">';
514 print
'<tr class="liste_titre_filter"><td>';
516 print $formadmin->select_language($langcode,
'langcode', 0,
null, 0, 0, 0,
'maxwidth250', 1);
519 print
'<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.dol_escape_htmltag($transkey).
'">';
521 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($transvalue).
'">';
530 print
'<input type="hidden" name="entitysearch" value="'.$conf->entity.
'">';
534 print
'<td class="right nowraponall">';
535 $searchpicto = $form->showFilterAndCheckAddButtons(!empty($massactionbutton) ? 1 : 0,
'checkforselect', 1);
540 print
'<tr class="liste_titre">';
541 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
542 print_liste_field_titre(
"TranslationKey", $_SERVER[
"PHP_SELF"],
'transkey',
'', $param,
'', $sortfield, $sortorder);
543 print_liste_field_titre(
"CurrentTranslationString", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
545 print
'<td align="center"></td>';
549 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'asc') {
550 ksort($recordtoshow);
552 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'desc') {
553 krsort($recordtoshow);
555 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'asc') {
556 asort($recordtoshow);
558 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'desc') {
559 arsort($recordtoshow);
564 foreach ($recordtoshow as $key => $val) {
569 if ($limit && $i > ($offset + $limit)) {
572 print
'<tr class="oddeven"><td>'.$langcode.
'</td><td>'.$key.
'</td><td class="small">';
573 $titleforvalue = $langs->trans(
"Translation").
' en_US for key '.$key.
':<br>'.(!empty($langsenfileonly->tab_translate[$key]) ? $langsenfileonly->trans($key) :
'<span class="opacitymedium">'.$langs->trans(
"None").
'</span>');
574 print
'<span title="'.dol_escape_htmltag($titleforvalue).
'" class="classfortooltip">';
578 print
'<td class="right nowraponall">';
579 if (!empty($newlangfileonly->tab_translate[$key])) {
580 if ($val != $newlangfileonly->tab_translate[$key]) {
582 $sql =
"SELECT rowid";
583 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
584 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
585 $sql .=
" AND transkey = '".$db->escape($key).
"'";
586 dol_syslog(
"translation::select from table", LOG_DEBUG);
587 $result = $db->query($sql);
589 $obj = $db->fetch_object($result);
591 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>';
593 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>';
594 print
' ';
595 $htmltext = $langs->trans(
"OriginalValueWas",
'<i>'.$newlangfileonly->tab_translate[$key].
'</i>');
596 print $form->textwithpicto(
'', $htmltext, 1,
'info');
599 print
'<a class="reposition paddingrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?mode=overwrite&langcode='.urlencode($langcode).
'&transkey='.urlencode($key).
'">'.
img_edit_add($langs->trans(
"TranslationOverwriteKey")).
'</a>';
603 $transifexlangfile =
'$';
605 $transifexurl =
'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.
'/'.$transifexlangfile.
'?q=key%3A'.$key;
607 print
' <a href="'.$transifexurl.
'" target="transifex">'.
img_picto($langs->trans(
'FixOnTransifex'),
'globe').
'</a>';
611 $sql =
"SELECT rowid";
612 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
613 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
614 $sql .=
" AND transkey = '".$db->escape($key).
"'";
615 dol_syslog(
"translation::select from table", LOG_DEBUG);
616 $result = $db->query($sql);
618 $obj = $db->fetch_object($result);
620 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>';
622 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>';
623 print
' ';
626 $htmltext = $langs->trans(
"TransKeyWithoutOriginalValue", $key);
627 print $form->textwithpicto(
'', $htmltext, 1,
'warning');
633 print
'</td></tr>'.
"\n";
636 if (empty($recordtoshow)) {
637 print
'<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
648if (!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()
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.
picto_from_langcode($codelang, $moreatt='', $notitlealt=0)
Return img flag of country for a language code or country code.
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.
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.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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.
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 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...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.