29require
'../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/json.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
48$langs->loadLangs(array(
'admin',
'banks',
'bills',
'blockedlog',
'other'));
51$action =
GETPOST(
'action',
'aZ09');
53$backtopage =
GETPOST(
'backtopage',
'alpha');
54$optioncss =
GETPOST(
'optioncss',
'aZ');
56$search_showonlyerrors =
GETPOSTINT(
'search_showonlyerrors');
57if ($search_showonlyerrors < 0) {
58 $search_showonlyerrors = 0;
61$search_startyear =
GETPOSTINT(
'search_startyear');
62$search_startmonth =
GETPOSTINT(
'search_startmonth');
63$search_startday =
GETPOSTINT(
'search_startday');
65$search_endmonth =
GETPOSTINT(
'search_endmonth');
67$search_id =
GETPOST(
'search_id',
'alpha');
68$search_fk_user =
GETPOST(
'search_fk_user',
'intcomma');
70if (
GETPOST(
'search_startyear') !=
'') {
71 $search_start =
dol_mktime(0, 0, 0, $search_startmonth, $search_startday, $search_startyear);
74if (
GETPOST(
'search_endyear') !=
'') {
75 $search_end =
dol_mktime(23, 59, 59, $search_endmonth, $search_endday, $search_endyear);
77$search_code =
GETPOST(
'search_code',
'array:alpha');
78$search_module_source =
GETPOST(
'search_module_source',
'array:alpha');
79$search_ref =
GETPOST(
'search_ref',
'alpha');
80$search_amount =
GETPOST(
'search_amount',
'alpha');
81$search_signature =
GETPOST(
'search_signature',
'alpha');
83if (($search_start == -1 || empty($search_start)) && !GETPOSTISSET(
'search_startmonth') && !GETPOSTISSET(
'begin')) {
86 $search_startday = $tmparray[
'mday'];
87 $search_startmonth = $tmparray[
'mon'];
88 $search_startyear = $tmparray[
'year'];
93$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
94$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
96if (empty($page) || $page == -1) {
99$offset = $limit * $page;
100$pageprev = $page - 1;
101$pagenext = $page + 1;
103if (empty($sortfield)) {
104 $sortfield =
'rowid';
106if (empty($sortorder)) {
111$block_static->loadTrackedEvents();
114if ((!$user->admin && !$user->hasRight(
'blockedlog',
'read')) || !
isModEnabled(
'blockedlog')) {
121$max_execution_time_for_importexport =
getDolGlobalInt(
'EXPORT_MAX_EXECUTION_TIME', 300);
122$max_time = @ini_get(
"max_execution_time");
123if ($max_time && $max_time < $max_execution_time_for_importexport) {
124 dol_syslog(
"max_execution_time=".$max_time.
" is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.
". We try to increase it dynamically.");
125 @ini_set(
"max_execution_time", $max_execution_time_for_importexport);
129$MAXFORSHOWNLINKS =
getDolGlobalInt(
'BLOCKEDLOG_MAX_FOR_SHOWN_LINKS', 100);
137if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
139 $search_fk_user =
'';
142 $search_code = array();
143 $search_module_source =
'';
146 $search_signature =
'';
147 $search_showonlyerrors = 0;
148 $search_startyear =
'';
149 $search_startmonth =
'';
150 $search_startday =
'';
151 $search_endyear =
'';
152 $search_endmonth =
'';
155 $search_array_options = array();
163$form =
new Form($db);
165if (
GETPOST(
'withtab',
'alpha')) {
166 $title = $langs->trans(
"ModuleSetup").
' '.$langs->trans(
'BlockedLog');
168 $title = $langs->trans(
"BrowseBlockedLog");
170$help_url =
"EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
172llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'bodyforlist mod-blockedlog page-admin_blockedlog_list');
174$blocks = $block_static->getLog(
'all', (
string) $search_id, $MAXLINES, $sortfield, $sortorder, (
int) $search_fk_user, $search_start, $search_end, $search_ref, $search_amount, $search_code, $search_signature, $search_module_source);
175if (!is_array($blocks)) {
177 setEventMessages($langs->trans(
"TooManyRecordToScanRestrictFilters", $MAXLINES),
null,
'errors');
179 dol_print_error($block_static->db, $block_static->error, $block_static->errors);
185if (
GETPOST(
'withtab',
'alpha')) {
186 $linkback =
'<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
192$texttop =
'<small class="opacitymedium">'.$langs->trans(
"RegistrationNumber").
':</small> <small>'.
dol_trunc($registrationnumber, 10).
'</small>';
194print
load_fiche_titre($title.
'<br>'.$texttop, $linkback,
'blockedlog', 0,
'',
'', $morehtmlcenter);
203print
'<div class="opacitymedium hideonsmartphone justify">';
205print $langs->trans(
"FingerprintsDesc").
"<br>";
206$s = $langs->trans(
"FilesIntegrityDesc",
'{s}');
207$s = str_replace(
'{s}', DOL_URL_ROOT.
'/blockedlog/admin/filecheck.php', $s);
213$htmltext .= $langs->trans(
"UnalterableLogTool2", $langs->transnoentitiesnoconv(
"Archives")).
"<br>";
214$htmltext .= $langs->trans(
"UnalterableLogTool3").
"<br>";
223 $param .=
'&contextpage='.urlencode($contextpage);
225if ($limit > 0 && $limit != $conf->liste_limit) {
226 $param .=
'&limit='.((int) $limit);
228if ($search_id !=
'') {
229 $param .=
'&search_id='.urlencode($search_id);
231if ($search_ref !=
'') {
232 $param .=
'&search_ref='.urlencode($search_ref);
234if ($search_fk_user > 0) {
235 $param .=
'&search_fk_user='.urlencode($search_fk_user);
237if ($search_startyear > 0) {
238 $param .=
'&search_startyear='.((int) $search_startyear);
240if ($search_startmonth > 0) {
241 $param .=
'&search_startmonth='.((int) $search_startmonth);
243if ($search_startday > 0) {
244 $param .=
'&search_startday='.((int) $search_startday);
246if ($search_endyear > 0) {
247 $param .=
'&search_endyear='.((int) $search_endyear);
249if ($search_endmonth > 0) {
250 $param .=
'&search_endmonth='.((int) $search_endmonth);
252if ($search_endday > 0) {
253 $param .=
'&search_endday='.((int) $search_endday);
256 $param .=
'&search_amount='.urlencode($search_amount);
258if ($search_signature) {
259 $param .=
'&search_signature='.urlencode($search_signature);
261if ($search_showonlyerrors > 0) {
262 $param .=
'&search_showonlyerrors='.((int) $search_showonlyerrors);
264if ($optioncss !=
'') {
265 $param .=
'&optioncss='.urlencode($optioncss);
267if (
GETPOST(
'withtab',
'alpha')) {
268 $param .=
'&withtab='.urlencode(
GETPOST(
'withtab',
'alpha'));
271print
'<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
273if ($optioncss !=
'') {
274 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
276print
'<input type="hidden" name="token" value="'.newToken().
'">';
277print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
278print
'<input type="hidden" name="action" value="list">';
279print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
280print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
281print
'<input type="hidden" name="page" value="'.$page.
'">';
282print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
283print
'<input type="hidden" name="withtab" value="'.GETPOST(
'withtab',
'alpha').
'">';
285print
'<div class="div-table-responsive">';
286print
'<table class="noborder centpercent liste">';
289print
'<tr class="liste_titre_filter">';
293 print
'<td class="liste_titre center">';
294 $searchpicto = $form->showFilterButtons();
299print
'<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="'.dol_escape_htmltag($search_id).
'"></td>';
301print
'<td class="liste_titre">';
303print $form->selectDate($search_start,
'search_start');
306print $form->selectDate($search_end,
'search_end');
310print
'<td class="liste_titre">';
311print $form->select_dolusers($search_fk_user,
'search_fk_user', 1,
null, 0,
'',
'',
'0', 0, 0,
'', 0,
'',
'maxwidth100');
315print
'<td class="liste_titre">';
316print $form->multiselectarray(
'search_module_source', $block_static->trackedmodules, $search_module_source, 0, 0,
'maxwidth150', 1);
320print
'<td class="liste_titre">';
321print $form->multiselectarray(
'search_code', $block_static->trackedevents, $search_code, 0, 0,
'maxwidth150', 1);
325print
'<td class="liste_titre"><input type="text" class="maxwidth50" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
328print
'<td class="liste_titre right"><input type="text" class="maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'"></td>';
331print
'<td class="liste_titre"></td>';
334print
'<td class="liste_titre"><input type="text" class="maxwidth50" name="search_signature" value="'.dol_escape_htmltag($search_signature).
'"></td>';
337print
'<td class="liste_titre center minwidth75imp parentonrightofpage">';
338$array = array(
"1" =>
"OnlyNonValid");
339print $form->selectarray(
'search_showonlyerrors', $array, $search_showonlyerrors, 1, 0, 0,
'', 1, 0, 0,
'ASC',
'search_status width100 onrightofpage', 1);
344 print
'<td class="liste_titre"></td>';
349 print
'<td class="liste_titre center">';
350 $searchpicto = $form->showFilterButtons();
358print
'<tr class="liste_titre">';
361 print
getTitleFieldOfList(
'<span id="blockchainstatus"></span>', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'class="center"', $sortfield, $sortorder,
'').
"\n";
363print
getTitleFieldOfList($langs->trans(
'#'), 0, $_SERVER[
"PHP_SELF"],
'rowid',
'', $param,
'', $sortfield, $sortorder,
'minwidth50 ').
"\n";
364print
getTitleFieldOfList($langs->trans(
'Date'), 0, $_SERVER[
"PHP_SELF"],
'date_creation',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
365print
getTitleFieldOfList($langs->trans(
'Author'), 0, $_SERVER[
"PHP_SELF"],
'user_fullname',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
366print
getTitleFieldOfList($langs->trans(
'POS'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
367print
getTitleFieldOfList($langs->trans(
'Action'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
368print
getTitleFieldOfList($langs->trans(
'Ref'), 0, $_SERVER[
"PHP_SELF"],
'ref_object',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
369print
getTitleFieldOfList($langs->trans(
'Amount'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'right ', 0, $langs->trans(
"TotalTTCIfInvoiceSeeCompleteDataForDetail").
'<br>'.$langs->trans(
"AmountInCurrency",
getDolCurrency())).
"\n";
370print
getTitleFieldOfList($langs->trans(
'DataOfArchivedEvent'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ', 0, $langs->trans(
'DataOfArchivedEventHelp'), 1).
"\n";
371print
getTitleFieldOfList($langs->trans(
'Fingerprint'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
372print
getTitleFieldOfList($form->textwithpicto($langs->trans(
'Status'), $langs->trans(
'DataOfArchivedEventHelp2')), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ').
"\n";
374 print
getTitleFieldOfList(
'', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
378 print
getTitleFieldOfList(
'<span id="blockchainstatus"></span>', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'class="center"', $sortfield, $sortorder,
'').
"\n";
382$checkresult = array();
383$checkdetail = array();
393 if (is_array($blocks)) {
394 foreach ($blocks as &$block) {
396 $tmpcheckresult = $block->checkSignature(
'', 1);
398 $checksignature = $tmpcheckresult[
'checkresult'];
400 $checkresult[$block->id] = $checksignature;
401 $checkdetail[$block->id] = $tmpcheckresult;
403 if (!$checksignature) {
404 if (empty($loweridinerror)) {
405 $loweridinerror = $block->id;
407 $loweridinerror = min($loweridinerror, $block->id);
414$refinvoicefound = array();
415$totalhtamount = array();
416$totalvatamount = array();
417$totalamount = array();
419if (is_array($blocks)) {
422 $object_link_title =
'';
424 foreach ($blocks as &$block) {
426 if (empty($search_showonlyerrors) || !$checkresult[$block->id]) {
430 if ($nbshown < $MAXFORSHOWNLINKS) {
431 $object_link = $block->getObjectLink();
432 $object_link_title =
'';
434 $object_link = $block->element.
'/'.$block->fk_object;
435 $object_link_title = $langs->trans(
'LinkHasBeenDisabledForPerformancePurpose');
439 print
'<tr class="oddeven">';
443 print
'<td class="liste_titre">';
448 print
'<td>'.dolPrintHTML((
string) $block->id).
'</td>';
451 print
'<td class="nowraponall">'.dol_print_date($block->date_creation,
'dayhour').
'</td>';
454 print
'<td class="tdoverflowmax200" title="'.dolPrintHTMLForAttribute($block->user_fullname).
'">';
460 $labelofmodulesource = $block->module_source;
461 print
'<td class="tdoverflowmax250" title="'.dolPrintHTMLForAttribute($labelofmodulesource).
'">'.
dolPrintHTML($labelofmodulesource).
'</td>';
464 $labelofaction = $langs->transnoentitiesnoconv(
'log'.$block->action);
465 print
'<td class="tdoverflowmax250" title="'.dolPrintHTMLForAttribute($labelofaction).
'">'.
dolPrintHTML($labelofaction).
'</td>';
468 print
'<td class="nowraponall"><div class="smallheight">';
469 if (!empty($block->ref_object)) {
471 if ($block->linktype && $block->linktoref) {
472 if ($block->linktype ==
'payment') {
473 print
'<br><span class="opacitymedium small">'.$langs->trans(
"PaymentOf").
' '.$block->linktoref.
'</span>';
475 if ($block->linktype ==
'replacedby') {
476 print
'<br><span class="opacitymedium small">'.$langs->trans(
"ReplacedBy").
' '.$block->linktoref.
'</span>';
487 $total_ht = $total_vat = $total_ttc = 0;
491 print
'<td class="right nowraponall">';
493 if (empty($total_ttc)) {
494 print
'<span class="opacitymedium">';
496 print
price($total_ttc);
497 if (empty($total_ttc)) {
504 print
'<td class="center"><a href="#" data-blockid="'.$block->id.
'" rel="show-info">'.
img_picto($langs->trans(
'ShowDetails'),
'note',
'class="size15x"').
'</span></td>';
507 print
'<td class="nowraponall">';
509 $texttoshow = $langs->trans(
"Fingerprint").
' - '.$langs->trans(
"SavedOnLine").
' =<br>'.$block->signature;
510 $texttoshow .=
'<br><br>'.$langs->trans(
"Fingerprint").
' - Recalculated hash_hmac(\'sha256\', '.strtolower($langs->trans(
"PreviousHash").
' on previous line').
' + data, secret key) =<br>'.$checkdetail[$block->id][
'calculatedsignature'];
511 $texttoshow .=
'<br><span class="opacitymedium">'.$langs->trans(
"PreviousHash").
'='.$checkdetail[$block->id][
'previoushash'].
'</span>';
512 $texttoshow .=
'<br><span class="opacitymedium">'.$langs->trans(
"SecretKey").
'=Not available from interface</span>';
514 print $form->textwithpicto(
dol_trunc($block->signature, 8), $texttoshow, 1,
'help',
'', 0, 2,
'fingerprint'.$block->id);
518 print
'<td class="center">';
519 if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) {
520 if ($checkresult[$block->id]) {
521 print
'<span class="badge badge-status4 badge-status" title="'.$langs->trans(
'OkCheckFingerprintValidityButChainIsKo').
'">OK</span>';
523 print
'<span class="badge badge-status8 badge-status" title="'.$langs->trans(
'KoCheckFingerprintValidity').
'">KO</span>';
526 print
'<span class="badge badge-status4 badge-status" title="'.$langs->trans(
'OkCheckFingerprintValidity').
'">OK</span>';
530 if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) {
531 if ($checkresult[$block->id]) {
533 print $form->textwithpicto(
'', $langs->trans(
'OkCheckFingerprintValidityButChainIsKo'));
547 print
'<td class="tdoverflowmax150"'.(preg_match(
'/<a/', $object_link) ?
'' :
'title="'.dol_escape_htmltag(
dol_string_nohtmltag($object_link.($object_link_title ?
' - '.$object_link_title :
''))).
'"').
'>';
548 print
'<!-- object_link -->';
555 print
'<td class="liste_titre">';
569 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
571 foreach ($totalamount as $key => $totalamountperref) {
572 if ($key ==
'BILL_VALIDATE') {
574 print
'<tr class="totalline">';
578 print
'<td class="liste_titre">';
583 print
'<td colspan="2">'.dolPrintHTML($langs->trans(
"TotalForAction").
' '.$langs->trans(
'log'.$key)).
'</td>';
589 print
'<td class="tdoverflowmax200">';
599 print
'<td class="nowraponall">';
603 print
'<td class="right nowraponall">';
605 foreach ($totalhtamount[$key] as $value) {
606 $totalhttoshow += $value;
608 print $langs->trans(
"HT").
': ';
609 print
price($totalhttoshow);
614 foreach ($totalvatamount[$key] as $value) {
615 $totalvattoshow += $value;
617 print $langs->trans(
"VAT").
': ';
618 print
price($totalvattoshow);
623 foreach ($totalamountperref as $value) {
624 $totaltoshow += $value;
626 print $langs->trans(
"TTC").
': ';
627 print
price($totaltoshow);
631 print
'<td class="center"></td>';
634 print
'<td class="nowraponall">';
638 print
'<td class="center">';
643 print
'<td class="tdoverflowmax150"'.(preg_match(
'/<a/', $object_link) ?
'' :
'title="'.dol_escape_htmltag(
dol_string_nohtmltag($object_link.($object_link_title ?
' - '.$object_link_title :
''))).
'"').
'>';
649 print
'<td class="liste_titre">';
666print
'<script type="text/javascript">
668jQuery(document).ready(function () {
669 jQuery("#dialogforpopup").dialog({
671 classes: { "ui-dialog": "highlight" },
672 maxHeight: window.innerHeight-60,
673 height: window.innerHeight-60,
674 width: '.($conf->browser->layout ==
'phone' ? 400 : 700).
',
677 }).css("z-index: 5000");
679 $("a[rel=show-info]").click(function() {
680 console.log("We click on tooltip a[rel=show-info], we open popup and get content using an ajax call");
682 var fk_block = $(this).attr("data-blockid");
687 url:
"'.DOL_URL_ROOT.'/blockedlog/ajax/block-info.php?id="+fk_block,
689 }).done(
function(data) {
690 jQuery(
"#dialogforpopup").html(data);
693 var mydialog = jQuery(
"#dialogforpopup");
694 mydialog.dialog({autoOpen:
false, modal:
true, height: (window.innerHeight - 150), width: \
'80%\', title: \''.
dol_escape_js($langs->transnoentitiesnoconv(
"UnlaterableDataOfEvent")).
'\',});
695 mydialog.dialog("open");
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
sumAmountsForUnalterableEvent($block, &$refinvoicefound, &$totalhtamount, &$totalvatamount, &$totalamount, &$total_ht, &$total_vat, &$total_ttc)
sumAmountsForUnalterableEvent
getHashUniqueIdOfRegistration()
Return a hash unique identifier of the registration.
blockedlogadmin_prepare_head($withtabsetup)
Define head array for tabs of blockedlog tools setup pages.
Class to manage Blocked Log.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_now($mode='gmt')
Return date for now.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
currentToken()
Return the value of token currently saved into session with name 'token'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
getDolDefaultContextPage($s)
Return the default context page string.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
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...
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.