28 lines
511 B
PHP
28 lines
511 B
PHP
|
<?php session_start();
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/* [1] Gestion de l'enregistrement
|
||
|
=========================================================*/
|
||
|
if( isset($_POST['code']) && isset($_POST['action']) ){
|
||
|
|
||
|
array_push($_SESSION['history'],[
|
||
|
json_decode( $_POST['code'], true ),
|
||
|
json_decode( $_POST['action'], true )
|
||
|
]);
|
||
|
|
||
|
$data = '';
|
||
|
|
||
|
foreach($_SESSION['history'] as $h=>$entry)
|
||
|
$data .= "<span>".$entry[0]." - ".$entry[1]."</span><br>";
|
||
|
|
||
|
|
||
|
echo json_encode( [
|
||
|
'ModuleError' => 0,
|
||
|
'data' => $data
|
||
|
] );
|
||
|
|
||
|
}
|
||
|
?>
|