Open(); $ourPDF->addPage(); $ourPDF->SetPageMargins(CBG_TOP_MARGIN, CBG_BOTTOM_MARGIN, CBG_LEFT_MARGIN, CBG_RIGHT_MARGIN); // ---------------------LLIUREX 21/02/2018---------------- $id_empr=trim($id_empr); //---------------------- FIN LLIUREX 21/02/2018----------- $requete = "SELECT id_empr, empr_cb, empr_nom, empr_prenom, empr_date_adhesion, empr_date_expiration, date_format(empr_date_adhesion, '".$msg["format_date"]."') as aff_empr_date_adhesion, date_format(empr_date_expiration, '".$msg["format_date"]."') as aff_empr_date_expiration FROM empr WHERE id_empr='$id_empr' LIMIT 1 "; $res = pmb_mysql_query($requete, $dbh); $empr = pmb_mysql_fetch_object($res); $xpos_top = 12; $ypos_left = 0; $ourPDF->SetFont($pmb_pdf_font, '', 14); $ourPDF->SetXY(($pos_x+40 - $largeur_nom/2), $pos_y); //-------------------- LLIUREX 21/02/2018 ---------------------------- //$ourPDF->MultiCell($largeur_nom, 7, $empr->empr_prenom." ".$empr->empr_nom, 0, "C", 0); $ourPDF->MultiCell($largeur_nom, 7, trim($empr->empr_prenom)." ".trim($empr->empr_nom), 0, "C", 0); //------------------- FIN LLIUREX 21/02/2018 ------------------------ $largeur_carteno = 70; $ourPDF->SetFont($pmb_pdf_font, '', 10); $ourPDF->SetXY(($pos_x+40 - $largeur_carteno/2), $pos_y+30); //--------------------- LLIUREX 21/02/2018---------------------------- //$ourPDF->MultiCell($largeur_carteno, 8, $carteno." ".$empr->empr_cb, 0, "C", 0); $ourPDF->MultiCell($largeur_carteno, 8, $carteno." ".trim($empr->empr_cb), 0, "C", 0); //--------------------- FIN LLIUREX 21/02/2018------------------------ if($valabledu != '' || $valableau != '') { $largeur_valable = 70; $ourPDF->SetFont($pmb_pdf_font, '', 10); $ourPDF->SetXY(($pos_x+40 - $largeur_valable/2), $pos_y+35); //---------------------- LLIUREX 21/02/2018---------------------------- //$ourPDF->MultiCell($largeur_valable, 8, $valabledu." ".$empr->aff_empr_date_adhesion." ".$valableau." ".$empr->aff_empr_date_expiration, 0, "C", 0); $ourPDF->MultiCell($largeur_valable, 8, $valabledu." ".trim($empr->aff_empr_date_adhesion)." ".$valableau." ".trim($empr->aff_empr_date_expiration), 0, "C", 0); //---------------------- FIN LLIUREX 21/02/2018 ----------------------- } $xpos = $pos_x + 16 ; $ypos = $pos_y+16 ; // code barre $ourPDF->SetFont($pmb_pdf_font, '', CBG_TEXT_FONT_SIZE); $ourPDF->SetCBFontSize(CBG_CB_TEXT_SIZE); $ourPDF->SetCBXRes(CBG_CB_RES); $ourPDF->SetCBStyle(BCS_ALIGN_CENTER | BCS_BORDER | BCS_DRAW_TEXT); $cbwidth = $ourPDF->GetStickWidth() - CBG_INNER_LEFT_MARGIN - CBG_INNER_RIGHT_MARGIN; $cbheight = $ourPDF->GetStickHeight() - CBG_INNER_TOP_MARGIN - CBG_INNER_BOTTOM_MARGIN; if ($bibli_name != '') $cbheight -= CBG_TEXT_HEIGHT; if ($bibli_name != "") { $ourPDF->SetXY($xpos, $ypos + CBG_INNER_BOTTOM_MARGIN); $ourPDF->Cell($ourPDF->GetStickWidth(), CBG_TEXT_HEIGHT, $bibli_name, 0, 0, 'C'); } $x = $xpos + CBG_INNER_LEFT_MARGIN; $y = $ypos + CBG_INNER_TOP_MARGIN; if ($bibli_name != "") $y += CBG_TEXT_HEIGHT; //------------------- LLIUREX 21/02/2018--------------------------- //$ourPDF->DrawBarcode($empr->empr_cb, $x, $y, $cbwidth, $cbheight, 'c39'); $ourPDF->DrawBarcode(trim($empr->empr_cb), $x, $y, $cbwidth, $cbheight, 'c39'); //-------------------- FIN LLIUREX 21/02/2018----------------------- $ourPDF->SetLineWidth(1); $ourPDF->Rect($pos_x+10, $pos_y+14, 60, 17, "D"); $ourPDF->Output(); ?>