default image path

This commit is contained in:
Tiavina 2025-01-03 16:02:11 +03:00
parent 8eb5ff91ce
commit 9d304611c8

View File

@ -34,7 +34,7 @@ class PageController extends Controller {
private $src_path = "/var/www/html/custom_apps/gestion/img/";
private $sharedImagePath = "/var/www/html/data/";
private $currentUserImagePath;
private $defaultImagePath;
private const HYTHA_35_DEFAULT_ADMIN = "Johann";
private const H2F_DEFAULT_ADMIN = "Emmanuelle";
@ -87,7 +87,7 @@ class PageController extends Controller {
$this->exportThanatoStatisticService = $exportThanatoStatisticService;
$this->exportClientStatisticService = $exportClientStatisticService;
$this->invoicePdfService = $invoicePdfService;
$this->currentUserImagePath = $this->sharedImagePath.$this->idNextcloud.'/files/.gestion/';
$this->defaultImagePath = $this->sharedImagePath.self::DEFAULT_NEXTCLOUD_ADMIN.'/files/.gestion/';
//$this->fpdf = $fpdf;
if ($userSession->isLoggedIn()) {
@ -821,7 +821,7 @@ class PageController extends Controller {
// logo : 80 de largeur et 55 de hauteur
if($isLogoExist){
$pdf->Image($this->currentUserImagePath."logo.png", 10, 10, 75, 25);
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
}
// adresse du facture
$pdf->SetFont('Arial','B',size: 11);
@ -855,7 +855,7 @@ class PageController extends Controller {
$pdf->Cell( $pdf->GetStringWidth($current_config[0]->nom.' '.$current_config[0]->prenom), 0, utf8_decode(html_entity_decode($current_config[0]->nom.' '.$current_config[0]->prenom)), 0, 0, 'L');
$signatureExists = $this->signatureImageExists('sign.png');
if($signatureExists){
$pdf->Image($this->currentUserImagePath."sign.png", 135, 150, 55, 30);
$pdf->Image($this->defaultImagePath."sign.png", 135, 150, 55, 30);
}
$y0 = 260;
@ -885,7 +885,7 @@ class PageController extends Controller {
$pdf->SetAutoPagebreak(False);
$pdf->SetMargins(0,0,10);
if($isLogoExist){
$pdf->Image($this->currentUserImagePath."logo.png", 10, 10, 75, 25);
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
}
// n° page en haute à droite
@ -2246,7 +2246,7 @@ class PageController extends Controller {
// logo : 80 de largeur et 55 de hauteur
$logo = $this->getLogo();
if($logo != 'nothing'){
$pdf->Image($this->currentUserImagePath."logo.png", 10, 10, 55, 30);
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 55, 30);
}
$pdf->SetY(55); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(0, 10, "ATTESTATION", 0, 0, 'C');
@ -2282,7 +2282,7 @@ class PageController extends Controller {
$signatureExist = $this->signatureImageExists('sign.png');
if($signatureExist){
$pdf->Image($this->currentUserImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
$pdf->Image($this->defaultImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
}
$pdf->setY($pdf->GetY()-5);
@ -2363,7 +2363,7 @@ class PageController extends Controller {
// logo : 80 de largeur et 55 de hauteur
$logo = $this->getLogo();
if($logo != 'nothing'){
$pdf->Image($this->currentUserImagePath."logo.png", 15, 15, 55, 30);
$pdf->Image($this->defaultImagePath."logo.png", 15, 15, 55, 30);
}
$pdf->setXY(15, 15); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("N : ".$numFacture)), '', 'R');
@ -2524,7 +2524,7 @@ class PageController extends Controller {
$signatureExist = $this->signatureImageExists('sign.png');
if($signatureExist){
$pdf->Image($this->currentUserImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
$pdf->Image($this->defaultImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
}
$pdf->setY($pdf->GetY()-5);
@ -2619,7 +2619,7 @@ class PageController extends Controller {
// logo : 80 de largeur et 55 de hauteur
$logo = $this->getLogo();
if($logo != 'nothing'){
$pdf->Image($this->currentUserImagePath."logo.png", 10, 10, 55, 30);
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 55, 30);
}
$pdf->SetY(55); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(0, 10, utf8_decode(html_entity_decode("ATTESTATION BIJOU(X)")), 0, 0, 'C');
@ -2663,7 +2663,7 @@ class PageController extends Controller {
$signatureExist = $this->signatureImageExists('sign.png');
if ($signatureExist) {
$pdf->Image($this->currentUserImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
$pdf->Image($this->defaultImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
}
$pdf->setY($pdf->GetY()-5);