1 <?php |
1 <?php |
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
|
4 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/constants.php'); |
4 require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); |
5 require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); |
5 |
6 |
6 |
7 |
7 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
8 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
8 if (! $link) { |
9 if (! $link) { |
58 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); |
59 $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); |
59 } |
60 } |
60 |
61 |
61 function TableGlobal($row) { |
62 function TableGlobal($row) { |
62 /* 2 Columns */ |
63 /* 2 Columns */ |
63 $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); |
64 global $recipetype; |
64 $vul = $this->w - $this->rMargin - $this->lMargin - 120; |
65 $vul = $this->w - $this->rMargin - $this->lMargin - 120; |
65 $cMargin=$this->cMargin; |
66 $cMargin=$this->cMargin; |
66 $this->cMargin=2; |
67 $this->cMargin=2; |
67 $this->TableX=$this->lMargin; |
68 $this->TableX=$this->lMargin; |
68 $this->SetFont('Helvetica','B',9); |
69 $this->SetFont('Helvetica','B',9); |
98 global $total_fermentables; |
99 global $total_fermentables; |
99 global $pSugar; |
100 global $pSugar; |
100 global $pCara; |
101 global $pCara; |
101 global $colorw; |
102 global $colorw; |
102 global $preboil_sg; |
103 global $preboil_sg; |
103 $added = array( 'Maischen', 'Koken 10 min', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); |
104 global $added; |
104 $ftype = array( 'Mout', 'Suiker', 'Vloeibaar extract', 'Droog extract', 'Ongemout graan' ); |
105 global $fermentabletype; |
105 $mtype = array( 'Basismout', 'Geroosterde mout', 'Cara- of crystalmout', 'Geƫeste mout', 'Zuurmout', 'Speciale mout', 'Geen mout' ); |
106 global $graintype; |
106 $vul = $this->w - $this->rMargin - $this->lMargin - 125; |
107 $vul = $this->w - $this->rMargin - $this->lMargin - 125; |
107 $this->Ln(); |
108 $this->Ln(); |
108 $this->AddCol($vul,'Mout, granen en suikers','L'); |
109 $this->AddCol($vul,'Mout, granen en suikers','L'); |
109 $this->AddCol(15,'Procent','R'); |
110 $this->AddCol(15,'Procent','R'); |
110 $this->AddCol(15,'Opbr.','R'); |
111 $this->AddCol(15,'Opbr.','R'); |
138 $pSugar += $percent; |
139 $pSugar += $percent; |
139 if ($item['f_graintype'] == 2) // Crystal |
140 if ($item['f_graintype'] == 2) // Crystal |
140 $pCara += $percent; |
141 $pCara += $percent; |
141 |
142 |
142 if ($item['f_type'] == 0) |
143 if ($item['f_type'] == 0) |
143 $soort = iconv('UTF-8','windows-1252',$mtype[$item['f_graintype']]); |
144 $soort = iconv('UTF-8','windows-1252',$graintype[$item['f_graintype']]); |
144 else |
145 else |
145 $soort = iconv('UTF-8','windows-1252',$ftype[$item['f_type']]); |
146 $soort = iconv('UTF-8','windows-1252',$fermentabletype[$item['f_type']]); |
146 |
147 |
147 $cost = $amount * $costkg; |
148 $cost = $amount * $costkg; |
148 $cost_fermentables += $cost; |
149 $cost_fermentables += $cost; |
149 $total_fermentables += $amount; |
150 $total_fermentables += $amount; |
150 /* Calculate the amount of sugars */ |
151 /* Calculate the amount of sugars */ |
186 function TableHops($row) { |
187 function TableHops($row) { |
187 global $total_hops; |
188 global $total_hops; |
188 global $total_ibus; |
189 global $total_ibus; |
189 global $cost_hops; |
190 global $cost_hops; |
190 global $preboil_sg; |
191 global $preboil_sg; |
191 $hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat', 'Cryo Hop' ); |
192 global $hopform; |
192 $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); |
193 global $hopuse; |
193 $vul = $this->w - $this->rMargin - $this->lMargin - 122; |
194 $vul = $this->w - $this->rMargin - $this->lMargin - 122; |
194 $this->Ln(); |
195 $this->Ln(); |
195 $this->AddCol($vul,'Hop','L'); |
196 $this->AddCol($vul,'Hop','L'); |
196 $this->AddCol(15,'Alpha','R'); |
197 $this->AddCol(15,'Alpha','R'); |
197 $this->AddCol(12,'IBU','R'); |
198 $this->AddCol(12,'IBU','R'); |
257 } |
258 } |
258 |
259 |
259 function TableYeasts($row) { |
260 function TableYeasts($row) { |
260 global $cost_yeasts; |
261 global $cost_yeasts; |
261 global $svg; |
262 global $svg; |
262 $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); |
263 global $yeastform; |
263 $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); |
264 global $yeastuse; |
264 $vul = $this->w - $this->rMargin - $this->lMargin - 110; |
265 $vul = $this->w - $this->rMargin - $this->lMargin - 110; |
265 $this->Ln(); |
266 $this->Ln(); |
266 $this->AddCol($vul,'Gist','L'); |
267 $this->AddCol($vul,'Gist','L'); |
267 $this->AddCol(15,'Attn','R'); |
268 $this->AddCol(15,'Attn','R'); |
268 $this->AddCol(25,'Soort','L'); |
269 $this->AddCol(25,'Soort','L'); |
315 $this->Ln(); |
316 $this->Ln(); |
316 } |
317 } |
317 |
318 |
318 function TableMiscs($row) { |
319 function TableMiscs($row) { |
319 global $cost_miscs; |
320 global $cost_miscs; |
320 $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); |
321 global $misctype; |
321 $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); |
322 global $miscuse; |
322 $vul = $this->w - $this->rMargin - $this->lMargin - 95; |
323 $vul = $this->w - $this->rMargin - $this->lMargin - 95; |
323 if ($this->GetY() > 200) |
324 if ($this->GetY() > 200) |
324 $this->AddPage(); |
325 $this->AddPage(); |
325 else |
326 else |
326 $this->Ln(); |
327 $this->Ln(); |