<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: registration.inc.php,v 1.5 2025/06/25 10:19:54 jparis Exp $

if (stristr($_SERVER['REQUEST_URI'], ".inc.php"))
    die("no access");
    
use Pmb\Animations\Controller\RegistrationController;

global $action, $data, $numAnimation;

$data = encoding_normalize::json_decode(encoding_normalize::utf8_normalize(stripslashes($data)));

$numAnimation = intval($numAnimation ?? 0);
if (!empty($numAnimation)) {
    $data->numAnimation = $numAnimation;
}

$registrationController = new RegistrationController($data);
$result = $registrationController->proceed($action);
ajax_http_send_response(encoding_normalize::utf8_normalize($result));