26require
'../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
32$langs->loadLangs(array(
"companies",
"products",
"admin",
"sms",
"other",
"errors"));
39$action =
GETPOST(
'action',
'aZ09');
40$optioncss =
GETPOST(
'optionscss',
'aZ09');
41$contextpage =
GETPOST(
'contextpage',
'aZ09');
43$mode =
GETPOST(
'mode',
'aZ09') ?
GETPOST(
'mode',
'aZ09') :
'searchkey';
45$langcode =
GETPOST(
'langcode',
'alphanohtml');
46$transkey =
GETPOST(
'transkey',
'alphanohtml');
47if ($mode ==
'searchkey') {
48 $transvalue =
GETPOST(
'transvalue',
'alphanohtml');
50 $transvalue =
GETPOST(
'transvalue',
'restricthtml');
54$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
55$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
56$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
57$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
58if (empty($page) || $page == -1) {
61$offset = $limit * $page;
65 $sortfield =
'lang,transkey';
72$hookmanager->initHooks(array(
'admintranslation',
'globaladmin'));
79if (
GETPOST(
'cancel',
'alpha')) {
83if (!
GETPOST(
'confirmmassaction',
'alpha') && !empty($massaction) && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
88$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
93include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
96if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
100 $search_array_options = array();
103if ($action ==
'setMAIN_ENABLE_OVERWRITE_TRANSLATION') {
105 dolibarr_set_const($db,
'MAIN_ENABLE_OVERWRITE_TRANSLATION', 1,
'chaine', 0,
'', $conf->entity);
107 dolibarr_set_const($db,
'MAIN_ENABLE_OVERWRITE_TRANSLATION', 0,
'chaine', 0,
'', $conf->entity);
111if ($action ==
'update') {
112 if ($transkey ==
'') {
113 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Key")),
null,
'errors');
116 if ($transvalue ==
'') {
117 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
123 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"overwrite_trans set transkey = '".$db->escape($transkey).
"', transvalue = '".$db->escape($transvalue).
"' WHERE rowid = ".((int)
GETPOST(
'rowid',
'int'));
124 $result = $db->query($sql);
133 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
134 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
143if ($action ==
'add') {
146 if (empty($langcode)) {
147 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Language")),
null,
'errors');
150 if ($transkey ==
'') {
151 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Key")),
null,
'errors');
154 if ($transvalue ==
'') {
155 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")),
null,
'errors');
161 $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).
")";
162 $result = $db->query($sql);
171 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
172 setEventMessages($langs->trans(
"WarningAnEntryAlreadyExistForTransKey"),
null,
'warnings');
182if ($action ==
'delete') {
183 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"overwrite_trans WHERE rowid = ".((int) $id);
184 $result = $db->query($sql);
200$form =
new Form($db);
203$wikihelp =
'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
204llxHeader(
'', $langs->trans(
"Setup"), $wikihelp);
206$param =
'&mode='.urlencode($mode);
208$enabledisablehtml =
'';
209$enabledisablehtml .= $langs->trans(
"EnableOverwriteTranslation").
' ';
212 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.newToken().
'&value=1'.$param.
'">';
213 $enabledisablehtml .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
214 $enabledisablehtml .=
'</a>';
217 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&token='.newToken().
'&value=0'.$param.
'">';
218 $enabledisablehtml .=
img_picto($langs->trans(
"Activated"),
'switch_on');
219 $enabledisablehtml .=
'</a>';
222print
load_fiche_titre($langs->trans(
"Translation"), $enabledisablehtml,
'title_setup');
224$current_language_code = $langs->defaultlang;
226print $form->textwithpicto(
'<span class="opacitymedium">'.$langs->trans(
"CurrentUserLanguage").
':</span> <strong>'.$s.
' '.$current_language_code.
'</strong>', $langs->trans(
"TranslationDesc")).
'</span><br>';
230if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
231 $param .=
'&contextpage='.urlencode($contextpage);
233if ($limit > 0 && $limit != $conf->liste_limit) {
234 $param .=
'&limit='.((int) $limit);
236if (isset($optioncss) && $optioncss !=
'') {
237 $param .=
'&optioncss='.urlencode($optioncss);
240 $param .=
'&langcode='.urlencode($langcode);
243 $param .=
'&transkey='.urlencode($transkey);
246 $param .=
'&transvalue='.urlencode($transvalue);
250print
'<form action="'.$_SERVER[
"PHP_SELF"].((empty($user->entity) && !empty($debug)) ?
'?debug=1' :
'').
'" method="POST">';
251if (isset($optioncss) && $optioncss !=
'') {
252 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
254print
'<input type="hidden" name="token" value="'.newToken().
'">';
255print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
256print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
257print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
264$langcode = GETPOSTISSET(
'langcode') ?
GETPOST(
'langcode') : $langs->defaultlang;
267$newlang->setDefaultLang($langcode);
269$langsenfileonly =
new Translate(
'', $conf);
270$langsenfileonly->setDefaultLang(
'en_US');
272$newlangfileonly =
new Translate(
'', $conf);
273$newlangfileonly->setDefaultLang($langcode);
275$recordtoshow = array();
280$listoffiles = array();
281$listoffilesexternalmodules = array();
285foreach ($modulesdir as $keydir => $tmpsearchdir) {
286 $searchdir = $tmpsearchdir;
289 $dir_lang = dirname(dirname($searchdir)).
"/langs/".$langcode;
292 $filearray =
dol_dir_list($dir_lang_osencoded,
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
293 foreach ($filearray as $file) {
294 $tmpfile = preg_replace(
'/.lang/i',
'', basename($file[
'name']));
295 $moduledirname = (basename(dirname(dirname($dir_lang))));
299 $langkey .=
'@'.$moduledirname;
303 $result = $newlang->load($langkey, 0, 0,
'', 0);
304 $result = $newlangfileonly->load($langkey, 0, 0,
'', 1);
306 print
'Failed to load language file '.$tmpfile.
'<br>'.
"\n";
308 $listoffiles[$langkey] = $tmpfile;
309 if (strpos($langkey,
'@') !==
false) {
310 $listoffilesexternalmodules[$langkey] = $tmpfile;
315 $result = $langsenfileonly->load($langkey, 0, 0,
'', 1);
320$nbtotaloffiles = count($listoffiles);
321$nbtotaloffilesexternal = count($listoffilesexternalmodules);
323if ($mode ==
'overwrite') {
324 print
'<input type="hidden" name="page" value="'.$page.
'">';
328 $disabled =
' disabled="disabled"';
332 $disablededit =
' disabled';
335 print
'<div class="justify"><span class="opacitymedium">';
336 print
img_info().
' '.$langs->trans(
"SomeTranslationAreUncomplete");
337 $urlwikitranslatordoc =
'https://wiki.dolibarr.org/index.php/Translator_documentation';
338 print
' ('.str_replace(
'{s1}',
'<a href="'.$urlwikitranslatordoc.
'" target="_blank" rel="noopener noreferrer external">'.$langs->trans(
"Here").
'</a>', $langs->trans(
"SeeAlso",
'{s1}')).
')<br>';
339 print $langs->trans(
"TranslationOverwriteDesc", $langs->transnoentitiesnoconv(
"Language"), $langs->transnoentitiesnoconv(
"Key"), $langs->transnoentitiesnoconv(
"NewTranslationStringToShow")).
"\n";
340 print
' ('.$langs->trans(
"TranslationOverwriteDesc2").
').'.
"<br>\n";
341 print
'</span></div>';
346 print
'<input type="hidden" name="action" value="'.($action ==
'edit' ?
'update' :
'add').
'">';
347 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
349 print
'<div class="div-table-responsive-no-min">';
350 print
'<table class="noborder centpercent">';
351 print
'<tr class="liste_titre">';
352 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
354 print_liste_field_titre(
"NewTranslationStringToShow", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
356 print
'<td align="center"></td>';
363 print
'<tr class="oddeven"><td>';
364 print $formadmin->select_language(
GETPOST(
'langcode'),
'langcode', 0,
null, 1, 0, $disablededit ? 1 : 0,
'maxwidth250', 1);
367 print
'<input type="text" class="flat maxwidthonsmartphone"'.$disablededit.
' name="transkey" id="transkey" value="'.(!empty($transkey) ? $transkey :
"").
'">';
369 print
'<input type="text" class="quatrevingtpercent"'.$disablededit.
' name="transvalue" id="transvalue" value="'.(!empty($transvalue) ? $transvalue :
"").
'">';
371 print
'<td class="center">';
372 print
'<input type="hidden" name="entity" value="'.$conf->entity.
'">';
373 print
'<input type="submit" class="button"'.$disabled.
' value="'.$langs->trans(
"Add").
'" name="add" title="'.
dol_escape_htmltag($langs->trans(
"YouMustEnableTranslationOverwriteBefore")).
'">';
379 $sql =
"SELECT rowid, entity, lang, transkey, transvalue";
380 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
381 $sql .=
" WHERE 1 = 1";
382 $sql .=
" AND entity IN (".getEntity(
'overwrite_trans').
")";
383 $sql .= $db->order($sortfield, $sortorder);
385 dol_syslog(
"translation::select from table", LOG_DEBUG);
386 $result = $db->query($sql);
388 $num = $db->num_rows($result);
392 $obj = $db->fetch_object($result);
396 print
'<tr class="oddeven">';
398 print
'<td>'.$obj->lang.
'</td>'.
"\n";
400 if ($action ==
'edit' && $obj->rowid ==
GETPOST(
'rowid',
'int')) {
401 print
'<input type="text" class="quatrevingtpercent" name="transkey" value="'.dol_escape_htmltag($obj->transkey).
'">';
403 print $obj->transkey;
408 print
'<td class="small">';
414 if ($action ==
'edit' && $obj->rowid ==
GETPOST(
'rowid',
'int')) {
415 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($obj->transvalue).
'">';
418 $titleforvalue = $langs->trans(
"Translation").
' en_US for key '.$obj->transkey.
':<br>'.($langsenfileonly->tab_translate[$obj->transkey] ? $langsenfileonly->trans($obj->transkey) :
'<span class="opacitymedium">'.$langs->trans(
"None").
'</span>');
422 print
'<span title="'.dol_escape_htmltag($titleforvalue).
'" class="classfortooltip">';
428 print
'<td class="center">';
429 if ($action ==
'edit' && $obj->rowid ==
GETPOST(
'rowid',
'int')) {
430 print
'<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.
'">';
431 print
'<input type="submit" class="button buttongen button-save" name="save" value="'.dol_escape_htmltag($langs->trans(
"Save")).
'">';
433 print
'<input type="submit" class="button buttongen button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans(
"Cancel")).
'">';
435 print
'<a class="reposition editfielda paddingrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.$obj->entity.
'&mode='.urlencode($mode).
'&action=edit&token='.newToken().((empty($user->entity) && $debug) ?
'&debug=1' :
'').
'">'.
img_edit().
'</a>';
437 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$obj->rowid.
'&entity='.$obj->entity.
'&mode='.urlencode($mode).
'&action=delete&token='.newToken().((empty($user->entity) && $debug) ?
'&debug=1' :
'').
'">'.
img_delete().
'</a>';
451if ($mode ==
'searchkey') {
456 if (empty($langcode) || $langcode ==
'-1') {
459 if (empty($transkey)) {
462 if (empty($transvalue)) {
466 if ($action ==
'search' && ($nbempty > 999)) {
467 setEventMessages($langs->trans(
"WarningAtLeastKeyOrTranslationRequired"),
null,
'warnings');
470 foreach ($newlang->tab_translate as $key => $val) {
471 $newtranskey = preg_replace(
'/\$$/',
'', preg_replace(
'/^\^/',
'', $transkey));
472 $newtranskeystart = preg_match(
'/^\^/', $transkey);
473 $newtranskeyend = preg_match(
'/\$$/', $transkey);
474 $regexstring = ($newtranskeystart ?
'^' :
'').preg_quote($newtranskey,
'/').($newtranskeyend ?
'$' :
'');
475 if ($transkey && !preg_match(
'/'.$regexstring.
'/i', $key)) {
478 if ($transvalue && !preg_match(
'/'.preg_quote($transvalue,
'/').
'/i', $val)) {
481 $recordtoshow[$key] = $val;
486 $nbtotalofrecordswithoutfilters = count($newlang->tab_translate);
487 $nbtotalofrecords = count($recordtoshow);
489 if (($offset + $num) > $nbtotalofrecords) {
494 $title = $langs->trans(
"Translation");
495 if ($nbtotalofrecords > 0) {
496 $title .=
' <span class="opacitymedium colorblack paddingleft">('.$nbtotalofrecords.
' / '.$nbtotalofrecordswithoutfilters.
' - <span title="'.
dol_escape_htmltag(($nbtotaloffiles - $nbtotaloffilesexternal).
' core - '.($nbtotaloffilesexternal).
' external').
'">'.$nbtotaloffiles.
' '.$langs->trans(
"Files").
'</span>)</span>';
498 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, -1 * $nbtotalofrecords,
'', 0,
'',
'', $limit, 0, 0, 1);
500 $massactionbutton =
'';
502 print
'<input type="hidden" id="action" name="action" value="search">';
503 print
'<input type="hidden" id="mode" name="mode" value="'.$mode.
'">';
505 print
'<div class="div-table-responsive-no-min">';
506 print
'<table class="noborder centpercent">';
508 print
'<tr class="liste_titre_filter"><td>';
510 print $formadmin->select_language($langcode,
'langcode', 0,
null, 0, 0, 0,
'maxwidth250', 1);
513 print
'<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.dol_escape_htmltag($transkey).
'">';
515 print
'<input type="text" class="quatrevingtpercent" name="transvalue" value="'.dol_escape_htmltag($transvalue).
'">';
524 print
'<input type="hidden" name="entitysearch" value="'.$conf->entity.
'">';
528 print
'<td class="right nowraponall">';
529 $searchpicto = $form->showFilterAndCheckAddButtons(!empty($massactionbutton) ? 1 : 0,
'checkforselect', 1);
534 print
'<tr class="liste_titre">';
535 print_liste_field_titre(
"Language_en_US_es_MX_etc", $_SERVER[
"PHP_SELF"],
'lang,transkey',
'', $param,
'', $sortfield, $sortorder);
537 print_liste_field_titre(
"CurrentTranslationString", $_SERVER[
"PHP_SELF"],
'transvalue',
'', $param,
'', $sortfield, $sortorder);
539 print
'<td align="center"></td>';
543 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'asc') {
544 ksort($recordtoshow);
546 if ($sortfield ==
'transkey' && strtolower($sortorder) ==
'desc') {
547 krsort($recordtoshow);
549 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'asc') {
550 asort($recordtoshow);
552 if ($sortfield ==
'transvalue' && strtolower($sortorder) ==
'desc') {
553 arsort($recordtoshow);
558 foreach ($recordtoshow as $key => $val) {
563 if ($i > ($offset + $limit)) {
566 print
'<tr class="oddeven"><td>'.$langcode.
'</td><td>'.$key.
'</td><td class="small">';
567 $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>');
568 print
'<span title="'.dol_escape_htmltag($titleforvalue).
'" class="classfortooltip">';
572 print
'<td class="right nowraponall">';
573 if (!empty($newlangfileonly->tab_translate[$key])) {
574 if ($val != $newlangfileonly->tab_translate[$key]) {
576 $sql =
"SELECT rowid";
577 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
578 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
579 $sql .=
" AND transkey = '".$db->escape($key).
"'";
580 dol_syslog(
"translation::select from table", LOG_DEBUG);
581 $result = $db->query($sql);
583 $obj = $db->fetch_object($result);
585 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>';
587 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>';
588 print
' ';
589 $htmltext = $langs->trans(
"OriginalValueWas",
'<i>'.$newlangfileonly->tab_translate[$key].
'</i>');
590 print $form->textwithpicto(
'', $htmltext, 1,
'info');
593 print
'<a class="reposition paddingrightonly" href="'.$_SERVER[
'PHP_SELF'].
'?mode=overwrite&langcode='.urlencode($langcode).
'&transkey='.urlencode($key).
'">'.
img_edit_add($langs->trans(
"TranslationOverwriteKey")).
'</a>';
597 $transifexlangfile =
'$';
599 $transifexurl =
'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.
'/'.$transifexlangfile.
'?q=key%3A'.$key;
601 print
' <a href="'.$transifexurl.
'" target="transifex">'.
img_picto($langs->trans(
'FixOnTransifex'),
'globe').
'</a>';
605 $sql =
"SELECT rowid";
606 $sql .=
" FROM ".MAIN_DB_PREFIX.
"overwrite_trans";
607 $sql .=
" WHERE entity IN (".getEntity(
'overwrite_trans').
")";
608 $sql .=
" AND transkey = '".$db->escape($key).
"'";
609 dol_syslog(
"translation::select from table", LOG_DEBUG);
610 $result = $db->query($sql);
612 $obj = $db->fetch_object($result);
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
' ';
619 $htmltext = $langs->trans(
"TransKeyWithoutOriginalValue", $key);
620 print $form->textwithpicto(
'', $htmltext, 1,
'warning');
626 print
'</td></tr>'.
"\n";
629 if (empty($recordtoshow)) {
630 print
'<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
641if (!empty($langcode)) {
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($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 modules directories.
picto_from_langcode($codelang, $moreatt='', $notitlealt=0)
Return img flag of country for a language code or country code.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_set_focus($selector)
Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
print_barre_liste($titre, $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.
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 editer/modifier 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.