Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('fpdf/fpdf.php');
- date_default_timezone_set('Asia/Jakarta');// change according timezone
- $currentTime = date( 'd-m-Y H:i:s A', time () );
- class myPDF extends FPDF
- {
- function Header()
- {
- // $this->Image("../images/kru.png",20,6,30,20);
- $this->SetFont('Arial','B',16);
- $this->Image('telkom.png',12,8,45);
- $this->Cell(220,10,'PT.TELEKOMUNIKASI INDONESIA, Tbk',0,1,'C');
- $this->SetFont('Arial','',13);
- $this->Cell(220,4,'Bidang Keahlian Sarana dan Prasarana',0,1,'C');
- $this->SetFont('Arial','',10);
- $this->Cell(220,7,'Jl. Raya Kaliabang Tengah - Bekasi Utara',0,1,'C');
- $this->SetFont('Arial','',10);
- $this->Cell(220,2,'Kota Bekasi Jawa Barat 17510',0,1,'C');
- $this->SetFont('Arial','',10);
- $this->Cell(220,7,'Telepon : 021-88988280',0,1,'C');
- $this->SetFont('Arial','',10);
- $this->Cell(220,3,'Email : Telkom_bks@gmail.com',0,1,'C');
- $this->SetFont('Arial','',10);
- $this->Cell(220,6,'Website : www.telkom.co.id',0,1,'C');
- $this->Line(8, 50, 202, 50);
- $this->Line(8, 51, 202, 51);
- $this->Ln(5);
- }
- function Footer()
- {
- $this->SetY(-17);
- $this->Line(10.5,280,196,280);
- $this->setFont('Arial','',8);
- $this->Cell(0,10,"Panitia Pelaksana ",0,0,'L');
- $this->Cell(0,10,'Halaman '.$this->PageNo().'/{nb}',0,0,'R');
- }
- function judul()
- {
- $this->SetFont('arial','','25');
- $this->Cell(200,10,'SURAT PERNYATAAN',0,1,'C');
- $this->SetFont('Arial','','13');
- $this->Ln(25);
- $this->SetFont('arial','','11.7');
- $this->cell(20,10,'',0,0,'C');
- $nama = $_GET['nama'];
- $koneksi = mysqli_connect("localhost","root","", "kerjaprojek");
- $pendaftaran = mysqli_query($koneksi, "SELECT * FROM pendaftaran WHERE nama='$nama'");
- $pendaftarann= mysqli_fetch_assoc($pendaftaran);
- $this->Ln(-10);
- $this->SetFont('arial','','15');
- $this->Cell(140,10,' Surat Keterangan Memasang Layanan Indihome',0,0,'C');
- $this->Ln(15);
- $this->cell(20,10,'',0,0,'L');
- $this->Cell(45,10," Nama : ",0,0,'L');
- $this->cell(80,10,$pendaftarann['nama'],0,0,'L');
- $this->Ln(9);
- $this->cell(20,10,'',0,0,'L');
- $this->Cell(45,10," Paket Layanan : ",0,0,'L');
- $this->cell(80,10,$pendaftarann['paket'],0,0,'L');
- $this->Ln(9);
- $this->cell(20,10,'',0,0,'L');
- $this->Cell(45,10," No Handphone : ",0,0,'L');
- $this->cell(62,10,$pendaftarann['nohp'],0,0,'L');
- $this->Ln(9);
- $this->cell(20,10,'',0,0,'L');
- $this->Cell(45,10," Alamat : ",0,0,'L');
- $this->cell(30,10,$pendaftarann['alamat'],0,0,'L');
- $this->Ln(15);
- $this->SetFont('arial','','15');
- $this->cell(10);
- $this->image("img2/".$pendaftarann['foto'],140,90,60,40);
- $this->Cell(170,10,'Menyatakan bahwa Saya bersedia Memasang Layanan',0,1,'C');
- $this->Cell(189,4,'Futsal Academy dengan kehadiran penuh sesuai dengan jadwal di',0,1,'C');
- $this->Cell(154,10,'tetapkan dan dapat mengikuti peraturan yang ada.',0,1,'C');
- $this->Ln(30);
- $this->SetFont('arial', '', '11');
- $this->Cell(175,9,"Bekasi :" .date ('d-M-Y'),0,1,'R');
- $this->Cell(170,9,'Mengetahui,',0,1,'R');
- $this->SetFont('arial', '', '11');
- $this->Cell(172,0,'Direktur CLUB',0,0,'R');
- $this->Cell(20,20,'',0,1);
- $this->SetFont('arial', 'U','11');
- $this->Cell(174,40,$pendaftarann['nama'],0,1,'R');
- }
- function headerTable()
- {
- }
- function viewTable($data)
- {
- }
- function knowby($name,$npk)
- {
- }
- }
- $pdf = new myPDF();
- $pdf->AliasNbPages();
- $pdf->AddPage('P','A4',0);
- $pdf->judul();
- $pdf->headerTable();
- $pdf->viewTable($data);
- $pdf->knowby($name,$npk);
- ob_end_clean();
- $pdf->output("pendaftaran Pemasangan Pelayanan Indihome", "I");
- ?>
- $connect = mysqli_connect($host, $user, $password, $database);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement