+ $this->Text($companyCol, $this->company['coy_name']);
+
+ // Dimension 1 - optional
+ // - only print if available and not blank
+ if (count($this->params) > 3)
+ if ($this->params[3]['from'] != '')
+ {
+ $this->NewLine(1, 0, $this->fontSize + 2);
+ $str = $this->params[3]['text'] . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = $this->params[3]['from'];
+ $this->Text($headerFieldCol, $str, $companyCol);
+ }
+
+ // Dimension 2 - optional
+ // - only print if available and not blank
+ if (count($this->params) > 4)
+ if ($this->params[4]['from'] != '')
+ {
+ $this->NewLine(1, 0, $this->fontSize + 2);
+ $str = $this->params[4]['text'] . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = $this->params[4]['from'];
+ $this->Text($headerFieldCol, $str, $companyCol);
+ }
+
+ // Tags - optional
+ // if present, it's an array of tag names
+ if (count($this->params) > 5)
+ if ($this->params[5]['from'] != '')
+ {
+ $this->NewLine(1, 0, $this->fontSize + 2);
+ $str = $this->params[5]['text'] . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = '';
+ for ($i = 0; $i < count($this->params[5]['from']); $i++)
+ {
+ if($i != 0)
+ $str .= ', ';
+ $str .= $this->params[5]['from'][$i];
+ }
+ $this->Text($headerFieldCol, $str, $companyCol);
+ }
+
+ // Report Date - time period covered
+ // - can specify a range, or just the end date (and the report contents
+ // should make it obvious what the beginning date is)
+ $this->NewLine(1, 0, $this->fontSize + 2);
+ $str = _("Report Period") . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = '';
+ if (isset($this->params[1]['from']) && $this->params[1]['from'] != '')
+ $str = $this->params[1]['from'] . ' - ';
+ $str .= $this->params[1]['to'];
+ $this->Text($headerFieldCol, $str, $companyCol);
+
+ // Turn off Bold
+ $this->Font();
+
+ $this->NewLine(1, 0, $this->fontSize + 1);
+
+ // Make the remaining report headings a little less important
+ $this->fontSize = HEADER2_FONT_SIZE;
+
+ // Timestamp of when this copy of the report was generated
+ $str = _("Generated At") . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = Today() . ' ' . Now();
+ if ($this->company['time_zone'])
+ $str .= ' ' . date('O') . ' GMT';
+ $this->Text($headerFieldCol, $str, $companyCol);
+
+ // Name of the user that generated this copy of the report
+ $this->NewLine(1, 0, $this->fontSize + 1);
+ $str = _("Generated By") . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $str = $this->user;
+ $this->Text($headerFieldCol, $str, $companyCol);
+
+ // Display any user-generated comments for this copy of the report
+ if ($this->params[0] != '') // Comments
+ {
+ $this->NewLine(1, 0, $this->fontSize + 1);
+ $str = _("Comments") . ':';
+ $this->Text($this->leftMargin, $str, $headerFieldCol);
+ $this->Font('B');
+ $this->Text($headerFieldCol, $this->params[0], $companyCol, 0, 0, 'left', 0, 0, $link=NULL, 1);
+ $this->Font();
+ }
+
+ // Add page numbering to header if footer is turned off
+ if (!$this->footerEnable)