28require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/authority.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36$langs->loadLangs(array(
'admin',
'bills',
'blockedlog',
'other'));
39if ((!$user->admin && !$user->hasRight(
'blockedlog',
'read')) || empty($conf->blockedlog->enabled)) {
44$action =
GETPOST(
'action',
'aZ09');
45$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'blockedloglist';
46$backtopage =
GETPOST(
'backtopage',
'alpha');
47$optioncss =
GETPOST(
'optioncss',
'aZ');
49$search_showonlyerrors =
GETPOST(
'search_showonlyerrors',
'int');
50if ($search_showonlyerrors < 0) {
51 $search_showonlyerrors = 0;
54$search_startyear =
GETPOST(
'search_startyear',
'int');
55$search_startmonth =
GETPOST(
'search_startmonth',
'int');
56$search_startday =
GETPOST(
'search_startday',
'int');
57$search_endyear =
GETPOST(
'search_endyear',
'int');
58$search_endmonth =
GETPOST(
'search_endmonth',
'int');
59$search_endday =
GETPOST(
'search_endday',
'int');
60$search_id =
GETPOST(
'search_id',
'alpha');
61$search_fk_user =
GETPOST(
'search_fk_user',
'intcomma');
63if ($search_startyear !=
'') {
64 $search_start =
dol_mktime(0, 0, 0, $search_startmonth, $search_startday, $search_startyear);
67if (
GETPOST(
'search_endyear') !=
'') {
70$search_code =
GETPOST(
'search_code',
'alpha');
71$search_ref =
GETPOST(
'search_ref',
'alpha');
72$search_amount =
GETPOST(
'search_amount',
'alpha');
74if (($search_start == -1 || empty($search_start)) && !GETPOSTISSET(
'search_startmonth') && !GETPOSTISSET(
'begin')) {
77 $search_startday = $tmparray[
'mday'];
78 $search_startmonth = $tmparray[
'mon'];
79 $search_startyear = $tmparray[
'year'];
83$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
84$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
85$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
86$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
87if (empty($page) || $page == -1) {
90$offset = $limit * $page;
94if (empty($sortfield)) {
97if (empty($sortorder)) {
102$block_static->loadTrackedEvents();
107$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME);
108$max_time = @ini_get(
"max_execution_time");
109if ($max_time && $max_time < $max_execution_time_for_importexport) {
110 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.");
111 @ini_set(
"max_execution_time", $max_execution_time_for_importexport);
120if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
122 $search_fk_user =
'';
128 $search_showonlyerrors = 0;
129 $search_startyear =
'';
130 $search_startmonth =
'';
131 $search_startday =
'';
132 $search_endyear =
'';
133 $search_endmonth =
'';
136 $search_array_options = array();
139if ($action ===
'downloadblockchain') {
142 $bc = $auth->getLocalBlockChain();
144 header(
'Content-Type: application/octet-stream');
145 header(
"Content-Transfer-Encoding: Binary");
146 header(
"Content-disposition: attachment; filename=\"".$auth->signature.
".certif\"");
151} elseif (
GETPOST(
'downloadcsv',
'alpha')) {
159 $sql =
"SELECT rowid,date_creation,tms,user_fullname,action,amounts,element,fk_object,date_object,ref_object,signature,fk_user,object_data";
160 $sql .=
" FROM ".MAIN_DB_PREFIX.
"blockedlog";
161 $sql .=
" WHERE entity = ".$conf->entity;
162 if (
GETPOST(
'monthtoexport',
'int') > 0 ||
GETPOST(
'yeartoexport',
'int') > 0) {
165 $sql .=
" AND date_creation BETWEEN '".$db->idate($dates).
"' AND '".$db->idate($datee).
"'";
167 $sql .=
" ORDER BY rowid ASC";
168 $sql .= $db->plimit(1);
170 $res = $db->query($sql);
173 $obj = $db->fetch_object($res);
175 $previoushash = $block_static->getPreviousHash(0, $obj->rowid);
176 $firstid = $obj->rowid;
178 $previoushash =
'nodata';
189 $sql =
"SELECT rowid, date_creation, tms, user_fullname, action, amounts, element, fk_object, date_object, ref_object, signature, fk_user, object_data, object_version";
190 $sql .=
" FROM ".MAIN_DB_PREFIX.
"blockedlog";
191 $sql .=
" WHERE entity = ".((int) $conf->entity);
192 if (
GETPOST(
'monthtoexport',
'int') > 0 ||
GETPOST(
'yeartoexport',
'int') > 0) {
195 $sql .=
" AND date_creation BETWEEN '".$db->idate($dates).
"' AND '".$db->idate($datee).
"'";
197 $sql .=
" ORDER BY rowid ASC";
199 $res = $db->query($sql);
201 header(
'Content-Type: application/octet-stream');
202 header(
"Content-Transfer-Encoding: Binary");
203 header(
"Content-disposition: attachment; filename=\"unalterable-log-archive-".$dolibarr_main_db_name.
"-".(
GETPOST(
'yeartoexport',
'int') > 0 ?
GETPOST(
'yeartoexport',
'int').(
GETPOST(
'monthtoexport',
'int') > 0 ?sprintf(
"%02d",
GETPOST(
'monthtoexport',
'int')) :
'').
'-' :
'').$previoushash.
".csv\"");
205 print $langs->transnoentities(
'Id')
206 .
';'.$langs->transnoentities(
'Date')
207 .
';'.$langs->transnoentities(
'User')
208 .
';'.$langs->transnoentities(
'Action')
209 .
';'.$langs->transnoentities(
'Element')
210 .
';'.$langs->transnoentities(
'Amounts')
211 .
';'.$langs->transnoentities(
'ObjectId')
212 .
';'.$langs->transnoentities(
'Date')
213 .
';'.$langs->transnoentities(
'Ref')
214 .
';'.$langs->transnoentities(
'Fingerprint')
215 .
';'.$langs->transnoentities(
'Status')
216 .
';'.$langs->transnoentities(
'Note')
217 .
';'.$langs->transnoentities(
'Version')
218 .
';'.$langs->transnoentities(
'FullData')
224 while ($obj = $db->fetch_object($res)) {
227 $block_static->id = $obj->rowid;
228 $block_static->date_creation = $db->jdate($obj->date_creation);
229 $block_static->date_modification = $db->jdate($obj->tms);
230 $block_static->action = $obj->action;
231 $block_static->fk_object = $obj->fk_object;
232 $block_static->element = $obj->element;
233 $block_static->amounts = (double) $obj->amounts;
234 $block_static->ref_object = $obj->ref_object;
235 $block_static->date_object = $db->jdate($obj->date_object);
236 $block_static->user_fullname = $obj->user_fullname;
237 $block_static->fk_user = $obj->fk_user;
238 $block_static->signature = $obj->signature;
239 $block_static->object_data = $block_static->dolDecodeBlockedData($obj->object_data);
240 $block_static->object_version = $obj->object_version;
242 $checksignature = $block_static->checkSignature($previoushash);
244 if ($checksignature) {
245 $statusofrecord =
'Valid';
246 if ($loweridinerror > 0) {
247 $statusofrecordnote =
'ValidButFoundAPreviousKO';
249 $statusofrecordnote =
'';
252 $statusofrecord =
'KO';
253 $statusofrecordnote =
'LineCorruptedOrNotMatchingPreviousOne';
254 $loweridinerror = $obj->rowid;
258 $statusofrecordnote = $langs->trans(
"PreviousFingerprint").
': '.$previoushash.($statusofrecordnote ?
' - '.$statusofrecordnote :
'');
261 print
';'.$obj->date_creation;
262 print
';"'.str_replace(
'"',
'""', $obj->user_fullname).
'"';
263 print
';'.$obj->action;
264 print
';'.$obj->element;
265 print
';'.$obj->amounts;
266 print
';'.$obj->fk_object;
267 print
';'.$obj->date_object;
268 print
';"'.str_replace(
'"',
'""', $obj->ref_object).
'"';
269 print
';'.$obj->signature;
270 print
';'.$statusofrecord;
271 print
';'.$statusofrecordnote;
272 print
';'.$obj->object_version;
273 print
';"'.str_replace(
'"',
'""', $obj->object_data).
'"';
277 $previoushash = $obj->signature;
294$form =
new Form($db);
296if (
GETPOST(
'withtab',
'alpha')) {
297 $title = $langs->trans(
"ModuleSetup").
' '.$langs->trans(
'BlockedLog');
299 $title = $langs->trans(
"BrowseBlockedLog");
301$help_url=
"EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
307$blocks = $block_static->getLog(
'all', $search_id, $MAXLINES, $sortfield, $sortorder, $search_fk_user, $search_start, $search_end, $search_ref, $search_amount, $search_code);
308if (!is_array($blocks)) {
310 setEventMessages($langs->trans(
"TooManyRecordToScanRestrictFilters", $MAXLINES),
null,
'errors');
312 dol_print_error($block_static->db, $block_static->error, $block_static->errors);
318if (
GETPOST(
'withtab',
'alpha')) {
319 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
324if (
GETPOST(
'withtab',
'alpha')) {
329print
'<span class="opacitymedium hideonsmartphone">'.$langs->trans(
"FingerprintsDesc").
"<br></span>\n";
334if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
335 $param .=
'&contextpage='.urlencode($contextpage);
337if ($limit > 0 && $limit != $conf->liste_limit) {
338 $param .=
'&limit='.((int) $limit);
340if ($search_id !=
'') {
341 $param .=
'&search_id='.urlencode($search_id);
343if ($search_fk_user > 0) {
344 $param .=
'&search_fk_user='.urlencode($search_fk_user);
346if ($search_startyear > 0) {
347 $param .=
'&search_startyear='.urlencode($search_startyear);
349if ($search_startmonth > 0) {
350 $param .=
'&search_startmonth='.urlencode($search_startmonth);
352if ($search_startday > 0) {
353 $param .=
'&search_startday='.urlencode($search_startday);
355if ($search_endyear > 0) {
356 $param .=
'&search_endyear='.urlencode($search_endyear);
358if ($search_endmonth > 0) {
359 $param .=
'&search_endmonth='.urlencode($search_endmonth);
361if ($search_endday > 0) {
362 $param .=
'&search_endday='.urlencode($search_endday);
364if ($search_showonlyerrors > 0) {
365 $param .=
'&search_showonlyerrors='.urlencode($search_showonlyerrors);
367if ($optioncss !=
'') {
368 $param .=
'&optioncss='.urlencode($optioncss);
370if (
GETPOST(
'withtab',
'alpha')) {
371 $param .=
'&withtab='.urlencode(
GETPOST(
'withtab',
'alpha'));
377print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
378print
'<input type="hidden" name="token" value="'.newToken().
'">';
380print
'<div class="right">';
381print $langs->trans(
"RestrictYearToExport").
': ';
382$smonth =
GETPOST(
'monthtoexport',
'int');
385$retstring .=
'<select class="flat valignmiddle maxwidth75imp marginrightonly" id="monthtoexport" name="monthtoexport">';
386$retstring .=
'<option value="0" selected> </option>';
387for ($month = 1; $month <= 12; $month++) {
388 $retstring .=
'<option value="'.$month.
'"'.($month == $smonth ?
' selected' :
'').
'>';
389 $retstring .=
dol_print_date(mktime(12, 0, 0, $month, 1, 2000),
"%b");
390 $retstring .=
"</option>";
392$retstring .=
"</select>";
394print
'<input type="text" name="yeartoexport" class="valignmiddle maxwidth50imp" value="'.GETPOST(
'yeartoexport',
'int').
'">';
395print
'<input type="hidden" name="withtab" value="'.GETPOST(
'withtab',
'alpha').
'">';
396print
'<input type="submit" name="downloadcsv" class="button" value="'.$langs->trans(
'DownloadLogCSV').
'">';
397if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY)) {
398 print
' | <a href="?action=downloadblockchain'.(GETPOST(
'withtab',
'alpha') ?
'&withtab='.GETPOST(
'withtab',
'alpha') :
'').
'">'.$langs->trans(
'DownloadBlockChain').
'</a>';
404print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
406if ($optioncss !=
'') {
407 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
409print
'<input type="hidden" name="token" value="'.newToken().
'">';
410print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
411print
'<input type="hidden" name="action" value="list">';
412print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
413print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
414print
'<input type="hidden" name="page" value="'.$page.
'">';
415print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
416print
'<input type="hidden" name="withtab" value="'.GETPOST(
'withtab',
'alpha').
'">';
418print
'<div class="div-table-responsive">';
419print
'<table class="noborder centpercent">';
422print
'<tr class="liste_titre_filter">';
426 print
'<td class="liste_titre center">';
427 $searchpicto = $form->showFilterButtons();
432print
'<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="'.dol_escape_htmltag($search_id).
'"></td>';
434print
'<td class="liste_titre">';
436print $form->selectDate($search_start,
'search_start');
439print $form->selectDate($search_end,
'search_end');
443print
'<td class="liste_titre">';
444print $form->select_dolusers($search_fk_user,
'search_fk_user', 1,
null, 0,
'',
'', 0, 0, 0,
'', 0,
'',
'maxwidth200');
449print
'<td class="liste_titre">';
450print $form->selectarray(
'search_code', $block_static->trackedevents, $search_code, 1, 0, 0,
'', 1, 0, 0,
'ASC',
'maxwidth200', 1);
454print
'<td class="liste_titre"><input type="text" class="maxwidth50" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
457print
'<td class="liste_titre"></td>';
460print
'<td class="liste_titre right"><input type="text" class="maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'"></td>';
463print
'<td class="liste_titre"></td>';
466print
'<td class="liste_titre"></td>';
469print
'<td class="liste_titre">';
470$array = array(
"1" =>
"OnlyNonValid");
471print $form->selectarray(
'search_showonlyerrors', $array, $search_showonlyerrors, 1, 0, 0,
'', 1, 0, 0,
'ASC',
'search_status maxwidth200 onrightofpage', 1);
475print
'<td class="liste_titre"></td>';
479 print
'<td class="liste_titre center">';
480 $searchpicto = $form->showFilterButtons();
487print
'<tr class="liste_titre">';
490 print
getTitleFieldOfList(
'<span id="blockchainstatus"></span>', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'class="center"', $sortfield, $sortorder,
'').
"\n";
492print
getTitleFieldOfList($langs->trans(
'#'), 0, $_SERVER[
"PHP_SELF"],
'rowid',
'', $param,
'', $sortfield, $sortorder,
'minwidth50 ').
"\n";
493print
getTitleFieldOfList($langs->trans(
'Date'), 0, $_SERVER[
"PHP_SELF"],
'date_creation',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
494print
getTitleFieldOfList($langs->trans(
'Author'), 0, $_SERVER[
"PHP_SELF"],
'user_fullname',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
495print
getTitleFieldOfList($langs->trans(
'Action'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
496print
getTitleFieldOfList($langs->trans(
'Ref'), 0, $_SERVER[
"PHP_SELF"],
'ref_object',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
497print
getTitleFieldOfList(
'', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
498print
getTitleFieldOfList($langs->trans(
'Amount'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'right ').
"\n";
499print
getTitleFieldOfList($langs->trans(
'DataOfArchivedEvent'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ').
"\n";
500print
getTitleFieldOfList($langs->trans(
'Fingerprint'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'').
"\n";
501print
getTitleFieldOfList($langs->trans(
'Status'), 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ').
"\n";
502print
getTitleFieldOfList(
'', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ').
"\n";
505 print
getTitleFieldOfList(
'<span id="blockchainstatus"></span>', 0, $_SERVER[
"PHP_SELF"],
'',
'', $param,
'class="center"', $sortfield, $sortorder,
'').
"\n";
509if (!empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) {
517 $checkresult = array();
518 $checkdetail = array();
519 if (is_array($blocks)) {
520 foreach ($blocks as &$block) {
521 $tmpcheckresult = $block->checkSignature(
'', 1);
523 $checksignature = $tmpcheckresult[
'checkresult'];
525 $checkresult[$block->id] = $checksignature;
526 $checkdetail[$block->id] = $tmpcheckresult;
528 if (!$checksignature) {
529 if (empty($loweridinerror)) {
530 $loweridinerror = $block->id;
532 $loweridinerror = min($loweridinerror, $block->id);
539if (is_array($blocks)) {
541 $MAXFORSHOWLINK = 100;
544 foreach ($blocks as &$block) {
546 if (empty($search_showonlyerrors) || !$checkresult[$block->id]) {
549 if ($nbshown < $MAXFORSHOWLINK) {
550 $object_link = $block->getObjectLink();
552 $object_link = $block->element.
'/'.$block->fk_object;
555 print
'<tr class="oddeven">';
559 print
'<td class="liste_titre">';
564 print
'<td>'.dol_escape_htmltag($block->id).
'</td>';
567 print
'<td class="nowraponall">'.dol_print_date($block->date_creation,
'dayhour').
'</td>';
576 print
'<td class="tdoverflowmax250" title="'.dol_escape_htmltag($langs->trans(
'log'.$block->action)).
'">'.$langs->trans(
'log'.$block->action).
'</td>';
579 print
'<td class="nowraponall">';
580 print $block->ref_object;
584 print
'<td class="tdoverflowmax150"'.(preg_match(
'/<a/', $object_link) ?
'' :
'title="'.dol_escape_htmltag(
dol_string_nohtmltag($object_link)).
'"').
'>';
585 print
'<!-- object_link -->';
590 print
'<td class="right nowraponall">'.price($block->amounts).
'</td>';
593 print
'<td class="center"><a href="#" data-blockid="'.$block->id.
'" rel="show-info">'.
img_info($langs->trans(
'ShowDetails')).
'</a></td>';
596 print
'<td class="nowrap">';
597 $texttoshow = $langs->trans(
"Fingerprint").
' - '.$langs->trans(
"Saved").
':<br>'.$block->signature;
598 $texttoshow .=
'<br><br>'.$langs->trans(
"Fingerprint").
' - Recalculated sha256(previoushash * data):<br>'.$checkdetail[$block->id][
'calculatedsignature'];
599 $texttoshow .=
'<br><span class="opacitymedium">'.$langs->trans(
"PreviousHash").
'='.$checkdetail[$block->id][
'previoushash'].
'</span>';
601 print $form->textwithpicto(
dol_trunc($block->signature,
'8'), $texttoshow, 1,
'help',
'', 0, 2,
'fingerprint'.$block->id);
605 print
'<td class="center">';
606 if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) {
607 if ($checkresult[$block->id]) {
608 print
'<span class="badge badge-status4 badge-status" title="'.$langs->trans(
'OkCheckFingerprintValidityButChainIsKo').
'">OK</span>';
610 print
'<span class="badge badge-status8 badge-status" title="'.$langs->trans(
'KoCheckFingerprintValidity').
'">KO</span>';
613 print
'<span class="badge badge-status4 badge-status" title="'.$langs->trans(
'OkCheckFingerprintValidity').
'">OK</span>';
618 print
'<td class="center">';
619 if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) {
620 if ($checkresult[$block->id]) {
621 print $form->textwithpicto(
'', $langs->trans(
'OkCheckFingerprintValidityButChainIsKo'));
625 if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
626 print
' '.($block->certified ?
img_picto($langs->trans(
'AddedByAuthority'),
'info') :
img_picto($langs->trans(
'NotAddedByAuthorityYet'),
'info_black'));
632 print
'<td class="liste_titre">';
641 print
'<tr><td colspan="12"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
652print
'<script type="text/javascript">
654jQuery(document).ready(function () {
655 jQuery("#dialogforpopup").dialog(
656 { closeOnEscape: true, classes: { "ui-dialog": "highlight" },
657 maxHeight: window.innerHeight-60, height: window.innerHeight-60, width: '.($conf->browser->layout ==
'phone' ? 400 : 700).
',
659 autoOpen: false }).css("z-index: 5000");
661 $("a[rel=show-info]").click(function() {
663 console.log("We click on tooltip, we open popup and get content using an ajax call");
665 var fk_block = $(this).attr("data-blockid");
670 url:
"'.DOL_URL_ROOT.'/blockedlog/ajax/block-info.php?id="+fk_block,
672 }).done(
function(data) {
673 jQuery(
"#dialogforpopup").html(data);
676 jQuery(
"#dialogforpopup").dialog(
"open");
682if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
684 <script type="text/javascript">
689 url: '<?php echo DOL_URL_ROOT.
'/blockedlog/ajax/check_signature.php' ?>
',
691 }).done(function(data) {
692 if(data == 'hashisok
') {
693 $('#blockchainstatus
').html('<?php echo $langs->trans(
'AuthorityReconizeFingerprintConformity').
' '.
img_picto($langs->trans(
'SignatureOK'),
'on') ?>
');
696 $('#blockchainstatus
').html('<?php echo $langs->trans(
'AuthorityDidntReconizeFingerprintConformity').
' '.
img_picto($langs->trans(
'SignatureKO'),
'off') ?>
');
705if (GETPOST('withtab
', 'alpha
')) {
706 print dol_get_fiche_end();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
blockedlogadmin_prepare_head()
Define head array for tabs of blockedlog tools setup pages.
Class to manage certif authority.
Class to manage Blocked Log.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
currentToken()
Return the value of token currently saved into session with name 'token'.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
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.
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 dolibarr global constant string value.
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.
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...
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.