* @author Laurent Giovannoni */ include("../session.php"); require_once("../class_functions.php"); require_once("../class_db.php"); require_once("../fpdi.php"); require_once("class_get_barcode.php"); if(file_exists("../".$_SESSION['config']['lang'].'.php')) { include("../".$_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } if(isset($_GET['id'])) { $entity = $_GET['id']; } if(isset($_GET['label'])) { $entity_label = $_GET['label']; } $pdf= new fpdi();//create a new document PDF $cab_pdf= new barcocdeFPDF();//create a new document PDF $pdf->DisplayPreferences('HideMenubar,HideToolbar,HideWindowUI'); $title = _PRINT_SEP_TITLE; //to begin, create a img file to generate CAB $code1 = "*MAARCH ".$entity." Y*"; $pdf->addPage(); //Add a blank page $pdf->SetFont('Arial','B',20); $pdf->Cell(180,20,$title,0,1, 'C'); $type = 'C39'; $p_cab = $cab_pdf->generateBarCode($type,$code1, 40); $pdf->Image($p_cab,40,35,120); unlink($p_cab); $pdf->Cell(180,80,$code1,0,1, 'C'); $pdf->Cell(180,10,'',0,1, 'C'); $pdf->Cell(180,10,'',0,1, 'C'); $pdf->Cell(180,10, utf8_decode(_ENTITY." : ".$entity_label),1,1, 'C'); $pdf->Cell(180,10, utf8_decode(_NATURE." : "._INGOING_UP),1,1, 'C'); $code2 = "*MAARCH ".$entity." N*"; $pdf->addPage(); //Add a blank page $pdf->SetFont('Arial','B',20); $pdf->Cell(180,20,$title,0,1, 'C'); $type = 'C39'; $p_cab = $cab_pdf->generateBarCode($type,$code2, 40); $pdf->Image($p_cab,40,35,120); unlink($p_cab); $pdf->Cell(180,80,$code2,0,1, 'C'); $pdf->Cell(180,10,'',0,1, 'C'); $pdf->Cell(180,10,'',0,1, 'C'); $pdf->Cell(180,10, utf8_decode(_ENTITY." : ".$entity_label),1,1, 'C'); $pdf->Cell(180,10, utf8_decode(_NATURE." : "._ONGOING_UP),1,1, 'C'); $pdf->AutoPrint(true); $pdf->Output("tmp_print".DIRECTORY_SEPARATOR.$_SESSION['user']['UserId'].".PDF"); ?>