SHARE
TWEET

Untitled

a guest Feb 23rd, 2020 216 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. require('fpdf/fpdf.php');
  3. date_default_timezone_set('Asia/Jakarta');// change according timezone
  4.  
  5. $currentTime = date( 'd-m-Y H:i:s A', time () );
  6. class myPDF extends FPDF
  7. {
  8. function Header()
  9. {
  10.        // $this->Image("../images/kru.png",20,6,30,20);
  11.         $this->SetFont('Arial','B',16);
  12.  
  13.  
  14. $this->Image('telkom.png',12,8,45);
  15. $this->Cell(220,10,'PT.TELEKOMUNIKASI INDONESIA, Tbk',0,1,'C');
  16. $this->SetFont('Arial','',13);
  17. $this->Cell(220,4,'Bidang Keahlian Sarana dan Prasarana',0,1,'C');
  18. $this->SetFont('Arial','',10);
  19. $this->Cell(220,7,'Jl. Raya Kaliabang Tengah - Bekasi Utara',0,1,'C');
  20. $this->SetFont('Arial','',10);
  21. $this->Cell(220,2,'Kota Bekasi Jawa Barat 17510',0,1,'C');
  22. $this->SetFont('Arial','',10);
  23. $this->Cell(220,7,'Telepon : 021-88988280',0,1,'C');
  24. $this->SetFont('Arial','',10);
  25. $this->Cell(220,3,'Email : Telkom_bks@gmail.com',0,1,'C');
  26. $this->SetFont('Arial','',10);
  27. $this->Cell(220,6,'Website : www.telkom.co.id',0,1,'C');
  28.  
  29.  
  30.         $this->Line(8, 50, 202, 50);
  31.         $this->Line(8, 51, 202, 51);
  32.         $this->Ln(5);
  33. }
  34. function Footer()
  35. {
  36. $this->SetY(-17);
  37. $this->Line(10.5,280,196,280);
  38. $this->setFont('Arial','',8);
  39. $this->Cell(0,10,"Panitia Pelaksana ",0,0,'L');
  40. $this->Cell(0,10,'Halaman '.$this->PageNo().'/{nb}',0,0,'R');
  41.  
  42. }
  43.  
  44. function judul()
  45. {
  46. $this->SetFont('arial','','25');
  47. $this->Cell(200,10,'SURAT PERNYATAAN',0,1,'C');
  48. $this->SetFont('Arial','','13');
  49.  
  50.  
  51.         $this->Ln(25);
  52.         $this->SetFont('arial','','11.7');
  53.         $this->cell(20,10,'',0,0,'C');
  54. $nama = $_GET['nama'];
  55.         $koneksi = mysqli_connect("localhost","root","", "kerjaprojek");
  56. $pendaftaran = mysqli_query($koneksi, "SELECT * FROM pendaftaran WHERE nama='$nama'");
  57. $pendaftarann= mysqli_fetch_assoc($pendaftaran);
  58. $this->Ln(-10);
  59. $this->SetFont('arial','','15');
  60. $this->Cell(140,10,' Surat Keterangan Memasang Layanan Indihome',0,0,'C');
  61. $this->Ln(15);
  62. $this->cell(20,10,'',0,0,'L');
  63. $this->Cell(45,10,"    Nama               : ",0,0,'L');
  64. $this->cell(80,10,$pendaftarann['nama'],0,0,'L');
  65. $this->Ln(9);
  66. $this->cell(20,10,'',0,0,'L');
  67. $this->Cell(45,10,"    Paket Layanan : ",0,0,'L');
  68. $this->cell(80,10,$pendaftarann['paket'],0,0,'L');
  69. $this->Ln(9);
  70. $this->cell(20,10,'',0,0,'L');
  71. $this->Cell(45,10,"    No Handphone : ",0,0,'L');
  72. $this->cell(62,10,$pendaftarann['nohp'],0,0,'L');
  73. $this->Ln(9);
  74. $this->cell(20,10,'',0,0,'L');
  75. $this->Cell(45,10,"    Alamat              : ",0,0,'L');
  76. $this->cell(30,10,$pendaftarann['alamat'],0,0,'L');
  77. $this->Ln(15);
  78. $this->SetFont('arial','','15');
  79. $this->cell(10);
  80. $this->image("img2/".$pendaftarann['foto'],140,90,60,40);
  81. $this->Cell(170,10,'Menyatakan bahwa Saya bersedia Memasang Layanan',0,1,'C');
  82. $this->Cell(189,4,'Futsal Academy dengan kehadiran penuh sesuai dengan jadwal di',0,1,'C');
  83. $this->Cell(154,10,'tetapkan dan dapat mengikuti peraturan yang ada.',0,1,'C');
  84.  
  85.  
  86.  
  87. $this->Ln(30);
  88. $this->SetFont('arial', '', '11');
  89. $this->Cell(175,9,"Bekasi :" .date ('d-M-Y'),0,1,'R');
  90. $this->Cell(170,9,'Mengetahui,',0,1,'R');
  91. $this->SetFont('arial', '', '11');
  92. $this->Cell(172,0,'Direktur CLUB',0,0,'R');
  93.  
  94. $this->Cell(20,20,'',0,1);
  95.  
  96. $this->SetFont('arial', 'U','11');
  97. $this->Cell(174,40,$pendaftarann['nama'],0,1,'R');
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. }
  107. function headerTable()
  108. {
  109. }
  110. function viewTable($data)
  111. {
  112. }
  113. function knowby($name,$npk)
  114. {
  115. }
  116. }
  117.  
  118. $pdf = new myPDF();
  119. $pdf->AliasNbPages();
  120. $pdf->AddPage('P','A4',0);
  121. $pdf->judul();
  122. $pdf->headerTable();
  123. $pdf->viewTable($data);
  124. $pdf->knowby($name,$npk);
  125. ob_end_clean();
  126. $pdf->output("pendaftaran Pemasangan Pelayanan Indihome", "I");
  127. ?>
  128. $connect    = mysqli_connect($host, $user, $password, $database);
  129. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top