Files
ESBSC-CONVOC/templates/audit.php
2026-11-11 09:24:28 +01:00

1 line
736 B
PHP

<section class="card"><h2>Les 200 dernières opérations</h2><div class="table-wrap"><table><thead><tr><th>Date / auteur</th><th>Action</th><th>Objet</th><th>Justification / détail</th></tr></thead><tbody><?php foreach($logs as $l): ?><tr><td><?=e($l['created_at'])?><small><?=e($l['actor_name']??'Console / planification')?></small></td><td><?=e($l['action'])?></td><td><?=e($l['entity'])?> #<?=$l['entity_id']?></td><td><?=e($l['reason'])?><details><summary>Avant / après</summary><pre><?=e(json_encode(['avant'=>json_decode($l['before_json']??'null',true),'après'=>json_decode($l['after_json']??'null',true)],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE))?></pre></details></td></tr><?php endforeach ?></tbody></table></div></section>