This commit is contained in:
KANE LAZENI 2026-02-22 11:55:31 +00:00
parent 4a4e90fa03
commit dd8c27dcc8
3 changed files with 631 additions and 311 deletions

View File

@ -81,14 +81,15 @@ class Assure extends Modelecontestation {
} }
public function checkdemandereconnaissancefaciale() public function checkdemandereconnaissancefaciale_id()
{ {
$codeSociete = $_SESSION['codeBdd']; $codeSociete = $_SESSION['codeBdd'];
$codePrestataire = $_SESSION['codePrestataire']; $codePrestataire = $_SESSION['codePrestataire'];
$idBeneficiaire = $_SESSION['idBeneficiaire']; $idBeneficiaire = $_SESSION['idBeneficiaire'];
$idDemande = $_SESSION['idDemande'];
$sql = 'call sp_p_checkdemandereconnaissancefaciale(?, ?, ?);'; $sql = 'call sp_p_checkdemandereconnaissancefaciale_id(?, ?, ?, ?);';
$resultat = $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire)); $resultat = $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $idDemande));
$ligne = $resultat->fetch(PDO::FETCH_ASSOC); $ligne = $resultat->fetch(PDO::FETCH_ASSOC);
return $ligne; return $ligne;
} }

View File

@ -2,6 +2,113 @@
session_start(); session_start();
session_unset(); session_unset();
if (!isset($_GET['lg'])) {
afficherMessage("Paramètre langue absent de la requête!");
}
$lg = $_GET['lg'];
$codeLangue = base64_decode($lg);
$tab_code_langue = ["fr_FR", "en_US"];
if (!in_array($codeLangue, $tab_code_langue)) {
afficherMessage("Langue inconnue!");
}
if (!isset($_GET['codeEntite'])) {
$msg = $codeLangue == 'en_US' ? "Entity parameter missing from query!" : "Paramètre entité absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['codePrestataire'])) {
$msg = $codeLangue == 'en_US' ? "Provider parameter missing from query!" : "Paramètre prestataire absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['idBeneficiaire'])) {
$msg = $codeLangue == 'en_US' ? "Insured ID missing from query!" : "ID assuré absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['idDemande'])) {
$msg = $codeLangue == 'en_US' ? "Reqest ID missing from query!" : "ID demande absent de la requête!";
afficherMessage($msg);
}
$_SESSION['codeLangue'] = $lg;
$_SESSION['codeEntite'] = base64_decode($_GET['codeEntite']);
$_SESSION['codePrestataire'] = base64_decode($_GET['codePrestataire']);
$_SESSION['idBeneficiaire'] = base64_decode($_GET['idBeneficiaire']);
$_SESSION['idDemande'] = base64_decode($_GET['idDemande']);
$codeSociete = $_SESSION['codeEntite'];
$idBeneficiaire = $_SESSION['idBeneficiaire'];
$idDemande = $_SESSION['idDemande'];
$codePrestataire = $_SESSION['codePrestataire'];
$codeBdd = $codeSociete;
require_once "Assure.php";
$assure = new Assure();
$_SESSION['codeBdd'] = $codeBdd;
$bdd = $assure->geUneBd($codeBdd);
/*
var_dump(
array(
// "bdd" => $bdd,
"codeSociete" => $codeSociete,
"codePrestataire" => $codePrestataire,
"idBeneficiaire" => $idBeneficiaire,
)
);
*/
if(!$bdd) {
$message = $codeLangue == 'en_US' ? "Entity not found!" : "Entité introuvable!";
afficherMessage("<strong>$message</strong>");
}
$_SESSION['BdName'] = $bdd['BdName'];
$_SESSION['BdLogin'] = $bdd['BdLogin'];
$_SESSION['BdMdp'] = $bdd['BdMdp'];
if($assure->existeligne($codeSociete)) {
$fassureExiste = $assure->assureExiste($codeSociete, $idBeneficiaire);
if(!$fassureExiste) {
$message = $codeLangue == 'en_US' ? "Insured not found!" : "Assuré introuvable!";
afficherMessage("<strong>$message</strong>");
}
$demandereconnaissancefaciale = $assure->checkdemandereconnaissancefaciale();
var_dump($demandereconnaissancefaciale);
/*
if(!$feuilleMaladieEncours) {
$message = $codeLangue == 'en_US' ? "Deadline for appeal has passed!" : "Delai de contestation dépassé!";
afficherMessage("<strong>$message</strong>");
}
$feuilleDejaContestee = $validercontestation->feuilleContestee($codeSociete, $idAdherent, $numeroFeuilleMaladie);
if($feuilleDejaContestee) {
$message = $codeLangue == 'en_US' ? "File already contested!" : "Dossier déjà contesté!";
afficherMessage("<strong>$message</strong>");
}
$validercontestation->contester($codeSociete, $idAdherent, $numeroFeuilleMaladie, $motifContestation);
*/
$message = $codeLangue == 'en_US'
? "Parameters successfully verified!"
: "Paramètres vérifiés avec succès!";
afficherMessage("<strong>$message</strong>", false);
}
function afficherMessage($message) { function afficherMessage($message) {
echo "<!DOCTYPE html> echo "<!DOCTYPE html>
<html lang='fr'> <html lang='fr'>
@ -45,317 +152,522 @@
exit(); exit();
} }
if (!isset($_GET['lg'])) {
afficherMessage("Paramètre langue absent de la requête!");
}
$lg = $_GET['lg'];
$codeLangue = base64_decode($lg);
$tab_code_langue = ["fr_FR", "en_US"];
if (!in_array($codeLangue, $tab_code_langue)) {
afficherMessage("Langue inconnue!");
}
if (!isset($_GET['codeEntite'])) {
$msg = $codeLangue == 'en_US' ? "Entity parameter missing from query!" : "Paramètre entité absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['idAdherent'])) {
$msg = $codeLangue == 'en_US' ? "Family parameter missing from query!" : "Paramètre famille absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['dossier'])) {
$msg = $codeLangue == 'en_US' ? "Entity dossier missing from query!" : "Paramètre dossier absent de la requête!";
afficherMessage($msg);
}
$_SESSION['codeLangue'] = $lg;
$_SESSION['codeEntite'] = $_GET['codeEntite'];
$_SESSION['idAdherent'] = $_GET['idAdherent'];
$_SESSION['dossier'] = $_GET['dossier'];
$codeEntite = $_GET['codeEntite'];
$idAdherent = $_GET['idAdherent'];
$dossier = $_GET['dossier'];
$title = $codeLangue == 'en_US' ? "Contest a medical record" : "Contester un dossier médical";
$label = $codeLangue == 'en_US' ? "Submit" : "Soumettre";
$labelMotifContestation = $codeLangue == 'en_US' ? "Reason for the contestation:" : "Motif de la contestation:";
$placeholder = $codeLangue == 'en_US' ? "Please describe in detail the reason for your contestation..." : "Veuillez décrire en détail le motif de votre contestation...";
$action = "/Contestation/Validercontestation.php?" .
"codeEntite=" . urlencode($codeEntite) .
"&idAdherent=" . urlencode($idAdherent) .
"&dossier=" . urlencode($dossier) .
"&lg=" . urlencode($lg);
?> ?>
<!doctype html> <!DOCTYPE html>
<html lang="<?= $codeLangue == 'en_US' ? 'en' : 'fr' ?>"> <html lang="fr">
<head> <head>
<meta charset="utf-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars($title) ?></title> <title>INTER-SANTÉ - Vérification d'identité</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <style>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet"> * {
<link rel="icon" href="/Contestation/favicon.ico"/> margin: 0;
<style> padding: 0;
.contestation-container { box-sizing: border-box;
min-height: 100vh; }
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
}
.contestation-card { body {
background: white; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
border-radius: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); min-height: 100vh;
overflow: hidden; display: flex;
max-width: 700px; align-items: center;
margin: 40px auto; justify-content: center;
} padding: 20px;
}
.contestation-header { .container {
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%); background: white;
color: white; border-radius: 20px;
padding: 2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
text-align: center; max-width: 600px;
position: relative; width: 100%;
} overflow: hidden;
}
.contestation-header::before { .header {
content: ''; background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
position: absolute; color: white;
top: 0; padding: 30px;
left: 0; text-align: center;
right: 0; }
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
background-size: cover;
}
.contestation-header h1 { .header h1 {
font-weight: 600; font-size: 28px;
margin: 0; margin-bottom: 10px;
font-size: 1.8rem; }
position: relative;
z-index: 1;
}
.contestation-body { .header p {
padding: 2.5rem; opacity: 0.9;
} }
.form-label { .content {
font-weight: 600; padding: 40px 30px;
color: #333; }
margin-bottom: 1rem;
font-size: 1.1rem;
}
.required::after { .step {
content: " *"; display: none;
color: #dc3545; }
}
.form-control { .step.active {
border: 2px solid #e9ecef; display: block;
border-radius: 10px; }
padding: 1rem;
font-size: 1rem;
transition: all 0.3s ease;
}
.form-control:focus { .video-container {
border-color: #4caf50; position: relative;
box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25); background: #000;
} border-radius: 15px;
overflow: hidden;
margin: 20px 0;
}
.btn-submit { #video, #canvas {
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%); width: 100%;
color: white; display: block;
border: none; border-radius: 15px;
border-radius: 10px; }
padding: 1rem 2rem;
font-size: 1.1rem;
font-weight: 600;
transition: all 0.3s ease;
width: 100%;
margin-top: 1rem;
}
.btn-submit:hover { #canvas {
transform: translateY(-2px); display: none;
box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3); }
}
.character-count { .face-overlay {
text-align: right; position: absolute;
font-size: 0.875rem; top: 50%;
color: #6c757d; left: 50%;
margin-top: 0.5rem; transform: translate(-50%, -50%);
} width: 250px;
height: 300px;
border: 3px dashed rgba(255, 255, 255, 0.7);
border-radius: 50%;
pointer-events: none;
}
.info-section { .instructions {
background: #f8f9fa; background: #f8f9fa;
border-radius: 10px; padding: 20px;
padding: 1.5rem; border-radius: 10px;
margin-bottom: 2rem; margin: 20px 0;
border-left: 4px solid #4caf50; }
display: none;
}
.info-item { .instructions h3 {
display: flex; color: #2c3e50;
align-items: center; margin-bottom: 15px;
margin-bottom: 0.5rem; display: flex;
} align-items: center;
}
.info-item:last-child { .instructions h3::before {
margin-bottom: 0; content: "";
} margin-right: 10px;
}
.info-item i { .instructions ul {
color: #4caf50; list-style: none;
margin-right: 0.75rem; padding-left: 0;
font-size: 1.1rem; }
}
/* Responsive adjustments */ .instructions li {
@media (max-width: 768px) { padding: 8px 0;
.contestation-container { padding-left: 25px;
padding: 15px; position: relative;
} }
.contestation-card { .instructions li::before {
margin: 20px auto; content: "";
} position: absolute;
left: 0;
color: #27ae60;
font-weight: bold;
}
.contestation-header { .button {
padding: 1.5rem; background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
} color: white;
border: none;
padding: 15px 30px;
font-size: 16px;
border-radius: 10px;
cursor: pointer;
width: 100%;
margin: 10px 0;
transition: transform 0.2s, box-shadow 0.2s;
font-weight: 600;
}
.contestation-header h1 { .button:hover {
font-size: 1.5rem; transform: translateY(-2px);
} box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}
.contestation-body { .button:disabled {
padding: 1.5rem; opacity: 0.5;
} cursor: not-allowed;
} transform: none;
}
@media (max-width: 576px) { .button.capture {
.contestation-container { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
padding: 10px; }
}
.contestation-header { .button.retry {
padding: 1.25rem; background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
} }
.contestation-header h1 { .status {
font-size: 1.3rem; padding: 15px;
} border-radius: 10px;
margin: 20px 0;
text-align: center;
font-weight: 500;
}
.contestation-body { .status.info {
padding: 1.25rem; background: #d1ecf1;
} color: #0c5460;
border: 1px solid #bee5eb;
}
.info-section { .status.success {
padding: 1rem; background: #d4edda;
} color: #155724;
} border: 1px solid #c3e6cb;
</style> }
.status.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.status.warning {
background: #fff3cd;
color: #856404;
border: 1px solid #ffeeba;
}
.loader {
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
margin: 20px auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.preview-image {
max-width: 100%;
border-radius: 15px;
margin: 20px 0;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.match-result {
text-align: center;
padding: 30px;
}
.match-result .icon {
font-size: 80px;
margin-bottom: 20px;
}
.match-result h2 {
color: #2c3e50;
margin-bottom: 15px;
}
.countdown {
font-size: 14px;
color: #7f8c8d;
text-align: center;
margin-top: 20px;
}
</style>
</head> </head>
<body> <body>
<div class="contestation-container"> <div class="container">
<div class="contestation-card"> <div class="header">
<div class="contestation-header"> <h1>🏥 INTER-SANTÉ</h1>
<h1> <p>Vérification d'identité sécurisée</p>
<i class="bi bi-clipboard-x me-2"></i> </div>
<?= htmlspecialchars($title) ?>
</h1>
</div>
<div class="contestation-body"> <div class="content">
<!-- Information Section --> <!-- Étape 1: Chargement -->
<div class="info-section"> <div id="step-loading" class="step active">
<div class="info-item"> <div class="loader"></div>
<i class="bi bi-info-circle"></i> <p style="text-align: center; color: #7f8c8d;">Vérification du lien...</p>
<strong><?= $codeLangue == 'en_US' ? 'Information:' : 'Information :' ?></strong> </div>
</div>
<div class="info-item">
<i class="bi bi-building"></i>
<span><?= $codeLangue == 'en_US' ? 'Entity:' : 'Entité :' ?> <?= htmlspecialchars($codeEntite) ?></span>
</div>
<div class="info-item">
<i class="bi bi-person"></i>
<span><?= $codeLangue == 'en_US' ? 'Family ID:' : 'ID Famille :' ?> <?= htmlspecialchars($idAdherent) ?></span>
</div>
<div class="info-item">
<i class="bi bi-folder"></i>
<span><?= $codeLangue == 'en_US' ? 'Record:' : 'Dossier :' ?> <?= htmlspecialchars($dossier) ?></span>
</div>
</div>
<!-- Contestation Form --> <!-- Étape 2: Instructions -->
<form action="<?= $action ?>" method="post"> <div id="step-instructions" class="step">
<div class="mb-4"> <div class="instructions">
<label for="motifContestation" class="form-label required"> <h3>Instructions pour la vérification</h3>
<?= htmlspecialchars($labelMotifContestation) ?> <ul>
</label> <li>Positionnez votre visage dans l'ovale</li>
<textarea <li>Assurez-vous d'être dans un endroit bien éclairé</li>
id="motifContestation" <li>Regardez directement la caméra</li>
name="motifContestation" <li>Restez immobile lors de la capture</li>
class="form-control border border-success" <li>Retirez lunettes de soleil, casquette ou masque</li>
rows="8" </ul>
required </div>
placeholder="<?= htmlspecialchars($placeholder) ?>" <button class="button" onclick="startCamera()">📸 Démarrer la caméra</button>
maxlength="1000" </div>
oninput="updateCharacterCount(this)"></textarea>
<div class="character-count">
<span id="charCount">0</span>/1000 <?= $codeLangue == 'en_US' ? 'characters' : 'caractères' ?>
</div>
</div>
<button type="submit" class="btn-submit"> <!-- Étape 3: Capture -->
<i class="bi bi-send-check me-2"></i> <div id="step-capture" class="step">
<?= htmlspecialchars($label) ?> <div class="video-container">
</button> <video id="video" autoplay playsinline></video>
</form> <canvas id="canvas"></canvas>
</div> <div class="face-overlay"></div>
</div> </div>
</div> <div id="camera-status" class="status info">
Positionnez votre visage dans l'ovale
</div>
<button class="button capture" onclick="capturePhoto()">📷 Prendre la photo</button>
</div>
<script> <!-- Étape 4: Confirmation -->
function updateCharacterCount(textarea) { <div id="step-confirm" class="step">
const charCount = textarea.value.length; <h3 style="color: #2c3e50; margin-bottom: 15px;">Confirmez votre photo</h3>
document.getElementById('charCount').textContent = charCount; <img id="preview" class="preview-image" alt="Votre photo">
<button class="button" onclick="verifyPhoto()"> Confirmer et vérifier</button>
<button class="button retry" onclick="retakePhoto()"> Reprendre la photo</button>
</div>
// Change color when approaching limit <!-- Étape 5: Vérification en cours -->
const charCountElement = document.getElementById('charCount'); <div id="step-verifying" class="step">
if (charCount > 900) { <div class="loader"></div>
charCountElement.style.color = '#dc3545'; <p style="text-align: center; color: #7f8c8d; margin-top: 20px;">
charCountElement.style.fontWeight = 'bold'; Vérification de votre identité en cours...<br>
} else if (charCount > 750) { <small>Merci de patienter</small>
charCountElement.style.color = '#ffc107'; </p>
charCountElement.style.fontWeight = 'bold'; </div>
} else {
charCountElement.style.color = '#6c757d';
charCountElement.style.fontWeight = 'normal';
}
}
// Initialize character count on page load <!-- Étape 6: Résultat -->
document.addEventListener('DOMContentLoaded', function() { <div id="step-result" class="step">
const textarea = document.getElementById('motifContestation'); <div class="match-result">
updateCharacterCount(textarea); <div class="icon" id="result-icon"></div>
}); <h2 id="result-title"></h2>
</script> <p id="result-message"></p>
</div>
<div id="countdown" class="countdown"></div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <!-- Étape 7: Erreur -->
<div id="step-error" class="step">
<div class="status error">
<h3> Erreur</h3>
<p id="error-message"></p>
</div>
</div>
</div>
</div>
<script>
let video = document.getElementById('video');
let canvas = document.getElementById('canvas');
let context = canvas.getContext('2d');
let stream = null;
let verificationToken = null;
let capturedImage = null;
// Récupérer le token depuis l'URL
const urlParams = new URLSearchParams(window.location.search);
// alert(urlParams);
// verificationToken = urlParams.get('token');
codeEntite = urlParams.get('codeEntite');
idBeneficiaire = urlParams.get('idBeneficiaire');
alert("codeEntite="+codeEntite+" ; idBeneficiaire="+idBeneficiaire);
// Initialisation
window.onload = function() {
if (!verificationToken) {
showError('Lien de vérification invalide');
return;
}
// Vérifier la validité du token
validateToken();
};
function validateToken() {
fetch('verify_facial_api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'validate_token',
token: verificationToken
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
showStep('step-instructions');
} else {
showError(data.message || 'Lien expiré ou invalide');
}
})
.catch(error => {
showError('Erreur de connexion au serveur');
});
}
function showStep(stepId) {
document.querySelectorAll('.step').forEach(step => {
step.classList.remove('active');
});
document.getElementById(stepId).classList.add('active');
}
function showError(message) {
document.getElementById('error-message').textContent = message;
showStep('step-error');
}
async function startCamera() {
try {
stream = await navigator.mediaDevices.getUserMedia({
video: {
facingMode: 'user',
width: { ideal: 1280 },
height: { ideal: 720 }
}
});
video.srcObject = stream;
showStep('step-capture');
} catch (error) {
console.error('Erreur caméra:', error);
showError('Impossible d\'accéder à la caméra. Veuillez autoriser l\'accès.');
}
}
function capturePhoto() {
// Configurer le canvas
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
// Capturer l'image
context.drawImage(video, 0, 0, canvas.width, canvas.height);
// Convertir en base64
capturedImage = canvas.toDataURL('image/jpeg', 0.9);
// Afficher l'aperçu
document.getElementById('preview').src = capturedImage;
// Arrêter la caméra
stopCamera();
// Passer à l'étape de confirmation
showStep('step-confirm');
}
function retakePhoto() {
capturedImage = null;
startCamera();
}
function stopCamera() {
if (stream) {
stream.getTracks().forEach(track => track.stop());
stream = null;
}
}
function verifyPhoto() {
showStep('step-verifying');
fetch('verify_facial_api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'verify_face',
token: verificationToken,
image: capturedImage
})
})
.then(response => response.json())
.then(data => {
if (data.success && data.match) {
showSuccess(data);
} else {
showFailure(data);
}
})
.catch(error => {
showError('Erreur lors de la vérification: ' + error.message);
});
}
function showSuccess(data) {
document.getElementById('result-icon').textContent = '✅';
document.getElementById('result-title').textContent = 'Identité vérifiée !';
document.getElementById('result-title').style.color = '#27ae60';
document.getElementById('result-message').innerHTML =
`Votre identité a été confirmée avec succès.<br>
Confiance: ${data.confidence}%<br><br>
<strong>Vous pouvez maintenant accéder à vos prestations.</strong>`;
showStep('step-result');
// Redirection automatique après 5 secondes
startCountdown(5, () => {
window.location.href = data.redirect_url || 'dashboard.php';
});
}
function showFailure(data) {
document.getElementById('result-icon').textContent = '❌';
document.getElementById('result-title').textContent = 'Vérification échouée';
document.getElementById('result-title').style.color = '#e74c3c';
document.getElementById('result-message').innerHTML =
`${data.message || 'Votre visage ne correspond pas à notre base de données.'}<br><br>
Si vous pensez qu'il s'agit d'une erreur, veuillez contacter notre service client.<br>
<strong>Tentatives restantes: ${data.attempts_remaining || 0}</strong>`;
showStep('step-result');
// Permettre une nouvelle tentative si disponible
if (data.attempts_remaining > 0) {
setTimeout(() => {
location.reload();
}, 5000);
}
}
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);
}
// Nettoyer la caméra quand on quitte la page
window.onbeforeunload = function() {
stopCamera();
};
</script>
</body> </body>
</html> </html>

