This commit is contained in:
KANE LAZENI 2026-05-13 16:53:19 +00:00
parent 5a889cec40
commit 6b91745e1f
2 changed files with 19 additions and 6 deletions

View File

@ -867,7 +867,6 @@
}), }),
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(data);
if (data.success && data.match) { if (data.success && data.match) {
showSuccess(data); showSuccess(data);
} else { } else {
@ -875,8 +874,7 @@
} }
}, },
error: function(xhr, status, error) { error: function(xhr, status, error) {
console.log(error); showError('Erreur lors de la vérification : ' + error);
showError('Erreur lors de la vérification AJAX: ' + error);
} }
}); });
} }
@ -930,6 +928,7 @@
} }
} }
/*
function startCountdown(seconds, callback) { function startCountdown(seconds, callback) {
let remaining = seconds; let remaining = seconds;
const countdownEl = document.getElementById('countdown'); const countdownEl = document.getElementById('countdown');
@ -951,6 +950,23 @@
window.onbeforeunload = function() { window.onbeforeunload = function() {
stopCamera(); stopCamera();
}; };
*/
function startCountdown(seconds, callback) {
let remaining = seconds;
const countdownEl = document.getElementById('countdown');
const interval = setInterval(() => {
countdownEl.textContent = `Redirection dans ${remaining} secondes...`;
remaining--;
if (remaining < 0) {
clearInterval(interval);
callback();
}
}, 1000);
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -22,9 +22,6 @@ class FacialVerificationAPI {
: 3; : 3;
} }
/**
* Valide un token de vérification
*/
public function validateToken($token) { public function validateToken($token) {
$_SESSION['lienPhoto'] = ""; $_SESSION['lienPhoto'] = "";
try { try {