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/file/ReportClass.php
<?php

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

        
        public $title;
        public $date;
        public $active;
        
        
        function PDF($showActive)
        {
            if ($showActive == 1)
            {
                $this->title = 'Active Clients Report';
            }
            else
            {
                $this->title = 'Inactive Clients Report';
            }
            
            $this->date = date('M j Y @ g:ia');
            
            parent::FPDF('P', 'mm', 'letter');
            
            $this->SetAutoPageBreak(true, 20);
        }
        
        // Page header
        function Header()
        {
            // report title
            $this->SetXY(16, 12);
                        
            
            $this->SetTextColor(102, 102, 102);
            $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',12);
            $this->Cell(0, 10, $this->title, 0, 0, 'R');
            $this->Line(16, 19, 206, 19);
            
            
            // line break
            $this->Ln(22);
                        
            $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);
            $this->SetX($x);
        }
        
        function AcceptPageBreak()
        {
            // Method accepting or not automatic page break
            if($this->col<2)
            {
                // Go to next column
                $this->SetCol($this->col+1);
                // Set ordinate to top
                $this->SetY($this->y0);
                // Keep on page
                return false;
            }
            else
            {
                // Go back to first column
                $this->SetCol(0);
                // Page break
                return true;
            }
        }
        
    
        // Page footer
        function Footer()
        {
            // divider line
            $this->Line(16, 261, 206, 261);
            
            // confidential
            $this->SetXY(16, -18);
            $this->SetFont('Arial', 'B', 14);
            $this->SetTextColor(155, 155, 155);
            $this->Cell(60, 6, 'CONFIDENTIAL', 0, 0, 'L');
            
            // page number
            $this->SetFont('Arial','I',7);
            $this->SetTextColor(0, 0, 0);
            $this->MultiCell(60, 3, $this->date . "\n" . $this->PageNo() . ' of {nb}', 0, "C");
            
            // title
            $this->SetY(-17);
            $this->SetFont('Arial','',8);
            $this->Cell(0, 2, $this->title, 0, 1, 'R');
        }
    }
?>