MOON
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.10
System: Linux vps.presagepowered.net 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: mckernan (512)
PHP: 5.4.10
Disabled: NONE
Upload Files
File: /home/mckernan/public_html/iJournal/includes/journal/StatementReportClass.php
<?php

    require(includePath() . 'fpdf.php');
    
    class PDF extends FPDF
    {
        public $col = 0;        // current print column
        public $y0;             // ordinate of column start
        public $y1;             // ordinate of column end

        
        public $title;
        public $ftrtitle;
        public $client;
        public $period;
        public $date;
        
        public $useLetterhead;
        public $useReportCover;
        
        
        function PDF($theClient, $thePeriod)
        {
            $this->title = '';
            $this->client = $theClient;
            $this->period = $thePeriod;
            $this->date = date('F j, Y');
            
            parent::FPDF('P', 'mm', 'letter');
            
            $this->SetAutoPageBreak(true, 20);
        }
        
        function SetReportTitle($theTitle)
        {
            $this->title = $theTitle;
        }

        function SetFtrTitle($theTitle)
        {
            $this->ftrtitle = $this->title;
        }
        
        // Page header
        function Header()
        {
            if ($this->useReportCover == true)
            {
                $this->SetTextColor(175, 175, 175);
                $this->SetRightMargin(20);
                $this->Ln(12);
                $this->SetFont('Arial','BI', 20);
                $this->Cell(0, 9, "Financial Statements & Analysis", 0, 1, "R");
                
                $this->SetDrawColor(235, 235, 235);
                $this->SetLineWidth(0.6);
                $this->Line(16, 32, 200, 32);
                
                $this->SetTextColor(0, 0, 0);
            } 
            elseif ($this->useLetterhead == true)
            {
                $this->SetTextColor(102, 102, 102);
            
                $this->SetXY(16, 15);
                
                $this->SetFont('Arial','BI', 16);
                $this->Cell(60, 6, "Anthony Marinaccio", 0, 1, 'C');
                $this->SetFont('Arial','BI',10);
                $this->SetX(16);
                $this->Cell(60, 4, "Tax Consultants - Accountants", 0, 0, 'C');
                
                $this->SetXY(141, 12);
                $this->SetFont('Arial','', 9);
                $this->MultiCell(0, 4, "- Income Tax Preparation & Planning" . "\n" .
                                       "- Business Consulting & Services" . "\n" .
                                       "- Payroll Preparation & Compliance" . "\n" .
                                       "- Accounting", 0, "L");
                
                $this->SetTextColor(0, 0, 0);
                
                $this->SetLineWidth(0.3);
                $this->Line(16, 29, 200, 29);
                
                $this->SetXY(18, 31);
                $this->SetFont('Arial','', 8);
                $this->MultiCell(100, 4, "400 E DeKalb Pike, King of Prussia PA 19406-2162" . "\n" .
                                        "610-265-9340", 0, "L");
                                        
                // line break
                $this->Ln(10);
                              
            }
            else
            {
                $this->SetTextColor(102, 102, 102);
                
                $this->SetXY(16, 12);
                
                $this->SetFont('Arial','BI',8);
                $this->Cell(38, 3, "Anthony Marinaccio", 0, 1, 'C');
                $this->SetFont('Arial','BI',7);
                $this->SetX(16);
                $this->Cell(38, 3, "Tax Consultants - Accountants", 0, 0, 'C');
                $this->SetTextColor(0, 0, 0);
                
                $this->SetXY(16, 11);
                $this->SetFont('Arial','B', 11);
                $this->Cell(0, 10, $this->title, 0, 0, 'R');
                $this->Line(16, 19, 200, 19);
                
                // line break
                $this->Ln(20);
            }
            
            
            $this->y0 = $this->GetY();
            $this->SetTextColor(0, 0, 0);
        }
        
        
        function SetCol($col)
        {
            // Set position at a given column
            $this->col = $col;
            $x = 20 + ($col*75) + ($col*20);
            $this->SetLeftMargin($x);
            
            if ($col == 0)
            {
                $this->SetX($x);
                $this->y0 = $this->GetY();
            }
            else
            {
                $this->SetXY($x, $this->y0);    
            }
        }
        
        function SetY1()
        {
            if ($this->y1 < $this->GetY())
            {
                $this->y1 = $this->GetY();
            }
        }
        
        
        // Page footer
        function Footer()
        {
            if ($this->useReportCover == true)
            {
                $this->useReportCover = false;
                                
                // divider line
                $this->Line(16, 261, 200, 261);
                
                $this->SetRightMargin(15);
                
                $this->SetTextColor(102, 102, 102);
                
                $this->SetXY(16, -18);
                
                $this->SetFont('Arial','BI',7);
                $this->Cell(38, 3, "Anthony Marinaccio", 0, 1, 'C');
                $this->SetFont('Arial','BI',6);
                $this->SetX(16);
                $this->Cell(38, 3, "Tax Consultants - Accountants", 0, 0, 'C');
                
                
                // confidential
                $this->SetXY(16, -18);
                $this->SetFont('Arial', 'B', 16);
                $this->SetTextColor(155, 155, 155);
                $this->Cell(0, 7, 'CONFIDENTIAL', 0, 0, 'R');
            }
            elseif ($this->useLetterhead == true)
            {
                $this->useLetterhead = false;   
            }
            else
            {
                // divider line
                $this->Line(16, 261, 200, 261);
                
                // confidential
                $this->SetXY(16, -18);
                $this->SetFont('Arial', 'B', 14);
                $this->SetTextColor(155, 155, 155);
                $this->Cell(40, 6, 'CONFIDENTIAL', 0, 0, 'L');
                
                // page number
                $this->SetFont('Arial','',6);
                $this->SetTextColor(0, 0, 0);
                $this->MultiCell(80, 2.5, 'Unauthorized possession, use or dissemination of this report' ."\n" . 
                                        'or the data contained herein is STRICLY PROHIBITED', 0, "C");
                
                // title / client
                $this->SetY(-17);
                $this->SetFont('Arial','',8);
                $this->Cell(0, 2, $this->ftrtitle, 0, 1, 'R');
                
                $this->SetXY(57, -13);
                $this->SetFont('Arial','',6);
                $this->Cell(80, 3, 'Please see attached Confidentiality Statement.', 0, 0, "C");
                
                $this->SetFont('Arial','',8);
                $this->Cell(0, 2, $this->date, 0, 0, 'R');
                
                $this->ftrtitle = $theTitle;
            }    
        }
    }
?>