29if (!defined(
'NOTOKENRENEWAL')) {
30 define(
'NOTOKENRENEWAL', 1);
32if (!defined(
'NOREQUIREMENU')) {
33 define(
'NOREQUIREMENU',
'1');
35if (!defined(
'NOREQUIREHTML')) {
36 define(
'NOREQUIREHTML',
'1');
41require
'../../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/authority.class.php';
47if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
48 exit(
'BLOCKEDLOG_AUTHORITY_URL not set');
59$auth->syncSignatureWithAuthority();
63$blocks = $block_static->getLog(
'just_certified', 0, 0,
'rowid',
'ASC');
65$auth->signature = $block_static->getSignature();
67if (is_array($bocks)) {
68 foreach ($blocks as &$b) {
69 $auth->blockchain .= $b->signature;
73$hash = $auth->getBlockchainHash();
76$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.
'/blockedlog/ajax/authority.php?s='.urlencode($auth->signature).
'&h='.urlencode($hash);
78$resarray =
getURLContent($url,
'GET',
'', 1, array(), array(), 2);
79$res = $resarray[
'content'];
Class to manage certif authority.
Class to manage Blocked Log.
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...
getURLContent($url, $postorget='GET', $param='', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0, $ssl_verifypeer=-1)
Function to get a content from an URL (use proxy if proxy defined).
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.