www/rec_print.php

changeset 233
14a84d42031d
parent 232
daf2d9d6fa18
child 240
a85c1d4c4d12
equal deleted inserted replaced
232:daf2d9d6fa18 233:14a84d42031d
28 $pCara = 0; 28 $pCara = 0;
29 $svg = 77; 29 $svg = 77;
30 $colorw = 0; 30 $colorw = 0;
31 $total_ibus = 0; 31 $total_ibus = 0;
32 $preboil_sg = 0; 32 $preboil_sg = 0;
33 date_default_timezone_set('Europe/Amsterdam');
34 $prdate = date(DATE_RFC2822);
33 35
34 class PDF_MySQL_Table extends FPDF 36 class PDF_MySQL_Table extends FPDF
35 { 37 {
36 protected $ProcessingTable=false; 38 protected $ProcessingTable=false;
37 protected $aCols=array(); 39 protected $aCols=array();
56 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); 58 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align);
57 } 59 }
58 60
59 function TableGlobal($row) { 61 function TableGlobal($row) {
60 /* 2 Columns */ 62 /* 2 Columns */
63 $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' );
61 $vul = $this->w - $this->rMargin - $this->lMargin - 120; 64 $vul = $this->w - $this->rMargin - $this->lMargin - 120;
62 $cMargin=$this->cMargin; 65 $cMargin=$this->cMargin;
63 $this->cMargin=2; 66 $this->cMargin=2;
64 $this->TableX=$this->lMargin; 67 $this->TableX=$this->lMargin;
65 $this->SetFont('Helvetica','B',9); 68 $this->SetFont('Helvetica','B',9);
71 $this->SetFont('Helvetica','',9); 74 $this->SetFont('Helvetica','',9);
72 $this->SetFillColor(210,245,255); 75 $this->SetFillColor(210,245,255);
73 76
74 $this->SetX($this->TableX); 77 $this->SetX($this->TableX);
75 $this->Cell(35,5,'Type',0,0,'L',true); 78 $this->Cell(35,5,'Type',0,0,'L',true);
76 $this->Cell(25,5,$row['type'],0,0,'L',true); 79 $this->Cell(25,5,$recipetype[$row['type']],0,0,'L',true);
77 $this->Cell($vul,5,'',0,0,'L',false); 80 $this->Cell($vul,5,'',0,0,'L',false);
78 $this->Cell(35,5,'Batch grootte',0,0,'L',true); 81 $this->Cell(35,5,'Batch grootte',0,0,'L',true);
79 $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true); 82 $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true);
80 $this->Ln(); 83 $this->Ln();
81 84
448 451
449 452
450 class PDF extends PDF_MySQL_Table { 453 class PDF extends PDF_MySQL_Table {
451 function Header() { 454 function Header() {
452 global $row; 455 global $row;
456 global $prdate;
453 $this->Image('images/logo.png',10,6,30); 457 $this->Image('images/logo.png',10,6,30);
454 // Title 458 // Title
455 $this->SetFont('Helvetica','B',18); 459 $this->SetFont('Helvetica','B',18);
456 $this->SetX(45); 460 $this->SetX(45);
457 $this->Cell(0,8,$row['name'],1,1,'L'); 461 $this->Cell(0,8,$row['name'],0,1,'L');
458 $this->Ln(20); 462 $this->Ln(1);
463 $this->SetFont('Helvetica','',10);
464 $this->SetX(45);
465 $this->Cell(17,5,'Datum:',0,0,'L');
466 $this->Cell(0,5,$prdate,0,1,'L');
467 $this->SetX(45);
468 $this->Cell(17,5,'Styl:',0,0,'L');
469 $this->Cell(0,5,$row['st_name'],0,1,'L');
470 $this->Ln(7);
459 // Ensure table header is printed 471 // Ensure table header is printed
460 parent::Header(); 472 parent::Header();
461 } 473 }
462 } 474 }
463 475

mercurial