| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2b.hellogtx.com/application/views/scripts/flight/ |
Upload File : |
<?php
$baseUrl = $this->baseUrl;
$B2BType = $this->B2BType;
$CurrencyRate = $this->CurrencyRate;
$CurrencyTitle = $this->CurrencyTitle;
$MasterAgencyLogo = $this->MasterAgencyLogo;
$getAgencyData = $this->getAgencyData;
$MasterAgencyData = $this->MasterAgencyData;
$AgentAddress = $this->AgentAddress;
$FlightBookingData = $this->FlightBookingData;
$ForCustomerSession = $this->ForCustomerSession;
$SelectedBaggSessionNew = $this->SelectedBaggSessionNew;
$SelectedMealSessionNew = $this->SelectedMealSessionNew;
$selectedSeatSession = $this->selectedSeatSession;
$API_Response_Ticket = $this->FlightBookingTicketArr;
$Email = isset($this->Email) ? $this->Email : false;
$withprice = isset($this->withprice) ? $this->withprice : 0;
$getSupportContactData = $this->getSupportContactData__;
$supportEmail = (isset($getSupportContactData['EmailId']) && !empty($getSupportContactData['EmailId'])) ? trim($getSupportContactData['EmailId']) : $getAgencyData['EmailId'];;
$supportContactNo = (isset($getSupportContactData['ContactNo1']) && !empty($getSupportContactData['ContactNo1'])) ? trim($getSupportContactData['ContactNo1']) : $getAgencyData['Contacts'];;
$supportcountrycode = (isset($getSupportContactData['countrycode']) && !empty($getSupportContactData['countrycode'])) ? trim($getSupportContactData['countrycode']) : $getAgencyData['countrycode'];;
$sessionFlightSearchParams = $post = $this->sessionFlightSearchParams;
$interNationalSearch = $sessionFlightSearchParams['interNationalSearch'];
$FlightTraceId = $sessionFlightSearchParams['FlightTraceId'];
$source = isset($sessionFlightSearchParams['source']) ? $sessionFlightSearchParams['source'][0] : '';
$destination = isset($sessionFlightSearchParams['destination']) ? $sessionFlightSearchParams['destination'][0] : '';
$departure_date = isset($sessionFlightSearchParams['departure_date']) ? $sessionFlightSearchParams['departure_date'][0] : date('d/m/Y');
$strDepatureDate = isset($sessionFlightSearchParams['strDepatureDate']) ? $sessionFlightSearchParams['strDepatureDate'][0] : date('d M Y');
$strReturnDate = isset($sessionFlightSearchParams['strReturnDate']) ? $sessionFlightSearchParams['strReturnDate'] : '';
$return_date = isset($sessionFlightSearchParams['return_date']) ? $sessionFlightSearchParams['return_date'][0] : '';
$source_city = isset($sessionFlightSearchParams['source_city']) ? $sessionFlightSearchParams['source_city'][0] : '';
$ContSysId_1 = isset($sessionFlightSearchParams['ContSysId']) ? $sessionFlightSearchParams['ContSysId'][0] : '';
$destination_city = isset($sessionFlightSearchParams['destination_city']) ? $sessionFlightSearchParams['destination_city'][0] : '';
$ContSysId = isset($sessionFlightSearchParams['ContSysId']) ? $sessionFlightSearchParams['ContSysId'][1] : '';
$route = isset($sessionFlightSearchParams['route']) ? $sessionFlightSearchParams['route'][0] : '';
$mytrip_city_from = isset($sessionFlightSearchParams['mytrip_city_from']) ? $sessionFlightSearchParams['mytrip_city_from'][0] : '';
$mytrip_city_to = isset($sessionFlightSearchParams['mytrip_city_to']) ? $sessionFlightSearchParams['mytrip_city_to'][0] : '';
$from_mytrip_city = isset($sessionFlightSearchParams['from_mytrip_city']) ? $sessionFlightSearchParams['from_mytrip_city'][0] : '';
$from_city = isset($sessionFlightSearchParams['from_city']) ? $sessionFlightSearchParams['from_city'][0] : '';
$to_city = isset($sessionFlightSearchParams['to_city']) ? $sessionFlightSearchParams['to_city'][0] : '';
$adults = isset($sessionFlightSearchParams['adults']) ? $sessionFlightSearchParams['adults'] : '';
$childs = isset($sessionFlightSearchParams['childs']) ? $sessionFlightSearchParams['childs'] : '';
$infants = isset($sessionFlightSearchParams['infants']) ? $sessionFlightSearchParams['infants'] : '';
$class = isset($sessionFlightSearchParams['class']) ? $sessionFlightSearchParams['class'] : '';
$ARR_SALUTION_TJ = unserialize(ARR_SALUTION_TJ);
$ARR_SALUTION_CHILD = unserialize(ARR_SALUTION_CHILD);
$arrDepartureDates = explode("/", $departure_date);
$departureDates = $arrDepartureDates[2] . "/" . $arrDepartureDates[1] . "/" . ($arrDepartureDates[0] - 1);
$BagPrice = 0;
$InbBagPrice = 0;
$MealPrice = 0;
$InbMealPrice = 0;
$SeatPrice = 0;
$SelectedBagg = [];
$SelectedMeal = [];
$SelectedSeat = [];
if ($SelectedBaggSessionNew) {
foreach ($SelectedBaggSessionNew as $values) {
foreach ($values as $val) {
$BagPrice += $val['Price'];
}
$SelectedBagg = $values;
}
}
if ($SelectedMealSessionNew) {
foreach ($SelectedMealSessionNew as $values) {
foreach ($values as $val) {
$MealPrice += $val['Price'];
}
$SelectedMeal = $values;
}
}
if ($selectedSeatSession) {
foreach ($selectedSeatSession as $values) {
foreach ($values as $val) {
$SeatPrice += $val['amount'];
}
$SelectedSeat = $values;
}
}
$intNetPublishedFare = 0;
$AdditionalTxnFeePub = 0;
$TotalBaseFare = 0;
$AdditionalTxnFeePubR = 0;
$TotalTaxsandFees = 0;
$TotalExtraMarkUpSum = 0;
$TotalExtraMarkup = 0;
$TotalExtraMarkupOnGST = 0;
$CommRetained = 0;
$TotalCommEarned = 0;
$TotalAgentMarkUp = 0;
$TotalAgencyComm = 0;
$TotalGSTOnAgentMarkUp = 0;
$CostToAgent = 0;
$TotalIntCommission = 0;
$ToTalGSTFees = 0;
$FareRules = isset($FlightBookingData[0]['FareRules']) ? $FlightBookingData[0]['FareRules'] : '';
$CancellationPolicy = isset($FlightBookingData[0]['CancellationPolicy']) ? $FlightBookingData[0]['CancellationPolicy'] : '';
$Currency = $FlightBookingData[0]['FairRules']['Currency'];
$bookingId = $FlightBookingData[0]['bookingId'];
$api_type = isset($FlightBookingData[0]['api_type']) ? $FlightBookingData[0]['api_type'] : '';
$IsSeriesFareData = isset($FlightBookingData[0]['IsSeriesFareData']) ? $FlightBookingData[0]['IsSeriesFareData'] : 0;
$ICSourceSysId = isset($FlightBookingData[0]['ICSourceSysId']) ? $FlightBookingData[0]['ICSourceSysId'] : 0;
if (!empty($this->ICSourceSysId)) {
$ICSourceSysId = $this->ICSourceSysId;
} else {
$ICSourceSysId = $ICSourceSysId;
}
$SegmentsBaggageArr = [];
$SegmentsArr = [];
if ($FlightBookingData) {
foreach ($FlightBookingData as $Data) {
$intNetPublishedFare += $Data['FairRules']['PublishedFare'];
$ExtraMarkup = isset($Data['FairRules']['ExtraMarkup']) ? $Data['FairRules']['ExtraMarkup'] : 0;
$ExtraMarkupOnGST = isset($Data['FairRules']['ExtraMarkupOnGST']) ? $Data['FairRules']['ExtraMarkupOnGST'] : 0;
$TotalExtraMarkUp = ($ExtraMarkup + $ExtraMarkupOnGST);
$TotalExtraMarkUpSum += ($ExtraMarkup + $ExtraMarkupOnGST);
$TotalExtraMarkup += ($ExtraMarkup);
$TotalExtraMarkupOnGST += ($ExtraMarkupOnGST);
if ($Data['FairRules']['FareBreakdown']) {
foreach ($Data['FairRules']['FareBreakdown'] as $value) {
//echo '<pre>';print_r($value);echo '</pre>';
$TDS = $value['TDS']; //Management Fee
$MF = $value['MF']; //Management Fee
$YQ = $value['YQ']; //Fuel Surcharge
$AGST = $value['AGST']; //Airline GST Component
$MFT = $value['MFT']; //Management Fee Tax
$OT = $value['OT']; //Other Charges
$YR = $value['YR'];
$other = $MF + $YQ + $AGST + $MFT + $OT + $YR;
$PBaseFare = $value['BaseFare'];
$intTotalGST = $value['intTotalGST'];
$intGTXMarkUp = $value['intGTXMarkUp'];
$GTXMarkUpGST = $value['GTXMarkUpGST'];
$apiMarkup = $value['apiMarkup'];
$AgentMarkUp = $value['AgentMarkUp'];
$CommEarned = $value['CommEarned'];
$IntCommission = $value['Agencycommission'];
$GSTOnAgentMarkUp = $value['GSTOnAgentMarkUp'];
$apiTaxOnMarkup = $value['apiTaxOnMarkup'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$FixedMarkUp = $value['FixedMarkUp'];
$OtherCharges = $value['OtherCharges'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
$CommRetained += $value['AdminComminAmount_ag'];
$TotalCommEarned += $CommEarned;
$TotalAgentMarkUp += $AgentMarkUp;
$TotalAgencyComm += $value['Agencycommission'];
$TotalGSTOnAgentMarkUp += $GSTOnAgentMarkUp;
$CostToAgent += $value['CostToAgent'];
$TotalIntCommission += $IntCommission;
//$TaxesFees = ($apiMarkup + $intGTXMarkUp + $GTXMarkUpGST + $intTotalGST + $other + $AgentMarkUp + $GSTOnAgentMarkUp - $IntCommission);
$otherBase = ($apiMarkup + $intGTXMarkUp + $GTXMarkUpGST + $intTotalGST + $other);
if ($ICSourceSysId == 7 || $ICSourceSysId == 8) {
$OTTax = ($MF + $MFT + $OT + $YR + $GSTOnMarkUp + $FixedMarkUp);
} else {
$OTTax = ($MF + $MFT + $OT + $YR + $GSTOnMarkUp + $FixedMarkUp + $TDS);
}
$ServiceFee = ($apiMarkup + $apiTaxOnMarkup);
$TotalFare = ($PBaseFare);
if ($IsSeriesFareData == 1) {
//$TotalFare = ($PBaseFare);
//$TaxesFees = ($AgentMarkUp + $OTTax + $ServiceFee);
} else {
//$TotalFare = ($PBaseFare + $AGST + $YQ + $OTTax + $ServiceFee);
// $TaxesFees = ($AgentMarkUp);
}
if ($ICSourceSysId == 7 || $ICSourceSysId == 8) {
$otherCharge = ($YQ + $AGST + $MFT + $MF + $OT + $YR + $intGTXMarkUp + $GTXMarkUpGST);
$TaxesFees = (($otherCharge + $intTotalGST + $FixedMarkUp + $apiMarkup + $AgentMarkUp + $GSTOnAgentMarkUp) - $IntCommission);
} else {
$otherCharge = ($AGST + $MFT + $MF + $OT + $YR + $intGTXMarkUp + $GTXMarkUpGST + $TDS + $OtherCharges);
$TaxesFees = (($otherCharge + $intTotalGST + $FixedMarkUp + $apiMarkup + $AgentMarkUp + $GSTOnAgentMarkUp) - $IntCommission);
}
$ToTalGSTFees += ($GSTOnAgentMarkUp);
$TotalBaseFare += ($TotalFare);
$TotalTaxsandFees += ($TaxesFees);
}
}
foreach ($Data['Segments'] as $seg) {
$SegmentsArr[] = $seg;
$SegmentsBaggageArr[] = ['Baggage' => $seg['Baggage'], 'CabinBaggage' => $seg['CabinBaggage']];
}
}
}
$PNRArray = [];
//echo $TotalBaseFare.' + '.$TotalExtraMarkUpSum.' + '.$TotalTaxsandFees.' + '.$ToTalGSTFees;
if (($ICSourceSysId == 7) || ($ICSourceSysId == 8)) { //&& $IsSeriesFareData == 1
$success = $API_Response_Ticket['status']['success'];
$status = $API_Response_Ticket['order']['status'];
$errorsMessage = $API_Response_Ticket['errors'];
$bookingIds = $API_Response_Ticket['order']['bookingId'];
$tripInfos = $API_Response_Ticket['itemInfos']['AIR']['tripInfos'];
$travellerInfos = $API_Response_Ticket['itemInfos']['AIR']['travellerInfos'];
$pnrDetails = $travellerInfos[0]['pnrDetails'];
$pnrDetails___ = $travellerInfos[0]['pnrDetails'];
$sector = implode(",<br>", array_keys($pnrDetails));
$PNRNumber = implode(",", $pnrDetails);
$PNRArray = $pnrDetails;
$TotalBaseFare = ($TotalBaseFare + $BagPrice + $MealPrice + $SeatPrice);
if (!empty($api_type)) {
$bookingId = $API_Response_Ticket['order']['bookingId'][0];
}
//print_r($API_Response_Ticket);die('Please wait..');
} else {
$TotalBaseFare = ($TotalBaseFare + $BagPrice + $MealPrice + $SeatPrice);
$Response['onward'] = $API_Response_Ticket[0];
if (isset($API_Response_Ticket[1])) {
$Response['return'] = $API_Response_Ticket[1];
}
$ErrorMessageonward = !empty($Response['onward']['Response']['Error']['ErrorMessage']) ? $Response['onward']['Response']['Error']['ErrorMessage'] : 'Oops somethings went wrong. please note reference number for future use.';
$ResponseStatusonward = $success = $Response['onward']['Response']['ResponseStatus'];
if ($ResponseStatusonward == 1) {
$status = 'SUCCESS';
} else {
$status = '';
}
$Responseonward = $Response['onward']['Response']['Response'];
$Responsereturn = $Response['return']['Response']['Response'];
$FlightItineraryonward = $Response['onward']['Response']['Response']['FlightItinerary'];
$PNR = $Responseonward['PNR'];
$BookingId = $Responseonward['BookingId'];
$PNReturn = $Responsereturn['PNR'];
$BookingIdReturn = $Responsereturn['BookingId'];
$FareRules = $FlightItineraryonward['FareRules'];
if ($FlightItineraryonward['Segments']) {
foreach ($FlightItineraryonward['Segments'] as $key => $value) {
$PNRArray[] = $value['AirlinePNR'];
}
}
// echo '<pre>';
// print_r($FareRules);
// echo '</pre>';
if ($PNReturn) {
$PNRNumber = $PNR . ',' . $PNReturn;
} else {
$PNRNumber = $PNR;
}
if ($BookingIdReturn) {
$bookingId = $BookingId . ',' . $BookingIdReturn;
} else {
$bookingId = $BookingId;
}
$TicketArray = [];
if ($FlightBookingData) {
foreach ($FlightBookingData as $key => $Data) {
$TBORes = isset($API_Response_Ticket[$key]) ? $API_Response_Ticket[$key] : '';
$Origin = $TBORes['Response']['Response']['FlightItinerary']['Origin'];
$Destination = $TBORes['Response']['Response']['FlightItinerary']['Destination'];
$PassengerTBO = $TBORes['Response']['Response']['FlightItinerary']['Passenger'];
if ($PassengerTBO) {
foreach ($PassengerTBO as $ps => $pass) {
$TicketArray[][$ps] = array(
'Origin' => $Origin,
'Destination' => $Destination,
'Ticket' => $pass['Ticket'],
'Ssr' => $pass['Ssr'],
);
}
}
}
}
}
$ARR_SALUTION_TJ = unserialize(ARR_SALUTION_TJ);
$gtxagencysysid = $this->MasterAgencySysId;
$IsCancellationProtection = (isset($this->BookingData['IsCancellationProtection'])) ? $this->BookingData['IsCancellationProtection'] : 0;
$CancellationProtectionPrice = 0;
if ($IsCancellationProtection == 1) {
$CancellationProtectionPrice = $this->BookingData['CancellationProtectionPrice'];
}
$TPSysId = $this->BookingData['TPSysId'];
$paxName = $this->passengerData[0]['FirstName'] . ' ' . $this->passengerData[0]['LastName'];
if (!empty($getAgencyData['UserPicPath'])){
$UserPicPath = $getAgencyData['Logo'];
}else{
$UserPicPath = $getAgencyData['UserPicPath'];
}
$Tittle = $getAgencyData['Title'];
$Address = $getAgencyData['Address'];
$cityTitle = $getAgencyData['cityTitle'];
$PinCode = $getAgencyData['PinCode'];
$CountryTitle = $getAgencyData['CountryTitle'];
if ($this->B2BType == 2) {
$Tittle = $MasterAgencyData['DisplayName'];
$Address = $MasterAgencyData['Address'];
$cityTitle = $MasterAgencyData['CityName'];
$PinCode = $MasterAgencyData['Pincode'];
$CountryTitle = $MasterAgencyData['CountryName'];
}
if ($gtxagencysysid == '21') {
// echo '<pre>';print_r($getAgencyData);echo '</pre>';
//echo '<pre>';print_r($_SESSION['User']['UserPicPath']);echo '</pre>';
// die('Please wait..');
}
require_once('Barcode417/vendor/autoload.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>
Technogram
</title>
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo $baseUrl; ?>public/upload/<?php echo $gtxagencysysid; ?>/images/favicon-icon.png" />
<link rel="stylesheet" href="<?= $baseUrl ?>public/asset/assets/css/ticket.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<script type="text/javascript">
window.onload = function() {
let tempTitle = document.title;
document.title = "<?= $paxName ?>";
//window.print();
};
</script>
<style>
body {
page-break-before: avoid;
width: 100%;
height: 100%;
zoom: 70%;
-webkit-print-color-adjust: exact;
}
.gtx--body__print {
width: 100% !important;
}
</style>
<style>
body {
margin: 0px auto !important;
color: #000 !important;
-webkit-print-color-adjust: exact;
color-adjust: exact;
zoom: 65%;
}
p {
margin: 0;
line-height: 1.4;
}
ul {
margin: 0;
padding: 0
}
table {
width: 100%;
border-spacing: 0;
}
.print_back {
display: none;
}
</style>
</head>
<body id="body">
<?php
use BigFish\PDF417\PDF417;
use BigFish\PDF417\Renderers\ImageRenderer;
$pdf417 = new PDF417();
// $data = $pdf417->encode('M1SRIVASTAVA/PANKAJ ABC123 DELBOM6E 0112226Y00000000 000');
// $renderer = new ImageRenderer([
// 'format' => 'data-url'
// ]);
// $img = $renderer->render($data);
?>
<table style="background:#fff; width:800px; margin: 0px auto" class="gtx--body__print">
<tbody>
<tr>
<td>
<table width="800px" class="removeshadow" style="box-shadow: 1px 1px 15px rgba(0, 0, 0,
0.1); background: #fff">
<tbody>
<tr>
<td>
<?php if ($this->nobranding == 0) { ?>
<table style="width:100%">
<tbody>
<tr>
<td style="width:60%; padding:15px 40px" class="print_logo">
<?php if (!empty($UserPicPath) && $B2BType != 2) { ?>
<img src="<?= $UserPicPath ?>" class=" print_image-success" style="max-width: 150px; opacity: 0.99;">
<?php } else if ($B2BType == 2) { ?>
<img src="<?= $MasterAgencyLogo ?>" class=" print_image-success" style="max-width: 150px; opacity: 0.99;">
<?php } else { ?>
<img src="<?php echo $baseUrl; ?>public/upload/<?php echo $gtxagencysysid; ?>/images/logo.png" class=" print_image-success" style="max-width: 150px; opacity: 0.99;">
<?php } ?>
</td>
<td style="width:40%">
<p>
<strong class="printSmTxt">
<?= $Tittle ?>
</strong>
</p>
<p>
<span style="font-weight: 400; font-size: 12px; color: #777" class="printSmTxt">
Email:
<?= $supportEmail ?>
</span>
</p>
<p>
<span style="font-weight: 400; font-size: 12px; color: #777" class="printSmTxt">
Phone:
<?= $supportcountrycode ?><?= $supportContactNo ?>
</span>
</p>
<p>
<span style="font-weight: 400; font-size: 12px; color: #777" class="printSmTxt">
Address:
<?= $Address ?>,<br>
<?= $cityTitle ?>
<?= $PinCode ?>,
<?= $CountryTitle ?>
</span>
</p>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<table style="width:100%">
<tbody>
<tr>
<td style="width: 50%; border: 1px solid #333; border-left: 0; padding: 8px;" class="printBookingDetail">
<p style="margin-bottom: 5px; color:#777"><span style="font-weight: 400;">
Booking Time:
<?= date('d-m-Y H:s:i', strtotime($this->created_at)) ?></span></p>
<p style="margin-bottom: 5px; color:#777"><span style="font-weight: 400;">Booking
ID:
<?= $bookingId ?></span></p>
<p style="margin-bottom: 5px; color:#777"><span style="font-weight: 400;">Booking
Status:
</span>
<strong style="color:#000">
<?= $status ?></strong>
</p>
</td>
<td style="width: 50%; border-top: 1px solid #333; border-bottom: 1px solid #333; padding:5px" class="printAirlineDetail">
<br />
<table style="width: 100%; margin-bottom: 15px;">
<tbody>
<?php
if ($SegmentsArr) {
foreach ($SegmentsArr as $key => $value) {
$originAirportCode = $value['originAirportCode'];
$destinationAirportCode = $value['destinationAirportCode'];
$pnr = $PNRArray[$originAirportCode . '-' . $destinationAirportCode];
?>
<tr>
<td style="width: 40px;">
<p>
<span style="font-weight: 400;">
<img class="reviewbox__airlineLogo" src="<?= $value['filePath'] ?>" style="margin-right:5px; vertical-align: middle; width: 30px" width="30" />
</span>
</p>
</td>
<td style="width:40%">
<p style="font-weight: 400; font-size:12px">
<?= $value['AirlineName'] ?>
</p>
<p>
<span style="font-weight: 400; font-size:12px; color:#777">
</span>
</p>
</td>
<td>
<p style="font-weight:bold; font-size: 20px;">
<strong>
<?= $pnr ?>
</strong>
</p>
<p>
<span style="font-weight: 400; font-size:12px; color:#777">Airline
PNR</span>
</p>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<?php
if ($FlightBookingData) {
foreach ($FlightBookingData as $Data) {
$FareClass = $Data['FairRules']['FareClass'];
$IsRefundableTxt = $Data['IsRefundableTxt'];
?>
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 30%">
<p style="background: #000; padding: 5px; color: #fff; padding-left: 20px">
<span style="font-weight: 400;">Flight Detail
</span>
</p>
</td>
<td style="width: 70%" align="right">
<p style="background: #000; padding: 5px; color: #fff;"><em><span style="font-weight: 400;">*Please
verify flight timings & terminal info with the
airlines</span></em></p>
</td>
</tr>
</tbody>
</table>
<table style="width: 100%; line-height: normal;">
<tbody>
<tr>
<td width="20%">
<p style="background:#BCBEC0; color: #000; padding: 3px; padding-left: 20px">
<span style="font-weight: 400;">Flight</span>
</p>
</td>
<td width="10%">
<p style="background:#BCBEC0; color: #000; padding: 3px"><span style="font-weight: 400;">Class</span></p>
</td>
<td width="10%">
<p style="background:#BCBEC0; color: #000; padding: 3px"><span style="font-weight: 400;">Type</span></p>
</td>
<td width="20%">
<p style="background:#BCBEC0; color: #000; padding: 3px"><span style="font-weight: 400;">Departing</span></p>
</td>
<td width="20%">
<p style="background:#BCBEC0; color: #000; padding: 3px"><span style="font-weight: 400;">Arriving</span></p>
</td>
<td width="10%">
<p style="background:#BCBEC0; color: #000; padding: 3px"><span style="font-weight: 400;">Duration</span></p>
</td>
</tr>
</tbody>
</table>
<?php
$sectorArr = [];
if ($Data['Segments']) {
foreach ($Data['Segments'] as $konw => $value) {
$originDepTime = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->getArrivalDepartureIndianFormat($value['originDepTime']);
$destinationArrTime = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->getArrivalDepartureIndianFormat($value['destinationArrTime']);
$originTime = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->getTimeFromApiString($value['originDepTime']);
$destinationTime = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->getTimeFromApiString($value['destinationArrTime']);
$Duration = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->convertMinutesToHoursFormat((isset($value['Duration']) ? $value['Duration'] : 0));
$LAYOVERMinutes = ((isset($value['GroundTime']) ? $value['GroundTime'] : 0));
$LAYOVERDuration = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->convertMinutesToHoursFormat($LAYOVERMinutes);
$segggg = $value['originAirportCode'] . '-' . $value['destinationAirportCode'];
$PNR = $pnrDetails[$segggg];
$sectorArr[] = $value;
$SegmentsArr__ = isset($SegmentsApi[$konw]) ? $SegmentsApi[$konw] : '';
$AirlinePNR = !empty($SegmentsArr__['AirlinePNR']) ? $SegmentsArr__['AirlinePNR'] : $FlightBooking['data']['PNR_Number'];
// echo '<pre>';
// print_r($value);
// echo '</pre>';
?>
<?php if ($value['GroundTime'] > 0 && $ICSourceSysId == 3) { ?>
<table style="width: 100%; margin-bottom: 15px; background: #e6e6e6; margin-top: 15px;" align="center" class="printLyover">
<tbody>
<tr>
<td style="text-align:center; width: 100%; padding: 5px 0;" align="center">
LAYOVER Time - <?= $LAYOVERDuration ?>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<table style="width: 100%;">
<tbody>
<tr>
<td width="20%" style="padding: 2px; font-size: 12px; padding-left: 20px">
<p>
<strong style="color: #000" class="printSmTxt">
<?= $value['SegFlightNumber'] ?>
</strong>
</p>
<p>
<span style="font-weight: 400;">
<?= $value['AirlineName'] ?>
</span>
</p>
</td>
<td width="10%" style="padding: 2px; font-size: 12px">
<p>
<span style="font-weight: 400;">
<?= $FareClass ?>
</span>
</p>
</td>
<td width="10%" style="padding: 2px; font-size: 12px">
<p>
<span style="font-weight: 400;">
<?= $IsRefundableTxt ?>
</span>
</p>
</td>
<td width="20%" style="padding: 2px; font-size: 12px">
<p><strong style="color: #000" class="printSmTxt">
<?= date('D, d M Y H:i', strtotime($value['originDepTime'])) ?></strong><span style="font-weight: 400;">
</span>
</p>
<p><span style="font-weight: 400;">
<?= $value['originCityName'] ?>,
<?= ($ICSourceSysId == 3) ? 'Terminal - ' . $value['DepTerminal'] : $value['DepTerminal'] ?></span></p>
<p><span style="font-weight: 400;">
<?= $value['originAirportName'] ?></span></p>
</td>
<td width="20%" style="padding: 2px; font-size: 12px">
<p><strong style="color: #000" class="printSmTxt">
<?= date('D, d M Y H:i', strtotime($value['destinationArrTime'])) ?></strong><span style="font-weight: 400;">
</span>
</p>
<p><span style="font-weight: 400;">
<?= $value['destinationCityName'] ?>,
<?= ($ICSourceSysId == 3) ? 'Terminal - ' . $value['ArrTerminal'] . '<br> Airline PNR-' . $AirlinePNR : $value['ArrTerminal'] ?></span></p>
<p><span style="font-weight: 400;">
<?= $value['destinationAirportName'] ?></span></p>
</td>
<td width="10%" style="padding: 2px; font-size: 12px">
<p>
<strong style="color: #000" class="printSmTxt">
<?= $Duration ?></strong>
<span style="font-weight: 400;"> </span>
</p>
</td>
</tr>
<?php if ($value['StopOver']) { ?>
<tr>
<td colspan="6" style="padding: 2px; font-size: 12px; padding-left: 20px; text-align:center;">
Via - <?= $value['StopPoint'] ?><br>
Arr - <?= date('d M Y H:i', strtotime($value['StopPointArrivalTime'])) ?>,
Dep - <?= date('d M Y H:i', strtotime($value['StopPointDepartureTime'])) ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php if ($value['GroundTime'] > 0 && $ICSourceSysId != 3) { ?>
<table style="width: 100%; margin-bottom: 15px; background: #e6e6e6; margin-top: 15px;" align="center" class="printLyover">
<tbody>
<tr>
<td style="text-align:center; width: 100%; padding: 5px 0;" align="center">
LAYOVER Time - <?= $LAYOVERDuration ?>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<?php
}
}
?>
<?php
}
}
?>
<table style="margin-top:12px; width:100%">
<tbody>
<tr>
<td width="100%">
<p style="background: #000; color:#fff; padding:5px; padding-left: 20px">
Passenger
Details</p>
</td>
</tr>
</tbody>
</table>
<table style="color:#000; width:100%; vertical-align: middle">
<tbody>
<tr>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">Sr.
</p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px"> Name & FF
</p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">Sector
</p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">PNR & Ticket
No. </p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">
Baggage
<span style="font-size: 8px; line-height:12px; display: block">Check-in
| Cabin </span>
</p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">Meal, Baggage &
Other
Preference </p>
</td>
<td style="border-bottom:1px solid #333; background:#BCBEC0;">
<p style="color: #000; padding: 3px">Seat</p>
</td>
</tr>
<?php
//&& $IsSeriesFareData == 1
if (($this->passengerData && $ICSourceSysId == 7) || ($ICSourceSysId == 8)) {
$count = 1;
foreach ($this->passengerData as $k => $value) {
$pnrDetails = isset($value['PNR_Number']) ? explode('-', $value['PNR_Number']) : '';
//$sectors = isset($value['sectors']) ? $value['sectors'] : '';
$TicketNumber = isset($value['TicketNumber']) ? $value['TicketNumber'] : '';
$DateOfBirth = isset($value['dob']) ? $value['dob'] : '';
//$sector = implode("<br>", $sectors);
//$PNRNumber = implode("<br>", $pnrDetails);
$ARR_SALUTION_TJ_ = $ARR_SALUTION_CHILD;
if ($value['paxType'] == 1) {
$ARR_SALUTION_TJ_ = $ARR_SALUTION_TJ;
}
if ($value['paxType'] == 1) {
$paxdetail = 'A';
} elseif ($value['paxType'] == 2) {
$paxdetail = 'C';
} else {
$paxdetail = 'I';
}
$traveller = isset($travellerInfos[$k]) ? $travellerInfos[$k] : '';
$ssrBaggageInfos = [];
$ssrMealInfos = [];
$ssrSeatInfos = [];
if (!empty($traveller) && isset($traveller['ssrBaggageInfos'])) {
$ssrBaggageInfos = $traveller['ssrBaggageInfos'];
}
if (!empty($traveller) && isset($traveller['ssrMealInfos'])) {
$ssrMealInfos = $traveller['ssrMealInfos'];
}
if (!empty($traveller) && isset($traveller['ssrSeatInfos'])) {
$ssrSeatInfos = $traveller['ssrSeatInfos'];
}
$pnrDetailsAPI = [];
if (!empty($traveller)) {
$pnrDetailsAPI = isset($traveller['pnrDetails']) ? $traveller['pnrDetails'] : '';
}
$fullName_ = strtoupper(trim($value['LastName'])) . '/' . strtoupper(trim($value['FirstName']));
if(strlen($fullName) > 0){
$fullName_ = substr($fullName, 0, 20);
}
$fullName_ = str_pad($fullName_, 20, ' ');
$Seat = '';
$Meal = '';
if ($value['ChangeRequestStatus'] != 1) {
?>
<tr>
<td style="border-bottom:0px solid #333; border-left: 1px solid #333; padding:2px; border-top:1px solid #333;">
<p style="font-size:9px">
<?= $count; ?>
</p>
</td>
<td style="border-bottom:0px solid #333; padding:2px; border-top:1px solid #333;">
<p style="font-size:12px">
<?= $ARR_SALUTION_TJ_[$value['Salutation']] ?>. <?= $value['FirstName'] ?> <?= $value['LastName'] ?>
( <?= $paxdetail ?> )
<br />
</p>
<!-- <img src="<?= $img->encoded ?>" width="240" height="75" />
<img src="<?= $img->encoded ?>" width="240" height="75" /> -->
</td>
<td style="border-bottom:0px solid #333; padding:2px; border-top:1px solid #333;">
<p style="font-size:9px; font-weight: bold" class="printSmTxt">
<?= $sector ?>
</p>
</td>
<td style="border-bottom:0px solid #333; padding:2px; border-top:1px solid #333;">
<p style="font-size:9px; font-weight: bold" class="printSmTxt">
<span><?= implode('<br>', $pnrDetails) ?> <?= ($TicketNumber) ? '(' . $TicketNumber . ')' : '' ?>
</p>
</td>
<td style="border-bottom:0px solid #333; padding:2px; border-top:1px solid #333;">
<p style="font-size:12px"> <b class="baggagebold printSmTxt">
<?= ($value['Baggage']) ? $value['Baggage'] : 'NA' ?> | <?= ($value['CabinBaggage']) ? $value['CabinBaggage'] : 'NA' ?>
</p>
</td>
<td style="border-bottom:0px solid #333; border-top:1px solid #333;padding:2px;">
<?php
if (array_keys($pnrDetailsAPI)) {
foreach (array_keys($pnrDetailsAPI) as $sec) {
$Baggage = isset($ssrBaggageInfos[$sec]) ? $ssrBaggageInfos[$sec] : [];
$Meal = isset($ssrMealInfos[$sec]) ? $ssrMealInfos[$sec] : [];
?>
<?php if (!empty($Meal)) { ?>
<p><span> <?= !empty($Meal['code']) ? $Meal['code'] : '' ?> <?= !empty($Meal['desc']) ? $Meal['desc'] : '' ?> </span></p>
<?php } else {
echo '<p>----</p>';
}
?>
<?php if (!empty($Baggage)) { ?>
<p><span> <?= !empty($Baggage['code']) ? $Baggage['code'] : '' ?> <?= !empty($Baggage['desc']) ? $Baggage['desc'] : '' ?> </span></p>
<?php } else {
echo '<p>----</p>';
}
?>
<?php
}
} ?>
<!-- p style="font-size:12px"> <b class="baggagebold printSmTxt">
<p style="font-size:12px" class="printSmTxt">NA</p>
</p> -->
</td>
<td style="border-bottom:0px solid #333;padding:2px; border-right: 1px solid #333; border-top:1px solid #333;">
<?php
if (array_keys($pnrDetailsAPI)) {
foreach (array_keys($pnrDetailsAPI) as $sec) {
$Baggage = isset($ssrBaggageInfos[$sec]) ? $ssrBaggageInfos[$sec] : [];
$Meal = isset($ssrMealInfos[$sec]) ? $ssrMealInfos[$sec] : [];
$Seat = isset($ssrSeatInfos[$sec]) ? $ssrSeatInfos[$sec] : [];
?>
<?php if (!empty($Seat)) { ?>
<p style="font-size:12px"> <b class="baggagebold printSmTxt">
<p style="font-size:12px" class="printSmTxt"><?= !empty($Seat['code']) ? $Seat['code'] : '' ?></p>
</p>
<?php } else {
echo '<p style="font-size:12px"> <b class="baggagebold printSmTxt">---</p>';
} ?>
<?php
}
}
?>
</td>
</tr>
<?php
if ($SegmentsArr && $value['paxType'] != 3) {
foreach ($SegmentsArr as $keysss => $SegBar) {
$AirlineCode = $SegBar['AirlineCode'];
$originDepTime = date('Y-m-d', strtotime($SegBar['originDepTime']));
$SegFlightNumber = explode('-', $SegBar['SegFlightNumber']);
$SegFlightNumber_ = $SegFlightNumber[1];
$FlightNumber_ = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->FlightNumberPadded($SegFlightNumber_);
$originAirportCode = $SegBar['originAirportCode'];
$destinationAirportCode = $SegBar['destinationAirportCode'];
$SGSECK = $originAirportCode . '-' . $destinationAirportCode;
$SecPnr = isset($pnrDetails___[$SGSECK]) ? $pnrDetails___[$SGSECK] : '';
$SeatBarcode = (isset($ssrSeatInfos[$SGSECK]['code']) && !empty($ssrSeatInfos[$SGSECK]['code'])) ? $ssrSeatInfos[$SGSECK]['code'] : '0000';
$DateofFight__ = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->GetJulianDate($originDepTime);
$SecPnr = str_pad($SecPnr, 7, ' ');
$AirlineCode = str_pad($AirlineCode, 3, ' ');
$SeatBarcode = str_pad($SeatBarcode, 4, '0');
$FormatCode = 'M';
$NumberofLegsEncoded = '1';
$PassengerName = $fullName_;
$ElectronicTicketIndicator = ' ';
$OperatingcarrierPNRCode = $SecPnr;
$FromCityAirportCode = $originAirportCode;
$ToCityAirportCode = $destinationAirportCode;
$OperatingcarrierDesignator = $AirlineCode;
$FlightNumber = $FlightNumber_;
$DateofFight = $DateofFight__;
$CompartmentCode = 'Y';
$SeatNumber = '0000';
$CheckinSequenceNumber = '00000';
$PassengerStatus = '0';
$FieldSizeofvariable = '00';
$FInalBarCode = $FormatCode . '' . $NumberofLegsEncoded . '' . $PassengerName . '' . $ElectronicTicketIndicator . '' . $OperatingcarrierPNRCode . '' . $FromCityAirportCode . '' . $ToCityAirportCode . '' . $OperatingcarrierDesignator . '' . $FlightNumber . '' . $DateofFight . '' . $CompartmentCode . '' . $SeatNumber . '' . $CheckinSequenceNumber . '' . $PassengerStatus . '' . $FieldSizeofvariable;
//$FInalBarCode = str_pad($FInalBarCode, 60, '0');
// echo '<pre>';
// print_r(strlen($fullName_));
// echo '</pre>';
// echo '<pre>';
// print_r(strlen('M1SABIR/MOHAMMAD B7UP5T BOMCCUG8 0511 077Y000000000000'));
// echo '</pre>';
// echo '<pre>';
// print_r(('M1SABIR/MOHAMMAD B7UP5T BOMCCUG8 0511 077Y000000000000'));
// echo '</pre>';
// echo '<pre>';
// print_r($FInalBarCode);
// echo '</pre>';
// echo '<pre>';
// print_r(strlen($FInalBarCode));
// echo '</pre>';
if (strlen($FInalBarCode) == 60) {
$data = $pdf417->encode($FInalBarCode);
$renderer = new ImageRenderer([
'format' => 'data-url'
]);
$img = $renderer->render($data);
?>
<tr>
<td style="border-bottom:0px solid #333;padding:2px;border-right: 1px solid #333;border-left: 1px solid #333;" colspan="7">
<img src="<?= $img->encoded ?>" width="240" height="80" style="margin: 11px;" />
</td>
</tr>
<?php
}
}
}
?>
<?php
$count++;
}
}
}
?>
</tbody>
</table>
<?php if ($withprice != 0) { ?>
<table style="margin-top:12px; width:100%">
<tbody>
<tr>
<td>
<p style="background: #000; color:#fff; padding:5px; padding-left: 20px">
Fare
Details</p>
</td>
</tr>
</tbody>
</table>
<table style="border:1px solid #333; width:100%">
<tbody>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
Base Price
</td>
<td style="padding:3px; font-size:12px; color:#000">
<?= $CurrencyTitle ?> <?= number_format((($TotalBaseFare) * $CurrencyRate), 2) ?>
</td>
</tr>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
Fee & Surcharges
</td>
<td style="padding:3px; font-size:12px; color:#000">
<?= $CurrencyTitle ?> <?= number_format((($TotalTaxsandFees + $TotalExtraMarkUpSum) * $CurrencyRate), 2) ?>
</td>
</tr>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
GST
</td>
<td style="padding:3px; font-size:12px; color:#000">
<?= $CurrencyTitle ?> <?= number_format((($ToTalGSTFees) * $CurrencyRate), 2) ?>
</td>
</tr>
<?php if ($IsCancellationProtection == 1) { ?>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
Refund Upgrade
</td>
<td style="padding:3px; font-size:12px; color:#000">
<?= $CurrencyTitle ?> <?= number_format(($CancellationProtectionPrice), 2) ?>
</td>
</tr>
<?php }
$num = round((($TotalBaseFare + $TotalExtraMarkUpSum + $TotalTaxsandFees + $ToTalGSTFees + $CancellationProtectionPrice)), 2);
$whole = (int) $num;
$frac = ($num - $whole);
?>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
Rounding
</td>
<td style="padding:3px; font-size:12px; color:#000">
<?= $CurrencyTitle ?> <?= number_format($frac, 2) ?>
</td>
</tr>
<tr>
<td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
Total Price
</td>
<td style="padding:3px; font-weight:bold">
<?= $CurrencyTitle ?> <?= number_format(ceil((($TotalBaseFare + $TotalExtraMarkUpSum + $TotalTaxsandFees + $ToTalGSTFees) * $CurrencyRate) + $CancellationProtectionPrice), 2) ?>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<?php if ($IsCancellationProtection == 1) { ?>
<table style="margin-top:12px; width:100%">
<tbody>
<tr>
<td>
<p style="background: #000; color:#fff; padding:5px; padding-left: 20px">Refundable Booking</p>
</td>
</tr>
</tbody>
</table>
<table style="width:100%; margin-bottom: 40px;padding-top: 15px;" class="print-info">
<tbody>
<tr>
<td style="padding: 0 8px; font-size: 14px; color:#000; width:100%">
To make changes to your booking or where it is cancelled or changed by the provider, please contact our Customer Service Team at <a href="mailto:<?php echo trim($getAgencyData['EmailId']); ?>"><?php echo trim($getAgencyData['EmailId']); ?></a>
</td>
</tr>
<tr>
<td style="padding: 0 8px; font-size: 14px; color:#000; width:100%">
This is a refundable booking. If you are unable to attend your booking due to unforeseen circumstances and can provide evidence as listed in the <a target="_blank" href="https://www.refundable.me/extended/en/" style="text-decoration:underline;color:rgb(0, 0, 238);">Terms & Conditions</a> here, you may be entitled to a full refund. Your booking reference number is <b><?php echo $TPSysId; ?></b>
</td>
</tr>
<tr>
<td style="padding: 0 8px; font-size: 14px; color:#000; width:100%">
<a target="_blank" href="https://form.refundable.me/forms/refund?memberId=268&bookingReference=<?php echo $TPSysId; ?>" style="text-decoration:underline;">Apply for a refund using the form here</a>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<table style="margin-top:12px; width:100%">
<tbody>
<tr>
<td>
<p style="background: #000; color:#fff; padding:5px; padding-left: 20px">
Important
Information</p>
</td>
</tr>
</tbody>
</table>
<table style="width:100%; margin-bottom: 40px;padding-top: 15px;" class="print-info">
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;">1 -
You must web check-in on the airline website and obtain a boarding
pass.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;">2 -
You must download & register on the Aarogya Setu App and carry a
valid ID.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;">3 -
It is mandatory to wear a mask and carry other protective gear.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;">4 -
Reach the terminal at least 2 hours prior to the departure for
domestic flight and 4 hours prior to the departure of international
flight.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;"> 5 -
For departure terminal please check with the airline first.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;"> 6 -
Date & Time is calculated based on the local time of the
city/destination.
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;"> 7 -
Use the Airline PNR for all Correspondence directly with the Airline
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;"> 8 -
For rescheduling/cancellation within 4 hours of the departure time
contact the airline directly
</p>
<p style="padding: 0 8px; margin:0; font-size: 14px; color:#000;"> 9 -
Your ability to travel is at the sole discretion of the airport
authorities and we shall not be held responsible.
</p>
</table>
<table style="width:800px; border-top: 1px solid black;">
<tbody>
<tr>
<td>
<img style="max-width:100%;" src="<?php echo $baseUrl; ?>public/asset/assets/images/goodnItems.png" alt="Goods and Items">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
<script>
const pairs = document.cookie.split(';');
const cookies = {};
pairs.forEach(function(value) {
const pair = value.split('=');
cookies[(pair[0] + '').trim()] = unescape(pair.slice(1).join('='));
});
if (cookies['ccode'] === 'SA') {
var element = document.getElementsByTagName('body')[0];
element.classList.add("body-arabic--wrapper");
}
// else {
// var element = document.getElementsByTagName('body')[0];
// element.classList.add("");
// }
</script>
</html>