-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpnrcheck.php
183 lines (133 loc) · 8.56 KB
/
pnrcheck.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?php
session_start();
error_reporting(0);
$con=mysqli_connect("localhost","root","","airline_reservation");
$q=mysqli_query($con,"select pnr,flight_no,journey_date, class, booking_status, no_of_passengers, lounge_access, priority_checkin, insurance, payment_id, customer_id from ticket_details where pnr='".$_SESSION['user']."'");
$n= mysqli_fetch_assoc($q);
$stname= $n['pnr'];
$flight_no= $n['flight_no'];
$journey_date= $n['journey_date'];
$class= $n['class'];
$booking_status= $n['booking_status'];
$no_of_passengers= $n['no_of_passengers'];
$lounge_access= $n['lounge_access'];
$priority_checkin= $n['priority_checkin'];
$insurance= $n['insurance'];
$payment_id= $n['payment_id'];
$customer_id= $n['customer_id'];
$id=$_SESSION['user'];
$result = mysqli_query($con,"SELECT * FROM passengers WHERE pnr='".$_SESSION['user']."'");
while($row = mysqli_fetch_array($result))
{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" href="bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/bootstrap-theme.min.css">
<script src="bootstrap/jquery.min.js"></script>
<script src="bootstrap/bootstrap.min.js"></script>
<link type="text/css" rel="stylesheet" href="css/admform.css"></link>
<script type="text/javascript">
function printpage()
{
var printButton = document.getElementById("print");
printButton.style.visibility = 'hidden';
window.print()
printButton.style.visibility = 'visible';
}
</script>
</head>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<center><h3>Airpot Authority of India</h3></center>
<center><h2>Boarding Pass - Flight Reservation Slip</h2></center><h4><?php echo $booking_status;?></h4>
<br>
<br>
<br>
<br>
<td style="width:4%;"> <font style="font-family: Verdana;">PNR : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $id;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">Flight No : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $flight_no;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">Date of journey : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $journey_date;?> </td><br>
<td style="width:4%;"> <font style="font-family: Verdana;">Class : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $class;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">Payment ID : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $payment_id;?> </td><br>
<td style="width:4%;"> <font style="font-family: Verdana;">Lounge Access : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $lounge_access;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">Priority Checkin : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $priority_checkin;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">Insurance : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $insurance;?> </td><br>
<td style="width:4%;"> <font style="font-family: Verdana;">Booked By (Username) : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $customer_id;?> </td><br>
<td style="width:4%;"> <font style="font-family: Verdana;">Status: </font> </td>
<td style="width:58%;" colspan="3"> <?php echo $booking_status;?> </td>                                  
<td style="width:4%;"> <font style="font-family: Verdana;">No. of Passengers: </font> </td>
<td style="width:58%;" colspan="3"> <?php echo $no_of_passengers;?> </td>
<body>
</div>
<center><img src='images/maxx.jpg' class='img-thumbnail' width='1200px' style='height:80px;'></center>";
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<center> <table class="table table-bordered" style="font-family: Verdana">
<center><font style="font-family:Verdana; font-size:18px;">
</font></center>
<br>
<br>
<center><font style="font-family:Arial Black; font-size:20px;">
</font></center>
</td>
<td colspan="2" width="3%" >
<?php
$picfile_path ='images/';
$result1 = mysqli_query($con,"SELECT * FROM passengers where ='".$_SESSION['user']."'");
while($row1 = mysqli_fetch_array($result1))
{
$picsrc=$picfile_path.$row1['s_pic'];
echo "<center><img src='images/shutterock_2.jpg' class='img-thumbnail' width='180px' style='height:180px;'></center>";
echo"<div>";
}
?>
</td>
</tr>
<tr>
<td style="width:4%;"> <font style="font-family: Verdana;">PNR : </font> </td>
<td style="width:8%;" colspan="3"> <?php echo $stname;?> </td>
</tr>
<tr>
<td> <font style="font-family: Verdana;">Passenger No : </font> </td>
<td colspan="3"> <?php echo ''. $row[0]. ' ' ?>
</tr>
<tr>
<td > <font style="font-family: Verdana;"> Name</font> </td>
<td colspan="3"> <?php echo ''. $row[2]. ' ' ?><br>
<?php echo ' Age - '.$row[3] ?></td>
</tr>
<tr>
<td><font style="font-family: Verdana;"> Gender</font></td>
<td colspan="3"><?php echo $row[4] ?> </td>
</tr>
<tr>
<td> <font style="font-family: Verdana;">Meail Choice</font></td>
<td> <?php echo $row[5] ?></td>
<td><font style="font-family: Verdana;"> Frequent Flier No. (If any)</font></td>
<td> <?php echo $row[6] ?> </td>
</tr>
</table></center>
</div>
</div>
</div>
<?php
}
?>
<center> <input type="submit" id="print" class="toggle btn btn-primary" value="Print" onclick="printpage();"></center>
<CENTER><a href="pnr.php">Check other PNR</a></center>
</body>
</html>
</body>
</html>