diff -r daf2d9d6fa18 -r 14a84d42031d www/rec_print.php --- a/www/rec_print.php Sat Feb 02 14:57:41 2019 +0100 +++ b/www/rec_print.php Sat Feb 02 17:07:22 2019 +0100 @@ -30,6 +30,8 @@ $colorw = 0; $total_ibus = 0; $preboil_sg = 0; +date_default_timezone_set('Europe/Amsterdam'); +$prdate = date(DATE_RFC2822); class PDF_MySQL_Table extends FPDF { @@ -58,6 +60,7 @@ function TableGlobal($row) { /* 2 Columns */ + $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); $vul = $this->w - $this->rMargin - $this->lMargin - 120; $cMargin=$this->cMargin; $this->cMargin=2; @@ -73,7 +76,7 @@ $this->SetX($this->TableX); $this->Cell(35,5,'Type',0,0,'L',true); - $this->Cell(25,5,$row['type'],0,0,'L',true); + $this->Cell(25,5,$recipetype[$row['type']],0,0,'L',true); $this->Cell($vul,5,'',0,0,'L',false); $this->Cell(35,5,'Batch grootte',0,0,'L',true); $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true); @@ -450,12 +453,21 @@ class PDF extends PDF_MySQL_Table { function Header() { global $row; + global $prdate; $this->Image('images/logo.png',10,6,30); // Title $this->SetFont('Helvetica','B',18); $this->SetX(45); - $this->Cell(0,8,$row['name'],1,1,'L'); - $this->Ln(20); + $this->Cell(0,8,$row['name'],0,1,'L'); + $this->Ln(1); + $this->SetFont('Helvetica','',10); + $this->SetX(45); + $this->Cell(17,5,'Datum:',0,0,'L'); + $this->Cell(0,5,$prdate,0,1,'L'); + $this->SetX(45); + $this->Cell(17,5,'Styl:',0,0,'L'); + $this->Cell(0,5,$row['st_name'],0,1,'L'); + $this->Ln(7); // Ensure table header is printed parent::Header(); }