View File

@ -25,7 +25,12 @@
} }
if (!isset($_GET['idBeneficiaire'])) { if (!isset($_GET['idBeneficiaire'])) {
$msg = $codeLangue == 'en_US' ? "Family parameter missing from query!" : "Paramètre famille absent de la requête!"; $msg = $codeLangue == 'en_US' ? "Insured ID missing from query!" : "ID assuré absent de la requête!";
afficherMessage($msg);
}
if (!isset($_GET['idDemande'])) {
$msg = $codeLangue == 'en_US' ? "Reqest ID missing from query!" : "ID demande absent de la requête!";
afficherMessage($msg); afficherMessage($msg);
} }
@ -33,9 +38,11 @@
$_SESSION['codeEntite'] = base64_decode($_GET['codeEntite']); $_SESSION['codeEntite'] = base64_decode($_GET['codeEntite']);
$_SESSION['codePrestataire'] = base64_decode($_GET['codePrestataire']); $_SESSION['codePrestataire'] = base64_decode($_GET['codePrestataire']);
$_SESSION['idBeneficiaire'] = base64_decode($_GET['idBeneficiaire']); $_SESSION['idBeneficiaire'] = base64_decode($_GET['idBeneficiaire']);
$_SESSION['idDemande'] = base64_decode($_GET['idDemande']);
$codeSociete = $_SESSION['codeEntite']; $codeSociete = $_SESSION['codeEntite'];
$idBeneficiaire = $_SESSION['idBeneficiaire']; $idBeneficiaire = $_SESSION['idBeneficiaire'];
$idDemande = $_SESSION['idDemande'];
$codePrestataire = $_SESSION['codePrestataire']; $codePrestataire = $_SESSION['codePrestataire'];
$codeBdd = $codeSociete; $codeBdd = $codeSociete;