Esempio n. 1
0
            if ($letterhead == "none") {
                // Leave blank space at top on all pages for pre-printed letterhead
                $curY = 20 + $summaryIntervalY * 3 + 25;
                $pdf->SetY($curY);
            } else {
                $curY = 20;
                $pdf->SetY(20);
            }
        }
        $pdf->SetFont('Times', '', 10);
        $pdf->FinishPage($curY, $fam_ID, $fam_Name, $fam_Address1, $fam_Address2, $fam_City, $fam_State, $fam_Zip, $fam_Country);
    }
    header('Pragma: public');
    // Needed for IE when using a shared SSL certificate
    if ($iPDFOutputType == 1) {
        $pdf->Output("TaxReport" . date("Ymd") . ".pdf", "D");
    } else {
        $pdf->Output();
    }
    // Output a text file
    // ##################
} elseif ($output == "csv") {
    // Settings
    $delimiter = ",";
    $eol = "\r\n";
    // Build headings row
    preg_match("/SELECT (.*) FROM /i", $sSQL, $result);
    $headings = explode(",", $result[1]);
    $buffer = "";
    foreach ($headings as $heading) {
        $buffer .= trim($heading) . $delimiter;
Esempio n. 2
0
    reset($totalFund);
    while ($FundTotal = current($totalFund)) {
        if (strlen(key($totalFund) > 22)) {
            $sfun_Name = substr(key($totalFund), 0, 21) . "...";
        } else {
            $sfun_Name = key($totalFund);
        }
        $pdf->SetXY(20, $curY);
        $pdf->Cell(45, $summaryIntervalY, $sfun_Name);
        $pdf->Cell(25, $summaryIntervalY, number_format($FundTotal, 2, '.', ','), 0, 0, "R");
        $curY += $summaryIntervalY;
        $page = $pdf->PageBreak($page);
        next($totalFund);
    }
    $pdf->FinishPage($page);
    $pdf->Output("DepositReport-" . date("Ymd-Gis") . ".pdf", "D");
    // Output a text file
    // ##################
} elseif ($output == "csv") {
    // Settings
    $delimiter = ",";
    $eol = "\r\n";
    // Build headings row
    eregi("SELECT (.*) FROM ", $sSQL, $result);
    $headings = explode(",", $result[1]);
    $buffer = "";
    foreach ($headings as $heading) {
        $buffer .= trim($heading) . $delimiter;
    }
    // Remove trailing delimiter and add eol
    $buffer = substr($buffer, 0, -1) . $eol;