Example #1
0
function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
    include_once "../fpdf.php";
    require_once "../phplot.php";
    $lbr = 190;
    $arrStatusAplikan = array();
    $s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $arrStatusAplikan[] = $w['StatusAplikanID'];
    }
    $arrGelombang = array();
    getArrayGelombang($arrGelombang, $tahun);
    // Buat Graph dan dimasukkan ke file dulu
    $piepath = '../tmp/data_fakta_pmb_pie_graph.png';
    $barpath = '../tmp/data_fakta_pmb_bar_graph.png';
    BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
    BuatBarGraph($barpath, $prevtahun, $tahun, $arrStatusAplikan, $urutan, $gel);
    // *** Cetak ***
    $pdf = new FPDF('L', 'mm', 'A4');
    $pdf->SetAutoPageBreak(true, 5);
    $pdf->SetTitle("DATA & FAKTA PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
    $pdf->AddPage('L');
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrGelombang, $pdf);
    TampilkanGraph($piepath, 30, 75, 96, 64, $pdf);
    TampilkanGraph($barpath, 185, 75, 96, 64, $pdf);
    TampilkanSumberInformasi(60, 145, $prevtahun, $tahun, $urutan, $gel, $pdf);
    TampilkanRatioPresenter(185, 145, $arrStatusAplikan, $tahun, $urutan, $gel, $pdf);
    $pdf->Output();
}
function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
    include_once "../fpdf.php";
    require_once "../phplot.php";
    $lbr = 190;
    // Buat Graph dan dimasukkan ke file dulu
    $piepath = '../tmp/data_fakta_pmb_pie_graph.png';
    BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
    // *** Cetak ***
    $pdf = new FPDF('P', 'mm', 'A4');
    $pdf->SetTitle("LAPORAN SUMBER INFORMASI PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
    $pdf->AddPage('P');
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanGraph($piepath, 20, 30, 144, 96, $pdf);
    TampilkanSumberInformasi(30, 150, $prevtahun, $tahun, $urutan, $gel, $pdf);
    $pdf->Output();
}