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; body {
} font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.contestation-card { min-height: 100vh;
background: white; display: flex;
border-radius: 16px; align-items: center;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); justify-content: center;
overflow: hidden; padding: 20px;
max-width: 700px; }
margin: 40px auto;
} .container {
background: white;
.contestation-header { border-radius: 20px;
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
color: white; max-width: 600px;
padding: 2rem; width: 100%;
text-align: center; overflow: hidden;
position: relative; }
}
.header {
.contestation-header::before { background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
content: ''; color: white;
position: absolute; padding: 30px;
top: 0; text-align: center;
left: 0; }
right: 0;
bottom: 0; .header h1 {
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>'); font-size: 28px;
background-size: cover; margin-bottom: 10px;
} }
.contestation-header h1 { .header p {
font-weight: 600; opacity: 0.9;
margin: 0; }
font-size: 1.8rem;
position: relative; .content {
z-index: 1; padding: 40px 30px;
} }
.contestation-body { .step {
padding: 2.5rem; display: none;
} }
.form-label { .step.active {
font-weight: 600; display: block;
color: #333; }
margin-bottom: 1rem;
font-size: 1.1rem; .video-container {
} position: relative;
background: #000;
.required::after { border-radius: 15px;
content: " *"; overflow: hidden;
color: #dc3545; margin: 20px 0;
} }
.form-control { #video, #canvas {
border: 2px solid #e9ecef; width: 100%;
border-radius: 10px; display: block;
padding: 1rem; border-radius: 15px;
font-size: 1rem; }
transition: all 0.3s ease;
} #canvas {
display: none;
.form-control:focus { }
border-color: #4caf50;
box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25); .face-overlay {
} position: absolute;
top: 50%;
.btn-submit { left: 50%;
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%); transform: translate(-50%, -50%);
color: white; width: 250px;
border: none; height: 300px;
border-radius: 10px; border: 3px dashed rgba(255, 255, 255, 0.7);
padding: 1rem 2rem; border-radius: 50%;
font-size: 1.1rem; pointer-events: none;
font-weight: 600; }
transition: all 0.3s ease;
width: 100%; .instructions {
margin-top: 1rem; background: #f8f9fa;
} padding: 20px;
border-radius: 10px;
.btn-submit:hover { margin: 20px 0;
transform: translateY(-2px); }
box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
} .instructions h3 {
color: #2c3e50;
.character-count { margin-bottom: 15px;
text-align: right; display: flex;
font-size: 0.875rem; align-items: center;
color: #6c757d; }
margin-top: 0.5rem;
} .instructions h3::before {
content: "";
.info-section { margin-right: 10px;
background: #f8f9fa; }
border-radius: 10px;
padding: 1.5rem; .instructions ul {
margin-bottom: 2rem; list-style: none;
border-left: 4px solid #4caf50; padding-left: 0;
display: none; }
}
.instructions li {
.info-item { padding: 8px 0;
display: flex; padding-left: 25px;
align-items: center; position: relative;
margin-bottom: 0.5rem; }
}
.instructions li::before {
.info-item:last-child { content: "";
margin-bottom: 0; position: absolute;
} left: 0;
color: #27ae60;
.info-item i { font-weight: bold;
color: #4caf50; }
margin-right: 0.75rem;
font-size: 1.1rem; .button {
} background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
color: white;
/* Responsive adjustments */ border: none;
@media (max-width: 768px) { padding: 15px 30px;
.contestation-container { font-size: 16px;
padding: 15px; border-radius: 10px;
} cursor: pointer;
width: 100%;
.contestation-card { margin: 10px 0;
margin: 20px auto; transition: transform 0.2s, box-shadow 0.2s;
} font-weight: 600;
}
.contestation-header {
padding: 1.5rem; .button:hover {
} transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
.contestation-header h1 { }
font-size: 1.5rem;
} .button:disabled {
opacity: 0.5;
.contestation-body { cursor: not-allowed;
padding: 1.5rem; transform: none;
} }
}
.button.capture {
@media (max-width: 576px) { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
.contestation-container { }
padding: 10px;
} .button.retry {
background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
.contestation-header { }
padding: 1.25rem;
} .status {
padding: 15px;
.contestation-header h1 { border-radius: 10px;
font-size: 1.3rem; margin: 20px 0;
} text-align: center;
font-weight: 500;
.contestation-body { }
padding: 1.25rem;
} .status.info {
background: #d1ecf1;
.info-section { color: #0c5460;
padding: 1rem; border: 1px solid #bee5eb;
} }
}
</style> .status.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.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 class="content">
</div> <!-- Étape 1: Chargement -->
<div id="step-loading" class="step active">
<div class="contestation-body"> <div class="loader"></div>
<!-- Information Section --> <p style="text-align: center; color: #7f8c8d;">Vérification du lien...</p>
<div class="info-section"> </div>
<div class="info-item">
<i class="bi bi-info-circle"></i> <!-- Étape 2: Instructions -->
<strong><?= $codeLangue == 'en_US' ? 'Information:' : 'Information :' ?></strong> <div id="step-instructions" class="step">
</div> <div class="instructions">
<div class="info-item"> <h3>Instructions pour la vérification</h3>
<i class="bi bi-building"></i> <ul>
<span><?= $codeLangue == 'en_US' ? 'Entity:' : 'Entité :' ?> <?= htmlspecialchars($codeEntite) ?></span> <li>Positionnez votre visage dans l'ovale</li>
</div> <li>Assurez-vous d'être dans un endroit bien éclairé</li>
<div class="info-item"> <li>Regardez directement la caméra</li>
<i class="bi bi-person"></i> <li>Restez immobile lors de la capture</li>
<span><?= $codeLangue == 'en_US' ? 'Family ID:' : 'ID Famille :' ?> <?= htmlspecialchars($idAdherent) ?></span> <li>Retirez lunettes de soleil, casquette ou masque</li>
</div> </ul>
<div class="info-item"> </div>
<i class="bi bi-folder"></i> <button class="button" onclick="startCamera()">📸 Démarrer la caméra</button>
<span><?= $codeLangue == 'en_US' ? 'Record:' : 'Dossier :' ?> <?= htmlspecialchars($dossier) ?></span> </div>
</div>
</div> <!-- Étape 3: Capture -->
<div id="step-capture" class="step">
<!-- Contestation Form --> <div class="video-container">
<form action="<?= $action ?>" method="post"> <video id="video" autoplay playsinline></video>
<div class="mb-4"> <canvas id="canvas"></canvas>
<label for="motifContestation" class="form-label required"> <div class="face-overlay"></div>
<?= htmlspecialchars($labelMotifContestation) ?> </div>
</label> <div id="camera-status" class="status info">
<textarea Positionnez votre visage dans l'ovale
id="motifContestation" </div>
name="motifContestation" <button class="button capture" onclick="capturePhoto()">📷 Prendre la photo</button>
class="form-control border border-success" </div>
rows="8"
required <!-- Étape 4: Confirmation -->
placeholder="<?= htmlspecialchars($placeholder) ?>" <div id="step-confirm" class="step">
maxlength="1000" <h3 style="color: #2c3e50; margin-bottom: 15px;">Confirmez votre photo</h3>
oninput="updateCharacterCount(this)"></textarea> <img id="preview" class="preview-image" alt="Votre photo">
<div class="character-count"> <button class="button" onclick="verifyPhoto()"> Confirmer et vérifier</button>
<span id="charCount">0</span>/1000 <?= $codeLangue == 'en_US' ? 'characters' : 'caractères' ?> <button class="button retry" onclick="retakePhoto()"> Reprendre la photo</button>
</div> </div>
</div>
<!-- Étape 5: Vérification en cours -->
<button type="submit" class="btn-submit"> <div id="step-verifying" class="step">
<i class="bi bi-send-check me-2"></i> <div class="loader"></div>
<?= htmlspecialchars($label) ?> <p style="text-align: center; color: #7f8c8d; margin-top: 20px;">
</button> Vérification de votre identité en cours...<br>
</form> <small>Merci de patienter</small>
</div> </p>
</div> </div>
</div>
<!-- Étape 6: Résultat -->
<div id="step-result" class="step">
<div class="match-result">
<div class="icon" id="result-icon"></div>
<h2 id="result-title"></h2>
<p id="result-message"></p>
</div>
<div id="countdown" class="countdown"></div>
</div>
<!-- É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> <script>
function updateCharacterCount(textarea) { let video = document.getElementById('video');
const charCount = textarea.value.length; let canvas = document.getElementById('canvas');
document.getElementById('charCount').textContent = charCount; let context = canvas.getContext('2d');
let stream = null;
// Change color when approaching limit let verificationToken = null;
const charCountElement = document.getElementById('charCount'); let capturedImage = null;
if (charCount > 900) {
charCountElement.style.color = '#dc3545'; // Récupérer le token depuis l'URL
charCountElement.style.fontWeight = 'bold'; const urlParams = new URLSearchParams(window.location.search);
} else if (charCount > 750) { // alert(urlParams);
charCountElement.style.color = '#ffc107'; // verificationToken = urlParams.get('token');
charCountElement.style.fontWeight = 'bold'; codeEntite = urlParams.get('codeEntite');
} else { idBeneficiaire = urlParams.get('idBeneficiaire');
charCountElement.style.color = '#6c757d'; alert("codeEntite="+codeEntite+" ; idBeneficiaire="+idBeneficiaire);
charCountElement.style.fontWeight = 'normal';
} // Initialisation
} window.onload = function() {
if (!verificationToken) {
// Initialize character count on page load showError('Lien de vérification invalide');
document.addEventListener('DOMContentLoaded', function() { return;
const textarea = document.getElementById('motifContestation'); }
updateCharacterCount(textarea);
}); // Vérifier la validité du token
</script> validateToken();
};
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
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;