- $this->row = $adrline;
- $this->Text($ccol2 + 30, $this->company['phone'], $mcol);
- $this->NewLine();
- $this->Text($ccol2 + 30, $this->company['fax'], $mcol);
- $this->NewLine();
- $this->Text($ccol2 + 30, $this->company['email'], $mcol);
- // fetch this later
- $this->row = $adrline;
- $this->Text($mcol, $bankaccount['bank_name'], $mcol2);
- $adr = explode("\n", $bankaccount['bank_address']);
- for ($i = 0; $i < count($adr); $i++)
- {
- $this->NewLine();
- $this->Text($mcol, $adr[$i], $mcol2);
+ $count = count($this->headers);
+ for ($i = 0; $i < $count; $i++)
+ $this->TextCol($i, $i + 1, $this->headers[$i], $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1);
+ $this->Font();
+
+ $this->NewLine(2);
+
+ // restore user-specified draw color
+ $this->SetDrawColor($oldDrawColor[0], $oldDrawColor[1], $oldDrawColor[2]);
+ }
+
+ /**
+ * Format a numeric string date into something nicer looking.
+ *
+ * @param string $date Date string to be formatted.
+ * @param int $input_format Format of the input string. Possible values are:<ul><li>0: user's default (default)</li></ul>
+ * @param int $output_format Format of the output string. Possible values are:<ul><li>0: Month (word) Day (numeric), 4-digit Year - Example: January 1, 2000 (default)</li><li>1: Month 4-digit Year - Example: January 2000</li><li>2: Month Abbreviation 4-digit Year - Example: Jan 2000</li></ul>
+ * @access public
+ */
+ function DatePrettyPrint($date, $input_format = 0, $output_format = 0)
+ {
+ if ($date != '')
+ {
+ $date = date2sql($date);
+ $year = (int) (substr($date, 0, 4));
+ $month = (int) (substr($date, 5, 2));
+ $day = (int) (substr($date, 8, 2));
+ if ($output_format == 0)
+ return(date('F j, Y', mktime(12, 0, 0, $month, $day, $year)));
+ elseif ($output_format == 1)
+ return(date('F Y', mktime(12, 0, 0, $month, $day, $year)));
+ elseif ($output_format == 2)
+ return(date('M Y', mktime(12, 0, 0, $month, $day, $year)));