From 483de7227479b3f6435552a0ede0c0fe276f2539 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Wed, 25 Feb 2026 10:56:49 +0000 Subject: [PATCH] a --- .../Editioncarteassure_2026_02_17_06h.php | 158 --------------- .../Controleur/Editioncarteassure_claude.php | 162 ---------------- .../Editioncarteassure_erreur_adiafi.php | 168 ---------------- .../Controleur/Editioncarteassure_new_bon.php | 180 ------------------ 4 files changed, 668 deletions(-) delete mode 100755 Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_17_06h.php delete mode 100755 Societes/ebene/Tarifs/Controleur/Editioncarteassure_claude.php delete mode 100755 Societes/ebene/Tarifs/Controleur/Editioncarteassure_erreur_adiafi.php delete mode 100755 Societes/ebene/Tarifs/Controleur/Editioncarteassure_new_bon.php diff --git a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_17_06h.php b/Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_17_06h.php deleted file mode 100755 index 30274f20..00000000 --- a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_17_06h.php +++ /dev/null @@ -1,158 +0,0 @@ - rendre la carte personalisable par societeuser -// Fond blanc -$pdf->SetFillColor(255, 255, 255); -$pdf->Rect(0, 0, 85.6, 54, 'F'); - -// LOGO SOCIÉTÉ en haut à gauche -if (file_exists($logoSocietePath)) { - $pdf->Image($logoSocietePath, 3, 3, 15); -} - -$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; - -if (!is_file($logoGarantPath)) { - $logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; -} - -// LOGO GARANT en haut à droite -if (is_file($logoGarantPath)) { - $pdf->Image($logoGarantPath, 67, 1, 15); -} - -// EN-TÊTE : "CARTE D'ASSURANCE" -$pdf->SetFont('Arial', 'B', 8); -$pdf->SetTextColor(33, 46, 83); -$pdf->SetXY(0, 5); -$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -$pdf->SetTextColor(0); - -// Informations de contact de la société -$pdf->SetFont('Arial', '', 5); -$pdf->SetXY(0, 9); -$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C'); - -$pdf->SetXY(0, 12); -$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); - -// Ligne séparatrice -$pdf->Line(5, 15, 80, 15); - -// Section "Bénéficiaire" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(5, 17); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Matricule - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 21); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1); -$pdf->SetTextColor(0); - -// Nom -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 24); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Prénoms -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 27); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Né(e) le - si disponible -if (!empty($assure['dateNaissance'])) { - $pdf->SetFont('Arial', '', 6); - $pdf->SetXY(5, 30); - $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0); - $pdf->SetFont('Arial', 'B', 6); - $pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1); -} - -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 33); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Section "Assuré Principal" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(5, 38); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Numéro assuré - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 42); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroAdherent'], 0, 1); -$pdf->SetTextColor(0); - -// Nom et Prénoms assuré -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 45); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(15, 3, ' : '.substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1); - -// Photo de l'assuré (positionnée à droite) - taille réduite -$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto']; -$photoX = 57; -$photoY = 17; - -// Vérifier si l'URL est accessible -$headers = @get_headers($photoPath); - -if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { - $pdf->Image($photoPath, $photoX, $photoY, 25, 25); -} else { - // Cadre pour la photo si non disponible - $pdf->Rect($photoX, $photoY, 25, 25); - $pdf->SetFont('Arial', '', 4); - $pdf->SetXY($photoX, $photoY + 12); - $pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -} - -// ============ AJOUT DU QR CODE ============ -// Position : en bas à droite de la carte -if (file_exists($qrCodePath)) { - $qrX = 60; // Position X (à droite) - $qrY = 43; // Position Y (en bas) - $qrSize = 10; // Taille du QR code (10mm) - - $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); - - /* - // Supprimer le fichier temporaire après utilisation - @unlink($qrCodePath); - */ - // Enregistrer le qrCodePath dans la BDD - // $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrCodePath); - $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrFile); -} -// ========================================== - -// Nom du souscripteur en bas -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetXY(0, 49); -$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -?> \ No newline at end of file diff --git a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_claude.php b/Societes/ebene/Tarifs/Controleur/Editioncarteassure_claude.php deleted file mode 100755 index 4a63e10b..00000000 --- a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_claude.php +++ /dev/null @@ -1,162 +0,0 @@ - rendre la carte personalisable par societeuser -// Fond blanc -$pdf->SetFillColor(255, 255, 255); -$pdf->Rect(0, 0, 85.6, 54, 'F'); - -// LOGO SOCIÉTÉ en haut à gauche -if (file_exists($logoSocietePath)) { - $pdf->Image($logoSocietePath, 3, 3, 15); -} - -$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; - -if (!is_file($logoGarantPath)) { - $logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; -} - -// LOGO GARANT en haut à droite -if (is_file($logoGarantPath)) { - $pdf->Image($logoGarantPath, 67, 1, 15); -} - -// EN-TÊTE : "CARTE D'ASSURANCE" -$pdf->SetFont('Arial', 'B', 8); -$pdf->SetTextColor(33, 46, 83); -$pdf->SetXY(0, 5); -$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -$pdf->SetTextColor(0); - -// Informations de contact de la société -$pdf->SetFont('Arial', '', 5); -$pdf->SetXY(0, 9); -$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C'); - -$pdf->SetXY(0, 12); -$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); - -// Ligne séparatrice -$pdf->Line(5, 15, 80, 15); - -// Section "Bénéficiaire" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(5, 17); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Matricule - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 21); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1); -$pdf->SetTextColor(0); - -// Nom -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 24); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Prénoms -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 27); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Né(e) le - si disponible -if (!empty($assure['dateNaissance'])) { - $pdf->SetFont('Arial', '', 6); - $pdf->SetXY(5, 30); - $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0); - $pdf->SetFont('Arial', 'B', 6); - $pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1); -} - -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 33); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Section "Assuré Principal" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(5, 38); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Numéro assuré - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 42); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroAdherent'], 0, 1); -$pdf->SetTextColor(0); - -// Nom et Prénoms assuré -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 45); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(15, 3, ' : '.substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1); - -// Photo de l'assuré (positionnée à droite) - taille réduite -$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto']; -$photoX = 57; -$photoY = 17; - -// Vérifier si l'URL est accessible -$headers = @get_headers($photoPath); - -if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { - $pdf->Image($photoPath, $photoX, $photoY, 25, 25); -} else { - // Cadre pour la photo si non disponible - $pdf->Rect($photoX, $photoY, 25, 25); - $pdf->SetFont('Arial', '', 4); - $pdf->SetXY($photoX, $photoY + 12); - $pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -} - -// ============ AJOUT DU QR CODE ============ -// Position : en bas à droite de la carte -if (file_exists($qrCodePath)) { - $qrX = 60; // Position X (à droite) - $qrY = 43; // Position Y (en bas) - $qrSize = 10; // Taille du QR code (10mm) - - $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); - - // Supprimer le fichier temporaire après utilisation - @unlink($qrCodePath); -} -// ========================================== - -// Nom du souscripteur en bas -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetXY(0, 49); -$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -?> \ No newline at end of file diff --git a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_erreur_adiafi.php b/Societes/ebene/Tarifs/Controleur/Editioncarteassure_erreur_adiafi.php deleted file mode 100755 index f56b0dcd..00000000 --- a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_erreur_adiafi.php +++ /dev/null @@ -1,168 +0,0 @@ - rendre la carte personalisable par societeuser -// Fond blanc -$pdf->SetFillColor(255, 255, 255); -$pdf->Rect(0, 0, 85.6, 54, 'F'); - -// LOGO SOCIÉTÉ en haut à gauche -if (file_exists($logoSocietePath)) { - $pdf->Image($logoSocietePath, 3, 3, 15); -} - -$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; - -if (!is_file($logoGarantPath)) { - $logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; -} - -// LOGO GARANT en haut à droite -if (is_file($logoGarantPath)) { - $pdf->Image($logoGarantPath, 67, 1, 15); -} - -// EN-TÊTE : "CARTE D'ASSURANCE" -$pdf->SetFont('Arial', 'B', 8); -$pdf->SetTextColor(33, 46, 83); -$pdf->SetXY(0, 5); -$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -$pdf->SetTextColor(0); - -// Informations de contact de la société -$pdf->SetFont('Arial', '', 5); -$pdf->SetXY(0, 9); -$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C'); - -$pdf->SetXY(0, 12); -$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); - -// Ligne séparatrice -$pdf->Line(5, 15, 80, 15); - -// Section "Bénéficiaire" -$pdf->SetFont('Arial', 'BUI', 7); -//$pdf->SetXY(5, 17); -$pdf->SetXY(13, 16); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Matricule - en gras et rouge -$pdf->SetFont('Arial', '', 6); -// $pdf->SetXY(5, 21); -$pdf->SetXY(5, 19); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1); -$pdf->SetTextColor(0); - -// Nom -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 22); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Prénoms -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 25); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Né(e) le - si disponible -if (!empty($assure['dateNaissance'])) { - $pdf->SetFont('Arial', '', 6); - $pdf->SetXY(5, 28); - $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0); - $pdf->SetFont('Arial', 'B', 6); - $pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1); -} - -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 31); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -/* kane 17/02/2026 à 06h => recherche meilleure place QR code*/ -// ============ AJOUT DU QR CODE ============ -// Position : en bas à droite de la carte -// Position : en bas à gauche de la carte -if (file_exists($qrCodePath)) { - /* - $qrX = 60; // Position X (à droite) - $qrY = 43; // Position Y (en bas) - $qrSize = 10; // Taille du QR code (10mm) - */ - - $qrX = 5; // Position X (à droite) - $qrY = 34; // Position Y (en bas) - $qrSize = 18; // Taille du QR code (10mm) - - $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); - - /* - // Supprimer le fichier temporaire après utilisation - @unlink($qrCodePath); - */ - // Enregistrer le qrCodePath dans la BDD - // $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrCodePath); - $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrFile); -} -// ========================================== - -// Section "Assuré Principal" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(28, 37); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Numéro assuré - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(25, 41); -$pdf->Cell(10, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(0, 3, ' : '.$assure['numeroAdherent'], 0, 1); -$pdf->SetTextColor(0); - -// Nom et Prénoms assuré -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(25, 44); -// $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(0, 3, substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1); - -// Photo de l'assuré (positionnée à droite) - taille réduite -$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto']; -$photoX = 57; -$photoY = 17; - -// Vérifier si l'URL est accessible -$headers = @get_headers($photoPath); - -if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { - $pdf->Image($photoPath, $photoX, $photoY, 25, 25); -} else { - // Cadre pour la photo si non disponible - $pdf->Rect($photoX, $photoY, 25, 25); - $pdf->SetFont('Arial', '', 4); - $pdf->SetXY($photoX, $photoY + 12); - $pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -} - -// Nom du souscripteur en bas -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetXY(0, 49); -$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -?> \ No newline at end of file diff --git a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_new_bon.php b/Societes/ebene/Tarifs/Controleur/Editioncarteassure_new_bon.php deleted file mode 100755 index 6e9ab646..00000000 --- a/Societes/ebene/Tarifs/Controleur/Editioncarteassure_new_bon.php +++ /dev/null @@ -1,180 +0,0 @@ - rendre la carte personalisable par societeuser -// Fond blanc -$pdf->SetFillColor(255, 255, 255); -$pdf->Rect(0, 0, 85.6, 54, 'F'); - -// LOGO SOCIÉTÉ en haut à gauche -if (file_exists($logoSocietePath)) { - $pdf->Image($logoSocietePath, 3, 3, 15); -} - -$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; - -if (!is_file($logoGarantPath)) { - $logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png'; -} - -// LOGO GARANT en haut à droite -if (is_file($logoGarantPath)) { - $pdf->Image($logoGarantPath, 67, 1, 15); -} - -// EN-TÊTE : "CARTE D'ASSURANCE" -$pdf->SetFont('Arial', 'B', 8); -$pdf->SetTextColor(33, 46, 83); -$pdf->SetXY(0, 5); -$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -$pdf->SetTextColor(0); - -// Informations de contact de la société -$pdf->SetFont('Arial', '', 5); -$pdf->SetXY(0, 9); -$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C'); - -$pdf->SetXY(0, 12); -$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); - -// Ligne séparatrice -$pdf->Line(5, 15, 80, 15); - -// Section "Bénéficiaire" -$pdf->SetFont('Arial', 'BUI', 7); -//$pdf->SetXY(5, 17); -$pdf->SetXY(13, 16); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Matricule - en gras et rouge -$pdf->SetFont('Arial', '', 6); -// $pdf->SetXY(5, 21); -$pdf->SetXY(5, 19); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1); -$pdf->SetTextColor(0); - -// Nom -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 22); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Prénoms -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 25); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -// Né(e) le - si disponible -if (!empty($assure['dateNaissance'])) { - $pdf->SetFont('Arial', '', 6); - $pdf->SetXY(5, 28); - $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0); - $pdf->SetFont('Arial', 'B', 6); - $pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1); -} - -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(5, 31); -$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); - -/* kane 17/02/2026 à 06h => recherche meilleure place QR code*/ -// ============ AJOUT DU QR CODE ============ -// Position : en bas à droite de la carte -// Position : en bas à gauche de la carte -if (file_exists($qrCodePath)) { - /* - $qrX = 60; // Position X (à droite) - $qrY = 43; // Position Y (en bas) - $qrSize = 10; // Taille du QR code (10mm) - */ - - $qrX = 5; // Position X (à droite) - $qrY = 34; // Position Y (en bas) - $qrSize = 18; // Taille du QR code (10mm) - - $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); - - /* - // Supprimer le fichier temporaire après utilisation - @unlink($qrCodePath); - */ - // Enregistrer le qrCodePath dans la BDD - // $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrCodePath); - $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrFile); -} -// ========================================== - -// Section "Assuré Principal" -$pdf->SetFont('Arial', 'BUI', 7); -$pdf->SetXY(28, 37); -$pdf->SetTextColor(33, 46, 83); -$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1); -$pdf->SetTextColor(0); - -// Numéro assuré - en gras et rouge -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(25, 41); -$pdf->Cell(10, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetTextColor(255, 0, 0); -$pdf->Cell(0, 3, ' : '.$assure['numeroAdherent'], 0, 1); -$pdf->SetTextColor(0); - -// Nom et Prénoms assuré -$pdf->SetFont('Arial', '', 6); -$pdf->SetXY(25, 44); -// $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0); -$pdf->SetFont('Arial', 'B', 6); -$pdf->Cell(0, 3, substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1); - -// Photo de l'assuré (positionnée à droite) - taille réduite -// $photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto']; -$photo=$assure['lienPhoto']; -$faceRegistered=$assure['faceRegistered']; - -$photoPath = $_SESSION['lienPhotoFace'].$assure['lienPhoto']; -$photoX = 57; -$photoY = 17; - -// Vérifier si l'URL est accessible -$headers = @get_headers($photoPath); - -//if($faceRegistered=="1" && file_exists($photoPath)) -// if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { -if ($faceRegistered=="1" && !empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { - $data = decryptImage($photoPath); - $data = base64_decode($data); - $temp = $_SESSION['lienPhotoFace'].'tmp_'.uniqid().'.jpg'; - file_put_contents($temp, $data); - // $pdf->Image($photoPath, $photoX, $photoY, 25, 25); - $pdf->Image($temp, $photoX, $photoY, 25, 25); // Réduction de 30x30 à 25x25 - unlink($temp); -} else { - // Cadre pour la photo si non disponible - $pdf->Rect($photoX, $photoY, 25, 25); - $pdf->SetFont('Arial', '', 4); - $pdf->SetXY($photoX, $photoY + 12); - $pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -} - -// Nom du souscripteur en bas -$pdf->SetFont('Arial', 'B', 6); -$pdf->SetXY(0, 49); -$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C'); -?> \ No newline at end of file