Commit f02b8744 by Visgha Olivia

Upload New File

parent 4a12ad68
<?php
require_once 'common/database.php';
$id_akun = $_SESSION['id_akun'];
$id_paket = $_GET['kode'];
$query = "SELECT no_kursi, tiket.kode_paket,tiket.id_akun,tanggal
,nama_paket,deskripsi,harga,id_tiket,gambar FROM tiket INNER JOIN
paket WHERE paket.id_paket = tiket.kode_paket AND
id_akun = '$id_akun' AND tiket.kode_paket = '$id_paket'";
$sql = ExecuteQuery($query);
$data = array();
$row = mysqli_fetch_assoc($sql);
$nama_paket = $row['nama_paket'];
$tanggal = $row['tanggal'];
$id_akun = $row['id_akun'];
$id_paket = $row['kode_paket'];
$no_kursi = $row['no_kursi'];
$gambar = $row['gambar'];
$harga = $row['harga'];
$data_gambar = "uploads/$gambar";
require_once ("FPDF_assets/fpdf.php");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFillColor(199, 118, 130);
$pdf->SetTextColor(255);
$pdf->SetFont('Arial','I',30);
$pdf->Cell(190,18,"Paket ".$nama_paket,'0',1,'C',true);
$pdf->SetDrawColor(0,0,0);
$pdf->SetFont('Arial','','16');
$pdf->SetTextColor(0);
$pdf->SetFillColor(241, 175, 180); //warna background
$pdf->Cell(70,10 ,"Kode Paket ", '0', 0, 'L',true);
$pdf->SetFillColor(241, 175, 180);
$pdf->Cell(120,10 ," : ".$id_paket, '0', 1, 'L',true);
$pdf->SetFillColor(241, 175, 180); //warna background
$pdf->Cell(70,10 ,"Tanggal Paket ", '0', 0, 'L',true);
$pdf->SetFillColor(241, 175, 180);
$pdf->Cell(120,10 ," : ".$tanggal, '0', 1, 'L',true);
$pdf->SetFillColor(241, 175, 180); //warna background
$pdf->Cell(70,10 ,"Kode Pemesan ", '0', 0, 'L',true);
$pdf->SetFillColor(241, 175, 180);
$pdf->Cell(120,10 ," : ".$id_akun, '0', 1, 'L',true);
$pdf->SetFillColor(241, 175, 180); //warna background
$pdf->Cell(70,10 ,"No Kursi ", '0', 0, 'L',true);
$pdf->SetFillColor(241, 175, 180);
$pdf->Cell(120,10 ," : ".$no_kursi, '0', 1, 'L',true);
$pdf->Image($data_gambar,"145","35","40","30");
$pdf->SetFillColor(0,0,0);
$pdf->SetTextColor(255);
$pdf->SetFont('Arial','B','28');
$pdf->SetFillColor(199, 118, 130);
$pdf->Cell(190,20,"Harga : Rp.".$harga,'0',1,'C',true);
$pdf->Output();
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment