39require
'../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/multicurrency.lib.php';
52$langs->loadLangs(array(
'admin',
'multicurrency'));
55$action =
GETPOST(
'action',
'alpha');
56$massaction =
GETPOST(
'massaction',
'alpha');
58$confirm =
GETPOST(
'confirm',
'alpha');
59$toselect =
GETPOST(
'toselect',
'array');
61$sall = trim(
GETPOST(
'search_all',
'alphanohtml'));
64$search_rate =
GETPOST(
'search_rate',
'alpha');
65$search_rate_indirect =
GETPOST(
'search_rate_indirect',
'alpha');
66$search_code =
GETPOST(
'search_code',
'alpha');
67$multicurrency_code =
GETPOST(
'multicurrency_code',
'alpha');
70$rateindirectinput = (float)
price2num(
GETPOST(
'rateinidirectinput',
'alpha'));
71$optioncss =
GETPOST(
'optioncss',
'alpha');
74if (empty($page) || $page == -1) {
77$offset = $limit * $page;
80$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
81$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
83 $sortfield =
"cr.date_sync";
99$hookmanager->initHooks(array(
'EditorRatelist',
'globallist'));
106$fieldstosearchall = array(
107 'cr.date_sync' =>
"date_sync",
109 'cr.rate_indirect' =>
"rate_indirect",
115 'cr.date_sync' => array(
'label' =>
'Date',
'checked' => 1),
116 'cr.rate' => array(
'label' =>
'Rate',
'checked' => 1),
117 'cr.rate_indirect' => array(
'label' =>
'RateIndirect',
'checked' => 0,
'enabled' => (!
getDolGlobalString(
'MULTICURRENCY_USE_RATE_INDIRECT') ? 0 : 1)),
118 'm.code' => array(
'label' =>
'Code',
'checked' => 1),
124'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
129if (!$user->admin || !isModEnabled(
"multicurrency")) {
140if ($action ==
"create" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
141 if (empty($multicurrency_code) || $multicurrency_code ==
'-1') {
142 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Currency")),
null,
"errors");
145 if ($rateinput == 0) {
148 } elseif (empty($rateinput)) {
149 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Rate")),
null,
"errors");
156 $fk_currency = $currency_static->getIdFromCode($db, $multicurrency_code);
158 $currencyRate_static->fk_multicurrency = $fk_currency;
159 $currencyRate_static->entity =
$conf->entity;
160 $currencyRate_static->date_sync = $dateinput;
161 $currencyRate_static->rate = $rateinput;
162 $currencyRate_static->rate_indirect = $rateindirectinput;
164 $result = $currencyRate_static->create($user, intval($fk_currency));
166 setEventMessages($langs->trans(
'successRateCreate', $multicurrency_code),
null);
168 dol_syslog(
"currencyRate:createRate", LOG_WARNING);
169 setEventMessages($currencyRate_static->error, $currencyRate_static->errors,
'errors');
174if ($action ==
'update' && $user->hasRight(
'multicurrency',
'currency',
'read')) {
176 $result = $currencyRate->fetch($id_rate_selected);
179 $fk_currency = $currency_static->getIdFromCode($db, $multicurrency_code);
180 $currencyRate->date_sync = $dateinput;
181 $currencyRate->fk_multicurrency = $fk_currency;
182 $currencyRate->rate = $rateinput;
183 $res = $currencyRate->update($user);
194if ($action ==
"deleteRate" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
196 $current_rate->fetch((
int) $id_rate_selected);
200 $current_currency->fetch($current_rate->fk_multicurrency);
201 if ($current_currency) {
202 $delayedhtmlcontent = $form->formconfirm(
203 $_SERVER[
"PHP_SELF"].
'?id_rate='.$id_rate_selected,
204 $langs->trans(
'DeleteLineRate'),
205 $langs->trans(
'ConfirmDeleteLineRate', $current_rate->rate, $current_currency->name, $current_rate->date_sync),
212 dol_syslog(
"Multicurrency::fetch", LOG_WARNING);
219if ($action ==
"confirm_delete" && $user->hasRight(
'multicurrency',
'currency',
'read')) {
221 $current_rate->fetch((
int) $id_rate_selected);
223 $result = $current_rate->delete($user);
230 setEventMessages($langs->trans(
'NoCurrencyRateSelected'),
null,
"warnings");
231 dol_syslog($langs->trans(
'NoCurrencyRateSelected'), LOG_WARNING);
236if (
GETPOST(
'cancel',
'alpha')) {
240if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
244$parameters = array();
245$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
249if (empty($reshook)) {
251 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
254 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
256 $search_date_sync =
"";
257 $search_date_sync_end =
"";
260 $search_array_options = array();
264 $objectclass =
"CurrencyRate";
265 $uploaddir =
$conf->multicurrency->multidir_output;
266 $permissiontoread = $user->admin;
267 $permissiontodelete = $user->admin;
268 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
276$form =
new Form($db);
278$title = $langs->trans(
"CurrencyRate");
279$page_name =
"MultiCurrencySetup";
284$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
289print
dol_get_fiche_head($head,
'ratelist', $langs->trans(
"ModuleSetup"), -1,
"multicurrency");
293if (!in_array($action, array(
"updateRate",
"deleteRate"))) {
294 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post" name="formulaire">';
295 print
'<input type="hidden" name="token" value="'.newToken().
'">';
297 print
'<div class="div-table-responsive-no-min">';
298 print
'<table class="noborder centpercent"><tr>';
300 print
' <td>'.$langs->trans(
'Date').
'</td>';
302 print $form->selectDate($dateinput,
'dateinput', 0, 0, 1,
'', 1, 1);
305 print
'<td> '.$langs->trans(
'Currency').
'</td>';
306 print
'<td>'.$form->selectMultiCurrency((GETPOSTISSET(
'multicurrency_code') ?
GETPOST(
'multicurrency_code',
'alpha') : $multicurrency_code),
'multicurrency_code', 1,
" code != '".$db->escape(
$conf->currency).
"'", true).
'</td>';
308 print
' <td>'.$langs->trans(
'Rate').
' / '.$langs->getCurrencySymbol(
$conf->currency).
'</td>';
309 print
' <td><input type="text" min="0" step="any" class="maxwidth75" id="rateinput" name="rateinput" value="'.dol_escape_htmltag((
string) $rateinput).
'"></td>';
312 print
' <td>'.$langs->trans(
'RateIndirect').
' / '.$langs->getCurrencySymbol(
$conf->currency).
'</td>';
313 print
' <td><input type="text" min="0" step="any" class="maxwidth75" id="rateindirectinput" name="rateindirectinput" value="'.dol_escape_htmltag((
string) $rateindirectinput).
'"></td>';
315 print
'<script type="text/javascript">';
316 print
'jQuery(document).ready(function () {
318 jQuery("#rateindirectinput").keyup(function () {
319 var valindirect = jQuery(this).val();
320 valdirect = 1 / parseFloat(valindirect);
321 jQuery("#rateinput").val(valdirect);
322 console.log("Rate Direct:"+valdirect)
329 print
'<input type="hidden" name="action" value="create">';
330 print
'<input type="submit" class="button button-add small" name="btnCreateCurrencyRate" value="'.$langs->trans(
'CreateRate').
'">';
333 print
'</tr></table>';
344$sql =
'SELECT cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, cr.entity, m.code, m.name';
346$parameters = array();
347$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
348$sql .= $hookmanager->resPrint;
349$sql .=
' FROM '.MAIN_DB_PREFIX.
'multicurrency_rate as cr ';
350$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"multicurrency AS m ON cr.fk_multicurrency = m.rowid";
354if ($search_date_sync && $search_date_sync_end) {
355 $sql .=
" AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync).
"' AND '".$db->idate($search_date_sync_end).
"')";
356} elseif ($search_date_sync && !$search_date_sync_end) {
357 $sql .=
natural_search(
'cr.date_sync', $db->idate($search_date_sync));
365$sql .=
" WHERE m.code <> '".$db->escape(
$conf->currency).
"'";
368$parameters = array();
369$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
370$sql .= $hookmanager->resPrint;
371$sql .=
" GROUP BY cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, m.code, cr.entity, m.code, m.name";
374$parameters = array();
375$reshook = $hookmanager->executeHooks(
'printFieldSelect', $parameters);
376$sql .= $hookmanager->resPrint;
378$sql .= $db->order($sortfield, $sortorder);
381$nbtotalofrecords =
'';
383 $result = $db->query($sql);
386 $nbtotalofrecords = $db->num_rows($result);
387 if (($page * $limit) > $nbtotalofrecords) {
392 setEventMessage($langs->trans(
'No_record_on_multicurrency_rate'),
'warnings');
396$sql .= $db->plimit($limit + 1, $offset);
398$resql = $db->query($sql);
400 $num = $db->num_rows($resql);
401 $arrayofselected = is_array($toselect) ? $toselect : array();
404 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
405 $param .=
'&contextpage='.urlencode($contextpage);
407 if ($limit > 0 && $limit !=
$conf->liste_limit) {
408 $param .=
'&limit='.((int) $limit);
411 $param .=
"&sall=".urlencode($sall);
414 if ($search_date_sync) {
415 $param =
"&search_date_sync=".$search_date_sync;
417 if ($search_date_sync_end) {
418 $param =
"&search_date_sync_end=".$search_date_sync_end;
421 $param =
"&search_rate=".urlencode($search_rate);
423 if ($search_code !=
'') {
424 $param .=
"&search_code=".urlencode($search_code);
428 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
431 $arrayofmassactions[
'predelete'] = $langs->trans(
"Delete");
433 if (in_array($massaction, array(
'presend',
'predelete'))) {
434 $arrayofmassactions = array();
436 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
438 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" name="formulaire">';
439 if ($optioncss !=
'') {
440 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
442 print
'<input type="hidden" name="token" value="'.newToken().
'">';
443 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
444 print
'<input type="hidden" name="action" value="list">';
445 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
446 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
447 print
'<input type="hidden" name="page" value="'.$page.
'">';
448 print
'<input type="hidden" name="type" value="'.$type.
'">';
450 print_barre_liste($texte, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'title_currency.png', 0, $newcardbutton,
'', $limit);
452 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
455 foreach ($fieldstosearchall as $key => $val) {
456 $fieldstosearchall[$key] = $langs->trans($val);
458 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).implode(
', ', $fieldstosearchall).
'</div>';
465 $parameters = array();
466 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
467 if (empty($reshook)) {
468 $moreforfilter .= $hookmanager->resPrint;
470 $moreforfilter = $hookmanager->resPrint;
473 if ($moreforfilter) {
474 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
475 print $moreforfilter;
479 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
480 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
481 if ($massactionbutton) {
482 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
485 print
'<div class="div-table-responsive">';
486 print
'<table class="tagtable centpercent nomarginbottom liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
489 print
'<tr class="liste_titre_filter">';
493 print
'<td class="liste_titre center">';
494 $searchpicto = $form->showFilterButtons();
499 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
500 print
'<td class="liste_titre" align="left">';
501 print $form->selectDate(
dol_print_date($search_date_sync,
"%Y-%m-%d"),
'search_date_sync', 0, 0, 1);
502 print $form->selectDate(
dol_print_date($search_date_sync_end,
"%Y-%m-%d"),
'search_date_sync_end', 0, 0, 1);
506 if (!empty($arrayfields[
'm.code'][
'checked'])) {
507 print
'<td class="liste_titre" align="left">';
508 print $form->selectMultiCurrency($multicurrency_code,
'search_code', 1,
" code != '".
$conf->currency.
"'",
true);
512 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
513 print
'<td class="liste_titre" align="left">';
514 print
'<input class="flat maxwidth75" type="text" name="search_rate" value="'.dol_escape_htmltag($search_rate).
'">';
519 $parameters = array(
'arrayfields' => $arrayfields);
520 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
521 print $hookmanager->resPrint;
525 print
'<td class="liste_titre center">';
526 $searchpicto = $form->showFilterButtons();
532 print
'<tr class="liste_titre">';
535 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'maxwidthsearch center ');
537 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
539 print_liste_field_titre($arrayfields[
'cr.date_sync'][
'label'], $_SERVER[
"PHP_SELF"],
"cr.date_sync",
"", $param,
"", $sortfield, $sortorder);
541 if (!empty($arrayfields[
'm.code'][
'checked'])) {
542 print_liste_field_titre($arrayfields[
'm.code'][
'label'], $_SERVER[
"PHP_SELF"],
"m.code",
"", $param,
"", $sortfield, $sortorder);
544 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
545 print_liste_field_titre($arrayfields[
'cr.rate'][
'label'], $_SERVER[
"PHP_SELF"],
"cr.rate",
"", $param,
"", $sortfield, $sortorder);
549 $parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
550 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
551 print $hookmanager->resPrint;
554 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch center ');
559 $totalarray = array();
560 $totalarray[
'nbfield'] = 0;
561 while ($i < min($num, $limit)) {
562 $obj = $db->fetch_object($resql);
564 print
'<tr class="oddeven">';
567 if ($action ==
"updateRate" && $obj->rowid == $id_rate_selected) {
569 print
'<td class="center">';
572 print
'<td><input class="minwidth200" name="dateinput" value="'. date(
'Y-m-d',
dol_stringtotime($obj->date_sync)) .
'" type="date"></td>';
573 print
'<td>' . $form->selectMultiCurrency($obj->code,
'multicurrency_code', 1,
" code != '".$conf->currency.
"'",
true) .
'</td>';
574 print
'<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="' .
dol_escape_htmltag($obj->rate) .
'">';
575 print
'<input type="hidden" name="page" value="'.dol_escape_htmltag((
string) $page).
'">';
576 print
'<input type="hidden" name="id_rate" value="'.dol_escape_htmltag($obj->rowid).
'">';
577 print
'<button type="submit" class="button small reposition" name="action" value="update">'.$langs->trans(
"Modify").
'</button>';
578 print
'<button type="submit" class="button small reposition" name="action" value="cancel">'.$langs->trans(
"Cancel").
'</button>';
581 print
'<td class="center">';
587 print
'<td class="nowrap center">';
588 if ($massactionbutton || $massaction) {
590 if (in_array($obj->rowid, $arrayofselected)) {
593 print
'<a class="editfielda marginleftonly marginrightonly reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=updateRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'edit',
'edit').
'</a>';
594 print
'<a class="marginleftonly marginrightonly reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deleteRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'delete',
'delete').
'</a>';
595 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
599 $totalarray[
'nbfield']++;
604 if (!empty($arrayfields[
'cr.date_sync'][
'checked'])) {
605 print
'<td class="tdoverflowmax200">';
606 print $obj->date_sync;
609 $totalarray[
'nbfield']++;
614 if (!empty($arrayfields[
'm.code'][
'checked'])) {
615 print
'<td class="tdoverflowmax200">';
617 print
' - <span class="opacitymedium">'.$obj->name.
'</span>';
621 $totalarray[
'nbfield']++;
626 if (!empty($arrayfields[
'cr.rate'][
'checked'])) {
627 print
'<td class="tdoverflowmax200">';
631 $totalarray[
'nbfield']++;
636 if (!empty($arrayfields[
'cr.rate_indirect'][
'checked'])) {
637 print
'<td class="tdoverflowmax200">';
638 print $obj->rate_indirect;
641 $totalarray[
'nbfield']++;
647 $parameters = array(
'arrayfields' => $arrayfields,
'obj' => $obj);
648 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
649 print $hookmanager->resPrint;
653 print
'<td class="nowrap center">';
654 if ($massactionbutton || $massaction) {
656 if (in_array($obj->rowid, $arrayofselected)) {
659 print
'<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=updateRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'edit',
'edit').
'</a>';
660 print
'<a class="marginleftonly marginrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=deleteRate&token='.
newToken().
'&id_rate='.$obj->rowid.
'">'.
img_picto(
'delete',
'delete').
'</a>';
661 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
665 $totalarray[
'nbfield']++;
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
dol_stringtotime($string, $gm=1)
Convert a string date into a GM Timestamps date Warning: YYYY-MM-DDTHH:MM:SS+02:00 (RFC3339) is not s...
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
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.
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_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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=0)
Set event message in dol_events session object.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
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...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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...
multicurrencyAdminPrepareHead()
Prepare array with list of tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.