-
Notifications
You must be signed in to change notification settings - Fork 31
/
flight_t_print.php
78 lines (58 loc) · 2.13 KB
/
flight_t_print.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
session_start();
$flightId = $_SESSION["flight_id"];
$ticketNum = $_SESSION["ticket_id"];
$getName = $_SESSION["fname"];
$getGen = $_SESSION["gender"];
$getEmail = $_SESSION["email"];
$getPhn = $_SESSION["phone"];
$getVehicle = $_SESSION["v_name"];
$getDOJ = $_SESSION["jdate"];
$getTime = $_SESSION["jtime"];
$getRoute = $_SESSION["route"];
$getSeats = $_SESSION["seatNum"];
$getCategory = $_SESSION["category"];
$getFare = $_SESSION["amount"];
$getPaymethod = $_SESSION["payment"];
date_default_timezone_set('Asia/Dhaka');
$date = date('d/m/Y h:i:s A', time());
$dateTime = "Print@: ".$date;
//////////////////////////
require ("fpdf/fpdf.php");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial","B",10);
$pdf->Cell(190,10,"Your Ticket Information || Flight Ticket",1,1,"C");
$pdf->Cell(95,10,"Ticket#: ",1,0,"C");
$pdf->Cell(95,10,$ticketNum,1,1,"C");
$pdf->Cell(95,10,"Flight#: ",1,0,"C");
$pdf->Cell(95,10,$flightId,1,1,"C");
$pdf->Cell(95,10,"Name: ",1,0,"C");
$pdf->Cell(95,10,$getName,1,1,"C");
$pdf->Cell(95,10,"Gender: ",1,0,"C");
$pdf->Cell(95,10,$getGen,1,1,"C");
$pdf->Cell(95,10,"Email: ",1,0,"C");
$pdf->Cell(95,10,$getEmail,1,1,"C");
$pdf->Cell(95,10,"Phone: ",1,0,"C");
$pdf->Cell(95,10,$getPhn,1,1,"C");
$pdf->Cell(95,10,"Vehicle Name: ",1,0,"C");
$pdf->Cell(95,10,$getVehicle,1,1,"C");
$pdf->Cell(95,10,"Date-Of-Journey: ",1,0,"C");
$pdf->Cell(95,10,$getDOJ,1,1,"C");
$pdf->Cell(95,10,"Time: ",1,0,"C");
$pdf->Cell(95,10,$getTime,1,1,"C");
$pdf->Cell(95,10,"Route: ",1,0,"C");
$pdf->Cell(95,10,$getRoute,1,1,"C");
$pdf->Cell(95,10,"Seat Number: ",1,0,"C");
$pdf->Cell(95,10,$getSeats,1,1,"C");
$pdf->Cell(95,10,"Seat Category: ",1,0,"C");
$pdf->Cell(95,10,$getCategory,1,1,"C");
$pdf->Cell(95,10,"Total Fare: ",1,0,"C");
$pdf->Cell(95,10,$getFare,1,1,"C");
$pdf->Cell(95,10,"Payment Getway: ",1,0,"C");
$pdf->Cell(95,10,$getPaymethod,1,1,"C");
$pdf->Cell(190,10,$dateTime,0,0,"R");
$pdf->Output();
//header('Location: index.php');
//exit();
?>