a
This commit is contained in:
parent
311c04b8c7
commit
a21a080db1
|
|
@ -31,14 +31,6 @@ class ControleurAjaxeditioncarteassure extends Controleur
|
|||
return;
|
||||
}
|
||||
|
||||
// 1. Inclure la bibliothèque phpqrcode
|
||||
// Définir le dossier de log AVANT l'include
|
||||
/*
|
||||
if (!defined('QR_LOG_DIR')) {
|
||||
define('QR_LOG_DIR', sys_get_temp_dir() . '/');
|
||||
}
|
||||
*/
|
||||
|
||||
include 'phpqrcode/qrlib.php';
|
||||
|
||||
$pdf = new FPDF_Protection('L', 'mm', array(85.6, 54));
|
||||
|
|
@ -111,7 +103,6 @@ class ControleurAjaxeditioncarteassure extends Controleur
|
|||
$t_html .= '<a href="' . $fichier . '" target="_blank" class="btn btn-info btn-lg d-flex align-items-center">';
|
||||
$t_html .= '<i class="fas fa-eye me-2"></i>' . _("PRÉVISUALISER");
|
||||
$t_html .= '</a>';
|
||||
|
||||
|
||||
// Bouton CONFIRMER avec icône
|
||||
$t_html .= '<button type="button" class="btn btn-danger btn-lg d-flex align-items-center" onclick="javascript:confirmer_edition_carte();">';
|
||||
|
|
@ -120,6 +111,5 @@ class ControleurAjaxeditioncarteassure extends Controleur
|
|||
$t_html .= '</div>';
|
||||
$t_html .= '</div>';
|
||||
echo $t_html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
$qrData = $assure['tagCarteQr'];
|
||||
|
||||
$qrFile = $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||
// $qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||
$qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $qrFile;
|
||||
|
||||
QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_H, 4, 2); // recommandé pour cartes PVC
|
||||
|
|
@ -95,27 +94,13 @@ $pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-
|
|||
|
||||
/* 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);
|
||||
}
|
||||
// ==========================================
|
||||
|
|
@ -139,7 +124,6 @@ $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);
|
||||
|
||||
|
|
@ -159,13 +143,11 @@ if($photo>" " && $faceRegistered=="1")
|
|||
$headers = @get_headers($photoPath);
|
||||
}
|
||||
|
||||
// if ($assure['lienPhoto']>" " && $headers && $faceRegistered=="1") {
|
||||
if ($headers) {
|
||||
$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 {
|
||||
|
|
@ -176,7 +158,7 @@ if ($headers) {
|
|||
$pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||
}
|
||||
|
||||
// echo "photo => $photo";
|
||||
/*
|
||||
var_dump(
|
||||
array(
|
||||
"faceRegistered" => $faceRegistered,
|
||||
|
|
@ -185,6 +167,7 @@ var_dump(
|
|||
)
|
||||
);
|
||||
echo "<br> <br>";
|
||||
*/
|
||||
|
||||
// Nom du souscripteur en bas
|
||||
$pdf->SetFont('Arial', 'B', 6);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user