From c22f75944fb0fd87d310de25a5756f7117291337 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Mon, 23 Feb 2026 02:59:30 +0000 Subject: [PATCH] a --- Contestation/Demandereconnaissancefaciale.php | 29 +++++++++++++++++++ Contestation/verify_facial_api.php | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Contestation/Demandereconnaissancefaciale.php b/Contestation/Demandereconnaissancefaciale.php index 2e6d4f9..47b5e0a 100755 --- a/Contestation/Demandereconnaissancefaciale.php +++ b/Contestation/Demandereconnaissancefaciale.php @@ -567,6 +567,7 @@ validateToken(); }; + /* function validateToken() { fetch('verify_facial_api.php', { method: 'POST', @@ -592,6 +593,34 @@ showError('KANE : Erreur de connexion au serveur'); }); } + */ + + function validateToken() { + $.ajax({ + url: 'verify_facial_api.php', + method: 'POST', + contentType: 'application/json', + data: JSON.stringify({ + action: 'validate_token', + token: verificationToken + }), + dataType: 'json', + success: function(data) { + alert("succes => " + data); + console.log('Réponse JSON :', data); + if (data.success) { + showStep('step-instructions'); + } else { + showError(data.message || 'Lien expiré ou invalide'); + } + }, + error: function() { + alert("Error => " + data); + showError('KANE : Erreur de connexion au serveur'); + } + }); + } + function showStep(stepId) { document.querySelectorAll('.step').forEach(step => { diff --git a/Contestation/verify_facial_api.php b/Contestation/verify_facial_api.php index 852f7d3..ffe27f8 100644 --- a/Contestation/verify_facial_api.php +++ b/Contestation/verify_facial_api.php @@ -1,4 +1,4 @@ -