<?php
/* ******************************************************
    Sertifikat TOEFL Kursus
    Created By: ardiansyah@fmipa.unila.ac.id
    Created Date: 29/03/2020
    Last Edit: 03/04/2020
    
    ***************************************************** */
$data = array(
array('Gede Eka Putrawan, S.S., M.Hum.', 'Reviewer'),
array('Bambang Riadi, S.Pd., M.Pd.', 'Reviewer'),
array('Mohammad Wendy Trijaya, S.H., M.Hum.', 'Reviewer'),
array('Ardiansyah, S.Kom., M.Kom.', 'Panitia'),
array('Lasma Dwina RT, M.Pd.', 'Instruktur'),
array('Wirathama Hazera Putra, S.Pd., M.Pd.',	'Instruktur'),
array('Muhammad Fadli, S.Pd., M.Pd.','Instruktur'),
array('Mery Novita, S.Pd., M.Pd.', 'Instruktur'),
array('Sulastri, S.Pd., M.Pd.',	'Instruktur'),
array('Seniarika, S.Pd., M.Pd.', 'Instruktur'),
array('Mardiana, S.Pd.', 'Panitia'),
array('Sartina, S.Pd.',	'Panitia'),
array('Mulia, S.Pd.', 'Panitia'),
array('Nasip', 'Panitia'),
array('Guryati, S.S.', 'Panitia'),
array('Gandhi Irawan, S.Pd., M.Pd.', 'Panitia'),
array('Leni Apridawati, S.Pd., M.Pd.', 'Panitia'),
array('Aditia Arief, S.I.P.', 'Panitia'),
array('Fasih Kusumawati, S.Kom.', 'Panitia'),
array('Diana Rizanti, S.Pd.', 'Panitia'),
array('Fevi Susanti, A.Md.', 'Panitia'),
);

include "header.php";

$number = sprintf('%03d', (111 + $_GET['no']));

$spasi = 6;

$pdf = new PDF('P', 'mm', 'A4');

$pdf->setBgSertifikat('../images/sertifikat-toefl-kursus.jpg', 0);

$pdf->SetLeftMargin(30);
$pdf->SetTopMargin(70);
$pdf->AddFont('MonotypeCorsiva', '', 'MonotypeCorsiva.php');
$pdf->AddFont('ComicSans', '', 'COMIC.php');
$pdf->AddFont('Script', '', 'SCRIPTBL.php');

$pdf->AddPage();

$pdf->SetFont('MonotypeCorsiva', 'U', 24);
$pdf->Cell(150, 8, 'SERTIFIKAT', 0, 1, 'C');

$pdf->SetFont('', '', 12);
$pdf->Cell(150, $spasi, 'Nomor: '.$number.'/UN26.33/TU.00.08/2021', 0, 1, 'C');

$pdf->Ln();
$pdf->SetFont('ComicSans', '', 12);
$pdf->Cell(150, $spasi, 'diberikan kepada', 0, 1, 'C');

$pdf->Ln();
$pdf->SetFont('MonotypeCorsiva', '', 24);
$pdf->Cell(150, $spasi+2, $data[($_GET['no']-1)][0], 0, 1, 'C');

$pdf->Ln();
$pdf->SetFont('ComicSans', '', 12);
$pdf->Cell(150, $spasi, 'sebagai', 0, 1, 'C');

$pdf->Ln();
$pdf->SetFont('ComicSans', '', 18);
$pdf->Cell(150, $spasi+2, $data[($_GET['no']-1)][1], 0, 1, 'C');

$pdf->Ln();
$pdf->SetFont('ComicSans', '', 12);
$pdf->MultiCell(150, $spasi, 'pada Pelatihan Communication Skill Bahasa Inggris', 0, 'C');
$pdf->Ln();

    $pdf->SetFont('ComicSans', '', 16);
    $kategori = '"Test of English as a Foreign Language" (TOEFL)';
    $pdf->MultiCell(150, $spasi, $kategori, 0, 'C');

$pdf->SetFont('ComicSans', '', 16);
$pdf->MultiCell(150, $spasi, '&', 0, 'C');

    $pdf->SetFont('ComicSans', '', 15);
    $kategori = '"International English Language Testing System" (IELTS)';



$pdf->MultiCell(150, $spasi, $kategori, 0, 'C');
$pdf->Ln();
$pdf->SetFont('ComicSans', '', 12);
$pdf->MultiCell(150, $spasi, 'yang diselenggarakan oleh', 0, 'C');
$pdf->MultiCell(150, $spasi, 'UPT Bahasa Universitas Lampung', 0, 'C');
$pdf->MultiCell(150, $spasi, 'pada tanggal 8 Februari - 2 Maret 2021', 0, 'C');
$pdf->MultiCell(150, $spasi, 'dengan durasi 32 (tiga puluh dua) jam.', 0, 'C');



$pdf->Ln(12);
$pdf->SetX(110);
$qrY = $pdf->GetY();
$pdf->SetFont('ComicSans', '', 11);
$pdf->Write($spasi, 'Bandar Lampung, 2 Maret 2021');


$pdf->Ln();
$pdf->SetX(110);
$pdf->SetFont('ComicSans', '', 11);
$pdf->Write($spasi, 'Kepala UPT Bahasa,');

$pdf->Ln();
$pdf->Image('../images/ttd-pak-kirlan.png', 110, $pdf->GetY(), 50);


$pdf->Ln(13);
$pdf->SetX(110);
$pdf->Write($spasi, "Dr. Muhammad Sukirlan, MA");

$pdf->Ln();
$pdf->SetX(110);
$pdf->Write($spasi, 'NIP. 196412121990031003');

$pdf->SetAlpha(0.75);
$pdf->Image('../images/cap-upt-bahasa.png', 80, $pdf->GetY()-34, 45);
$pdf->SetAlpha(1);



$pdf->Image('../images/paraf-kasubag.png', 162, $pdf->GetY(), 2.5);

$pdf->Output('I', 'eSertifikatTOEFL-'.$ID.".pdf");

?>