* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/blockedlog/admin/blockedlog.php * \ingroup system * \brief Page setup for blockedlog module */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); $langs->load("other"); $langs->load("blockedlog"); if (! $user->admin) accessforbidden(); $action = GETPOST('action','alpha'); if($action === 'downloadblockchain') { $auth = new BlockedLogAuthority($db); $bc = $auth->getLocalBlockChain(); header('Content-Type: application/octet-stream'); header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename=\"" .$auth->signature. ".certif\""); echo $bc; exit; } /* * View */ $block_static = new BlockedLog($db); $blocks = $block_static->getLog('all', 0, GETPOST('all') ? 0 : 50); $form=new Form($db); llxHeader('',$langs->trans("BlockedLogSetup")); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ModuleSetup").' BlockedLog',$linkback); $head=blockedlogadmin_prepare_head(); dol_fiche_head($head, 'fingerprints', '', -1); print $langs->trans("FingerprintsDesc")."
\n"; print '
'; echo '
'.$langs->trans('ShowAllFingerPrintsMightBeTooLong').' | '.$langs->trans('DownloadBlockChain').'
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; foreach($blocks as &$block) { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; } print '
'.$langs->trans('Date').''.$langs->trans('Ref').''.$langs->trans('Action').''.$langs->trans('Element').''.$langs->trans('Amount').''.$langs->trans('Author').''.$langs->trans('Fingerprint').'
'.dol_print_date($block->tms,'dayhour').''.$block->ref_object.''.$langs->trans('log'.$block->action).''.$block->getObject().''.img_info($langs->trans('ShowDetails')).''.price($block->amounts).''.$block->getUser().''.$block->signature.''; print $block->checkSignature() ? img_picto($langs->trans('OkCheckFingerprintValidity'), 'on') : img_picto($langs->trans('KoCheckFingerprintValidity'), 'off'); if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { print ' '.($block->certified ? img_picto($langs->trans('AddedByAuthority'), 'info') : img_picto($langs->trans('NotAddedByAuthorityYet'), 'info_black') ); } print '
'; ?> global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { ?>
'; llxFooter(); $db->close();