J'ai un petit problème avec fpdf qui reste bloqué sur ma page php
require('fpdf/fpdf.php'); //include "function.php"; if(isset($_SESSION["clients"]) ){ if ( isset($_POST["actions"]) ) { if ($_POST["actions"]=="imph"){ $codeCmd=$_POST["txtcodefco"];
$db->select("ec_panier.*,ec_angle.libelle","ec_panier LEFT JOIN ec_angle ON ec_angle.id_angle=ec_panier.type_angle"," ec_panier.n_com='".$codeCmd."'","1 asc",'','',''); $rowsPan=$db->db_result_ToArray(MYSQL_BOTH);
/*$db->select("*","ec_panier"," ec_panier.n_com='".$codeCmd."' and Fact_Status=0 ","",'','','1'); $rowsPan_fact=$db->db_result_ToArray(MYSQL_BOTH); if(count($rowsPan_fact)){
mysql_query("update ec_panier set Fact_N='".$N_Fact."',Fact_Status=1,Fact_DC='".$_POST["txtcodefco"]."' where ec_panier.n_com='".$codeCmd."' ");
}*/
$db->select("ec_abonnement.*,ec_panier.*,ec_angle.libelle","ec_abonnement,ec_panier LEFT JOIN ec_angle ON ec_angle.id_angle=ec_panier.type_angle"," ec_abonnement.ab_code=ec_panier.code_client and ec_panier.n_com='".$codeCmd."' ","",'','',''); $rowsClinet_=$db->db_result_ToArray(MYSQL_BOTH);
class PDF extends FPDF{ //En-tête function Header(){ //Police Arial gras 15 // déclaration d'un membre $this->SetTextColor(150,150,150); $this->SetFont('Arial','',8); //Titre
//get la position y après ecriture du titre $y=$this->GetY(); $x=$this->GetX(); //Logo $h=$this->Image('web/images/logo.jpg',$x,$y,50); $this->Cell(0,8,'',0,1,'C'); $this->Cell(0,10,'PLD',0,0,'L'); $this->Cell(0,5,'',0,1,'C'); $this->Cell(0,10,'Tél: 01 25 12 11 29',0,0,'L'); $this->Cell(0,5,'',0,1,'C'); $this->Cell(0,10,'E-mail: ***@***',0,0,'L'); $this->Cell(0,5,'',0,1,'C');
//Saut de ligne $this->Ln($h); }
//Pied de page function Footer(){ //Positionnement à 1,5 cm du bas $this->SetY(-15); //Police Arial italique 8 $this->SetTextColor(0); $this->SetFont('Arial','',9);
$this->Cell(0,0,"Espace a design, 116 Rue de Charenton - 75012 Paris (France)",0,1,'C'); $this->Cell(0,8,"Tél : 01 45 12 06 56 - E-mail : ***@*** ",0,1,'C'); //Numéro de page // // $this->Cell(0,0,''.$this->PageNo().'/{nb}',0,0,'R'); } }
//Prix total TTC / 1,196 $pdf->Cell(110,5,"",0,'','C'); $pdf->Cell(30,5,"Prix total HT ",1,'','L'); $totalht= number_format($totalttc/1.2,2,'.',''); $pdf->Cell(52,5,number_format($totalht,2,'.','')." EUR",1,'','R'); $pdf->Cell(0,5,'',0,1,'C');
//Prix total HT x 0,196 $pdf->Cell(110,5,"",0,'','C'); $pdf->Cell(30,5,"TVA à 20% ",1,'','L'); $pdf->Cell(52,5,number_format($totalht*0.20,2,'.','')." EUR",1,'','R'); $pdf->Cell(0,5,'',0,1,'C');
$pdf->Output(); }
J'ai une page blanche. j'ai vérifié si les requêtes elles récupèrent les données c'est ok
la page qui déclenche l'action aussi elle fonctionne