36require
'../../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
43if (isModEnabled(
'accounting')) {
44 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
48$langs->loadLangs(array(
'accountancy',
'admin',
'companies',
'compta',
'errors',
'holiday',
'hrm',
'resource'));
50$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
51$confirm =
GETPOST(
'confirm',
'alpha');
53$rowid =
GETPOST(
'rowid',
'alpha');
54$code =
GETPOST(
'code',
'alpha');
58$actl[0] =
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="size15x"');
59$actl[1] =
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="size15x"');
61$listoffset =
GETPOST(
'listoffset',
'alpha');
62$listlimit =
GETPOST(
'listlimit',
'int') > 0 ?
GETPOST(
'listlimit',
'int') : 1000;
65$sortfield =
GETPOST(
"sortfield",
'aZ09comma');
66$sortorder =
GETPOST(
"sortorder",
'aZ09comma');
67$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
68if (empty($page) || $page == -1) {
71$offset = $listlimit * $page;
75$search_country_id =
GETPOST(
'search_country_id',
'int');
79if ($user->socid > 0) {
82if (!$user->hasRight(
'accounting',
'chartofaccount')) {
88$hookmanager->initHooks(array(
'admin'));
96$tabname[31] = MAIN_DB_PREFIX.
"accounting_system";
100$tablib[31] =
"Pcg_version";
104$tabsql[31] =
"SELECT s.rowid as rowid, pcg_version, s.label, s.fk_country as country_id, c.code as country_code, c.label as country, s.active FROM ".MAIN_DB_PREFIX.
"accounting_system as s, ".MAIN_DB_PREFIX.
"c_country as c WHERE s.fk_country=c.rowid and c.active=1";
107$tabsqlsort = array();
108$tabsqlsort[31] =
"pcg_version ASC";
112$tabfield[31] =
"pcg_version,label,country_id,country";
115$tabfieldvalue = array();
116$tabfieldvalue[31] =
"pcg_version,label,country";
119$tabfieldinsert = array();
120$tabfieldinsert[31] =
"pcg_version,label,fk_country";
130$tabcond[31] = isModEnabled(
'accounting');
134$tabhelp[31] = array(
'pcg_version'=>$langs->trans(
"EnterAnyCode"));
137$tabfieldcheck = array();
138$tabfieldcheck[31] = array();
142$elementList = array();
143$sourceList = array();
151if (
GETPOST(
'button_removefilter',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter_x',
'alpha')) {
152 $search_country_id =
'';
156if (
GETPOST(
'actionadd',
'alpha') ||
GETPOST(
'actionmodify',
'alpha')) {
157 $listfield = explode(
',', str_replace(
' ',
'', $tabfield[$id]));
158 $listfieldinsert = explode(
',', $tabfieldinsert[$id]);
159 $listfieldmodify = explode(
',', $tabfieldinsert[$id]);
160 $listfieldvalue = explode(
',', $tabfieldvalue[$id]);
164 foreach ($listfield as $f => $value) {
165 if ($value ==
'country_id' && in_array($tablib[$id], array(
'Pcg_version'))) {
168 if ((!GETPOSTISSET($value)) ||
GETPOST($value) ==
'') {
170 $fieldnamekey = $listfield[$f];
173 if ($fieldnamekey ==
'pcg_version') {
174 $fieldnamekey =
'Pcg_version';
176 if ($fieldnamekey ==
'libelle' || ($fieldnamekey ==
'label')) {
177 $fieldnamekey =
'Label';
180 setEventMessages($langs->transnoentities(
"ErrorFieldRequired", $langs->transnoentities($fieldnamekey)),
null,
'errors');
184 if (GETPOSTISSET(
"pcg_version")) {
185 if (
GETPOST(
"pcg_version") ==
'0') {
187 setEventMessages($langs->transnoentities(
'ErrorCodeCantContainZero'),
null,
'errors');
190 if (GETPOSTISSET(
"country") && (
GETPOST(
"country") ==
'0') && ($id != 2)) {
192 setEventMessages($langs->transnoentities(
"ErrorFieldRequired", $langs->transnoentities(
"Country")),
null,
'errors');
196 if ($ok &&
GETPOST(
'actionadd',
'alpha')) {
197 if ($tabrowid[$id]) {
200 $sql =
"SELECT max(".$tabrowid[$id].
") newid from ".$tabname[$id];
201 $result = $db->query($sql);
203 $obj = $db->fetch_object($result);
204 $newid = ($obj->newid + 1);
211 $sql =
"INSERT INTO ".$tabname[$id].
" (";
213 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
214 $sql .= $tabrowid[$id].
",";
216 $sql .= $tabfieldinsert[$id];
221 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
225 foreach ($listfieldinsert as $f => $value) {
226 if ($value ==
'price' || preg_match(
'/^amount/i', $value) || $value ==
'taux') {
227 $_POST[$listfieldvalue[$i]] =
price2num(
GETPOST($listfieldvalue[$i]),
'MU');
228 } elseif ($value ==
'entity') {
229 $_POST[$listfieldvalue[$i]] = $conf->entity;
234 if (
GETPOST($listfieldvalue[$i]) ==
'') {
237 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
244 $result = $db->query($sql);
247 $_POST = array(
'id'=>$id);
249 if ($db->errno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
250 setEventMessages($langs->transnoentities(
"ErrorRecordAlreadyExists"),
null,
'errors');
258 if ($ok &&
GETPOST(
'actionmodify',
'alpha')) {
259 if ($tabrowid[$id]) {
260 $rowidcol = $tabrowid[$id];
266 $sql =
"UPDATE ".$tabname[$id].
" SET ";
268 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
269 $sql .= $tabrowid[$id].
"=";
270 $sql .=
"'".$db->escape($rowid).
"', ";
273 foreach ($listfieldmodify as $field) {
274 if ($field ==
'price' || preg_match(
'/^amount/i', $field) || $field ==
'taux') {
275 $_POST[$listfieldvalue[$i]] =
price2num(
GETPOST($listfieldvalue[$i]),
'MU');
276 } elseif ($field ==
'entity') {
277 $_POST[$listfieldvalue[$i]] = $conf->entity;
283 if (
GETPOST($listfieldvalue[$i]) ==
'') {
286 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
290 $sql .=
" WHERE ".$rowidcol.
" = ".((int) $rowid);
294 $resql = $db->query($sql);
302if (
GETPOST(
'actioncancel',
'alpha')) {
306if ($action ==
'confirm_delete' && $confirm ==
'yes') {
307 if ($tabrowid[$id]) {
308 $rowidcol = $tabrowid[$id];
313 $sql =
"DELETE from ".$tabname[$id].
" WHERE ".$rowidcol.
" = ".((int) $rowid);
316 $result = $db->query($sql);
318 if ($db->errno() ==
'DB_ERROR_CHILD_EXISTS') {
319 setEventMessages($langs->transnoentities(
"ErrorRecordIsUsedByChild"),
null,
'errors');
327if ($action == $acts[0]) {
328 if ($tabrowid[$id]) {
329 $rowidcol = $tabrowid[$id];
335 $sql =
"UPDATE ".$tabname[$id].
" SET active = 1 WHERE ".$rowidcol.
" = ".((int) $rowid);
337 $sql =
"UPDATE ".$tabname[$id].
" SET active = 1 WHERE code='".$db->escape($code).
"'";
340 $result = $db->query($sql);
347if ($action == $acts[1]) {
348 if ($tabrowid[$id]) {
349 $rowidcol = $tabrowid[$id];
355 $sql =
"UPDATE ".$tabname[$id].
" SET active = 0 WHERE ".$rowidcol.
" = ".((int) $rowid);
357 $sql =
"UPDATE ".$tabname[$id].
" SET active = 0 WHERE code='".$db->escape($code).
"'";
360 $result = $db->query($sql);
367if ($action ==
'activate_favorite') {
368 if ($tabrowid[$id]) {
369 $rowidcol = $tabrowid[$id];
375 $sql =
"UPDATE ".$tabname[$id].
" SET favorite = 1 WHERE ".$rowidcol.
" = ".((int) $rowid);
377 $sql =
"UPDATE ".$tabname[$id].
" SET favorite = 1 WHERE code='".$db->escape($code).
"'";
380 $result = $db->query($sql);
387if ($action ==
'disable_favorite') {
388 if ($tabrowid[$id]) {
389 $rowidcol = $tabrowid[$id];
395 $sql =
"UPDATE ".$tabname[$id].
" SET favorite = 0 WHERE ".$rowidcol.
" = ".((int) $rowid);
397 $sql =
"UPDATE ".$tabname[$id].
" SET favorite = 0 WHERE code='".$db->escape($code).
"'";
400 $result = $db->query($sql);
411$form =
new Form($db);
416$titre = $langs->trans($tablib[$id]);
423if ($action ==
'delete') {
424 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?'.($page ?
'page='.urlencode($page).
'&' :
'').
'sortfield='.urlencode($sortfield).
'&sortorder='.urlencode($sortorder).
'&rowid='.urlencode($rowid).
'&code='.urlencode($code).
'&id='.urlencode($id), $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_delete',
'', 0, 1);
435 if ($search_country_id > 0) {
436 if (preg_match(
'/ WHERE /', $sql)) {
441 $sql .=
" c.rowid = ".((int) $search_country_id);
445 if ($sortfield ==
'country') {
446 $sortfield =
'country_code';
448 $sql .= $db->order($sortfield, $sortorder);
449 $sql .= $db->plimit($listlimit + 1, $offset);
452 $fieldlist = explode(
',', $tabfield[$id]);
454 print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?id='.$id.
'" method="POST">';
455 print
'<input type="hidden" name="token" value="'.newToken().
'">';
457 print
'<div class="div-table-responsive">';
458 print
'<table class="noborder centpercent">';
462 $fieldlist = explode(
',', $tabfield[$id]);
465 print
'<tr class="liste_titre">';
466 foreach ($fieldlist as $field => $value) {
469 $valuetoshow = ucfirst($fieldlist[$field]);
470 $valuetoshow = $langs->trans($valuetoshow);
472 if ($fieldlist[$field] ==
'code') {
473 $valuetoshow = $langs->trans(
"Code");
475 if ($fieldlist[$field] ==
'libelle' || $fieldlist[$field] ==
'label') {
476 $valuetoshow = $langs->trans(
"Label");
478 if ($fieldlist[$field] ==
'country') {
479 if (in_array(
'region_id', $fieldlist)) {
480 print
'<td> </td>';
continue;
482 $valuetoshow = $langs->trans(
"Country");
484 if ($fieldlist[$field] ==
'country_id') {
487 if ($fieldlist[$field] ==
'pcg_version' || $fieldlist[$field] ==
'fk_pcg_version') {
488 $valuetoshow = $langs->trans(
"Pcg_version");
491 if ($valuetoshow !=
'') {
492 print
'<td class="'.$class.
'">';
493 if (!empty($tabhelp[$id][$value]) && preg_match(
'/^http(s*):/i', $tabhelp[$id][$value])) {
494 print
'<a href="'.$tabhelp[$id][$value].
'">'.$valuetoshow.
' '.
img_help(1, $valuetoshow).
'</a>';
495 } elseif (!empty($tabhelp[$id][$value])) {
496 print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
505 print
'<input type="hidden" name="id" value="'.$id.
'">';
512 print
'<tr class="oddeven">';
514 $obj =
new stdClass();
516 if (
GETPOST(
'actionadd',
'alpha')) {
517 foreach ($fieldlist as $key => $val) {
524 $tmpaction =
'create';
525 $parameters = array(
'fieldlist'=>$fieldlist,
'tabname'=>$tabname[$id]);
526 $reshook = $hookmanager->executeHooks(
'createDictionaryFieldlist', $parameters, $obj, $tmpaction);
527 $error = $hookmanager->error; $errors = $hookmanager->errors;
529 if (empty($reshook)) {
533 print
'<td colspan="3" class="right">';
534 print
'<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans(
"Add").
'">';
538 $colspan = count($fieldlist) + 3;
540 print
'<tr><td colspan="'.$colspan.
'"> </td></tr>';
547 $resql = $db->query($sql);
549 $num = $db->num_rows($resql);
552 $param =
'&id='.urlencode($id);
553 if ($search_country_id > 0) {
554 $param .=
'&search_country_id='.urlencode($search_country_id);
556 $paramwithsearch = $param;
558 $paramwithsearch .=
'&sortorder='.urlencode($sortorder);
561 $paramwithsearch .=
'&sortfield='.urlencode($sortfield);
565 if ($num > $listlimit) {
566 print
'<tr class="none"><td class="right" colspan="'.(3 + count($fieldlist)).
'">';
567 print_fleche_navigation($page, $_SERVER[
"PHP_SELF"], $paramwithsearch, ($num > $listlimit),
'<li class="pagination"><span>'.$langs->trans(
"Page").
' '.($page + 1).
'</span></li>');
572 print
'<tr class="liste_titre liste_titre_add">';
573 foreach ($fieldlist as $field => $value) {
576 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
581 if ($value ==
'country') {
582 print
'<td class="liste_titre">';
583 print $form->select_country($search_country_id,
'search_country_id',
'', 28,
'maxwidth200 maxwidthonsmartphone');
586 print
'<td class="liste_titre"></td>';
590 print
'<td class="liste_titre"></td>';
591 print
'<td class="liste_titre right" colspan="2">';
592 $searchpicto = $form->showFilterAndCheckAddButtons(0);
598 print
'<tr class="liste_titre">';
599 print
getTitleFieldOfList($langs->trans(
"Pcg_version"), 0, $_SERVER[
"PHP_SELF"],
"pcg_version", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'');
600 print
getTitleFieldOfList($langs->trans(
"Label"), 0, $_SERVER[
"PHP_SELF"],
"label", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'');
601 print
getTitleFieldOfList($langs->trans(
"Country"), 0, $_SERVER[
"PHP_SELF"],
"country_code", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'');
602 print
getTitleFieldOfList($langs->trans(
"Status"), 0, $_SERVER[
"PHP_SELF"],
"active", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'center ');
611 $obj = $db->fetch_object($resql);
614 print
'<tr class="oddeven" id="rowid-'.$obj->rowid.
'">';
615 if ($action ==
'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
616 print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?id='.$id.
'" method="POST">';
617 print
'<input type="hidden" name="token" value="'.newToken().
'">';
618 print
'<input type="hidden" name="page" value="'.$page.
'">';
619 print
'<input type="hidden" name="rowid" value="'.$rowid.
'">';
622 $parameters = array(
'fieldlist'=>$fieldlist,
'tabname'=>$tabname[$id]);
623 $reshook = $hookmanager->executeHooks(
'editDictionaryFieldlist', $parameters, $obj, $tmpaction);
624 $error = $hookmanager->error; $errors = $hookmanager->errors;
626 if (empty($reshook)) {
630 print
'<td colspan="3" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).
'"> </a><input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans(
"Modify").
'">';
631 print
' <input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans(
"Cancel").
'"></td>';
634 $parameters = array(
'fieldlist'=>$fieldlist,
'tabname'=>$tabname[$id]);
635 $reshook = $hookmanager->executeHooks(
'viewDictionaryFieldlist', $parameters, $obj, $tmpaction);
637 $error = $hookmanager->error; $errors = $hookmanager->errors;
639 if (empty($reshook)) {
640 foreach ($fieldlist as $field => $value) {
643 $tmpvar = $fieldlist[$field];
644 $valuetoshow = $obj->$tmpvar;
645 if ($value ==
'type_template') {
646 $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
648 if ($value ==
'element') {
649 $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
650 } elseif ($value ==
'source') {
651 $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
652 } elseif ($valuetoshow ==
'all') {
653 $valuetoshow = $langs->trans(
'All');
654 } elseif ($fieldlist[$field] ==
'country') {
655 if (empty($obj->country_code)) {
658 $key = $langs->trans(
"Country".strtoupper($obj->country_code));
659 $valuetoshow = ($key !=
"Country".strtoupper($obj->country_code) ? $obj->country_code.
" - ".$key : $obj->country);
661 } elseif ($fieldlist[$field] ==
'country_id') {
666 if ($fieldlist[$field] ==
'tracking') {
667 $class .=
' tdoverflowauto';
671 print
'<!-- '.$fieldlist[$field].
' --><td class="'.$class.
'">'.$valuetoshow.
'</td>';
677 $iserasable = 1; $canbedisabled = 1; $canbemodified = 1;
679 $url = $_SERVER[
"PHP_SELF"].
'?token='.newToken().($page ?
'&page='.$page :
'').
'&sortfield='.$sortfield.
'&sortorder='.$sortorder.
'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code :
'')).
'&code='.(!empty($obj->code) ?urlencode($obj->code) :
'');
686 print
'<td class="center nowrap">';
687 if ($canbedisabled) {
688 print
'<a href="'.$url.
'action='.$acts[$obj->active].
'">'.$actl[$obj->active].
'</a>';
690 print $langs->trans(
"AlwaysActive");
695 if ($canbemodified) {
696 print
'<td class="center"><a class="reposition editfielda" href="'.$url.
'action=edit&token='.newToken().
'">'.
img_edit().
'</a></td>';
698 print
'<td> </td>';
703 print
'<td class="center"><a href="'.$url.
'action=delete&token='.newToken().
'">'.
img_delete().
'</a></td>';
705 print
'<td> </td>';
742 global $conf, $langs, $db;
745 global $elementList, $sourceList;
751 foreach ($fieldlist as $field => $value) {
752 if ($fieldlist[$field] ==
'country') {
753 if (in_array(
'region_id', $fieldlist)) {
760 $fieldname =
'country';
761 print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country :
'')), $fieldname,
'', 28,
'maxwidth200 maxwidthonsmartphone');
763 } elseif ($fieldlist[$field] ==
'country_id') {
764 if (!in_array(
'country', $fieldlist)) {
765 $country_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0);
767 print
'<input type="hidden" name="'.$fieldlist[$field].
'" value="'.$country_id.
'">';
770 } elseif ($fieldlist[$field] ==
'type_cdr') {
771 if ($fieldlist[$field] ==
'type_cdr') {
772 print
'<td class="center">';
776 if ($fieldlist[$field] ==
'type_cdr') {
777 print $form->selectarray($fieldlist[$field], array(0=>$langs->trans(
'None'), 1=>$langs->trans(
'AtEndOfMonth'), 2=>$langs->trans(
'CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:
''));
779 print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:
''), 1);
782 } elseif ($fieldlist[$field] ==
'code' && isset($obj->{$fieldlist[$field]})) {
783 print
'<td><input type="text" class="flat" value="'.(!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:
'').
'" size="10" name="'.$fieldlist[$field].
'"></td>';
786 $size =
''; $class =
'';
787 if ($fieldlist[$field] ==
'code') {
790 if ($fieldlist[$field] ==
'position') {
793 if ($fieldlist[$field] ==
'libelle') {
794 $size =
'centpercent';
796 if ($fieldlist[$field] ==
'sortorder' || $fieldlist[$field] ==
'sens' || $fieldlist[$field] ==
'category_type') {
799 print
'<input type="text" '.$size.
' class="flat'.($class ?
' '.$class :
'').
'" value="'.(isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:
'').
'" name="'.$fieldlist[$field].
'">';
fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
Show fields in insert/edit mode.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_help($usehelpcursor=1, $usealttitle=1)
Show help logo with cursor "?".
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
print_fleche_navigation($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $hideselectlimit=0, $beforearrows='', $hidenavigation=0)
Function to show navigation arrows into lists.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.