403Webshell
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/b2bzend/application/views/scripts/booking-flight/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/booking-flight/amendment-itinerary.phtml
<?php

//$arrStatusType = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getAllStatusType();
//
//$type = $this->type;
//$arrCustomerInvoiceData = $this->arrCustomerInvoiceData;
//$arrtravellerList = $this->arrtravellerList;
//
//$AgencySysId = $arrCustomerInvoiceData[0]['AgencySysId'];
//$CompanyName = $arrCustomerInvoiceData[0]['CompanyName'];
//$strCompanyAddress = $arrCustomerInvoiceData[0]['CompanyAddress'];
//$Pincode = $arrCustomerInvoiceData[0]['Pincode'];
//$strCityTitle = $arrCustomerInvoiceData[0]['CityTitle'];
//$strCountry = $arrCustomerInvoiceData[0]['Country'];
//$PrimaryMobileNo = $arrCustomerInvoiceData[0]['PrimaryMobileNo'];
//$PrimaryContactNo = $arrCustomerInvoiceData[0]['PrimaryContactNo'];
//$PrimaryEmail = $arrCustomerInvoiceData[0]['PrimaryEmail'];
//$companyLogo = $arrCustomerInvoiceData[0]['Logo'];
//
//$GTXMarkup = $arrCustomerInvoiceData[0]['GTXMarkup'];
//$Cost = ($arrCustomerInvoiceData[0]['Cost'] + $GTXMarkup);
//$AgencyMarkUp = ($arrCustomerInvoiceData[0]['AgencyMarkUp'] + $arrCustomerInvoiceData[0]['MarkUp'] + $arrCustomerInvoiceData[0]['AgentsCustomServiceTaxAmount']);
//$AgentServiceTaxAmount = $arrCustomerInvoiceData[0]['AgentServiceTaxAmount'];
//$TotalCost = $arrCustomerInvoiceData[0]['TotalCost'];
//$CurrencySymbol = $arrCustomerInvoiceData[0]['CurrencySymbol'];
//$ExtraMarkup = $arrCustomerInvoiceData[0]['ExtraMarkup'];
//$ExtraMarkupOnGST = $arrCustomerInvoiceData[0]['ExtraMarkupOnGST'];
//
//
//
////customer Details
//$arrTrevllerDetails = $this->arrTrevllerDetails;
////customer Details
//
//$TPSysId = $arrCustomerInvoiceData[0]['TPSysId'];
//$TBQAirInvenSysId = $arrCustomerInvoiceData[0]['TBQAirInvenSysId'];
//$TripType = $arrCustomerInvoiceData[0]['TripType'];
//$IsInternational = $arrCustomerInvoiceData[0]['IsInternational'];
//$strFlightNumber = $arrCustomerInvoiceData[0]['FlightNumber'];
//$strSourceAirportCode = $arrCustomerInvoiceData[0]['SourceAirportCode'];
//$strDestAirportCode = $arrCustomerInvoiceData[0]['DestAirportCode'];
//$strXRefBookingId = $arrCustomerInvoiceData[0]['XRefBookingId'];
//
//$strAirLineTitle = $arrCustomerInvoiceData[0]['AirLineTitle'];
//$strAirLineCode = $arrCustomerInvoiceData[0]['AirLineCode'];
//$ICSourceSysId = isset($arrCustomerInvoiceData[0]['ICSourceSysId']) ? $arrCustomerInvoiceData[0]['ICSourceSysId'] : 0;
//
//$arrBookingId = explode("/", $strXRefBookingId);
//$strXRefBookingId = trim($arrBookingId[0]);
//$strBookingPNR = isset($arrBookingId[1]) ? trim($arrBookingId[1]) : '';
//$strStatusType = $arrCustomerInvoiceData[0]['StatusType'];
//$bookingStatus = $arrStatusType[$strStatusType];
//
//
//$arrBookingDate = (array) $arrCustomerInvoiceData[0]['bookingDate'];
//$strBookingDate = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrBookingDate['date']);
//$arrFromUTCTime = (array) $arrCustomerInvoiceData[0]['FromUTCTime'];
//$arrToUTCTime = (array) $arrCustomerInvoiceData[0]['ToUTCTime'];
//$XRefBookingId = $arrCustomerInvoiceData[0]['XRefBookingId'];
//$sourceDepartueTime = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrFromUTCTime['date']);
//$destinationArrivalTime = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrToUTCTime['date']);
//
////$arrAPIBookingRes = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->json_clean_decode($arrCustomerInvoiceData[0]['APIBookingRes']);
//
//if (isset($arrCustomerInvoiceData[1]['APIBookingRes']) && !empty($arrCustomerInvoiceData[1]['APIBookingRes'])) {
//    $arrAPIBookingRes1 = json_decode($arrCustomerInvoiceData[1]['APIBookingRes'], true);
//    $SECTORSINB = trim($arrCustomerInvoiceData[1]['SourceAirportCode']) . '-' . trim($arrCustomerInvoiceData[1]['DestAirportCode']);
//}
//
//$arrAPIBookingRes = json_decode($arrCustomerInvoiceData[0]['APIBookingRes'], true);
//if (is_array($arrAPIBookingRes)) {
//    $arrAPIBookingRes = $arrAPIBookingRes;
//} else {
//    $arrAPIBookingRes = json_decode($arrAPIBookingRes, true);
//}
//
//$arrPassenger = isset($arrAPIBookingRes['Response']['Response']['FlightItinerary']['Passenger']) ? $arrAPIBookingRes['Response']['Response']['FlightItinerary']['Passenger'] : '';
////$Segments = isset($arrAPIBookingRes['Response']['Response']['FlightItinerary']['Segments']) ? $arrAPIBookingRes['Response']['Response']['FlightItinerary']['Segments'] : '';
//$CancellationCharges = isset($arrAPIBookingRes['Response']['Response']['FlightItinerary']['CancellationCharges']) ? $arrAPIBookingRes['Response']['Response']['FlightItinerary']['CancellationCharges'] : '';
//$FareRuleDetails = isset($arrAPIBookingRes['Response']['Response']['FlightItinerary']['FareRules']) ? $arrAPIBookingRes['Response']['Response']['FlightItinerary']['FareRules'] : '';
//
//$showintax = isset($arrAPIBookingRes['value']['FairRules']['showintax']) ? $arrAPIBookingRes['value']['FairRules']['showintax'] : 0;
//$OtherCharges = ($ExtraMarkup + $ExtraMarkupOnGST);
//$TotalExtraCharge = ($ExtraMarkup + $ExtraMarkupOnGST);
//if ($showintax == 1) {
//    $OtherCharges = $OtherCharges;
//    $ExtraMarkup = 0;
//    $ExtraMarkupOnGST = 0;
//    $TotalExtraProfit = $TotalExtraCharge;
//    $Cost = $Cost + $TotalExtraCharge;
//} else {
//    $ExtraMarkup = $ExtraMarkup;
//    $ExtraMarkupOnGST = $ExtraMarkupOnGST;
//    $OtherCharges = 0;
//    $TotalExtraProfit = $ExtraMarkup;
//    $Cost = $Cost;
//}
//$AgencyMarkUp = $AgencyMarkUp + $ExtraMarkup;
//$AgentServiceTaxAmount = $AgentServiceTaxAmount + $ExtraMarkupOnGST;
//$API_Response = $arrAPIBookingRes['value'];
//if ($arrAPIBookingRes1) {
//    $API_ResponseInb = $arrAPIBookingRes1['value'];
//}
//
//if ($IsInternational == 1 && $TripType == 2) {
//    if (isset($arrAPIBookingRes['value']['InternationalData']['Fare']['FareBreakdown'])) {
//        $FareBreakdown = $arrAPIBookingRes['value']['InternationalData']['Fare']['FareBreakdown'];
//    } else {
//        $FareBreakdown = $arrAPIBookingRes['value']['InternationalData']['FairRules']['FareBreakdown'];
//    }
//} else {
//    $FareBreakdown = $API_Response['FairRules']['FareBreakdown'];
//}
//$TotalFare = 0;
//$TotalServiceFee = 0;
//$TotalGST = 0;
//$TotalAmount = 0;
//$sl = 0;
//$TotalMealFare = 0;
//$TotalBaggFare = 0;
//$TotalSeatFare = 0;
//if ($FareBreakdown) {
//    foreach ($FareBreakdown as $k => $value) {
//        $PassengerCount = $value['PassengerCount'];
//        $valueInb = isset($API_ResponseInb['FairRules']['FareBreakdown'][$k]) ? $API_ResponseInb['FairRules']['FareBreakdown'][$k] : [];
//        // echo "<pre>";
//        // print_r($valueInb);
//        // echo "</pre>";
//        $TaxIN = (($value['TaxIN'] + $valueInb['TaxIN']));
//        $YR = (($value['YR'] + $valueInb['YR']));
//        $MF = (($value['MF'] + $valueInb['MF']));
//        $MFT = (($value['MFT'] + $valueInb['MFT']));
//        $MU = (($value['MU'] + $valueInb['MU']));
//        $OT = (($value['OT'] + $valueInb['OT']));
//        $BaseFareCal = (($value['BaseFare'] + $valueInb['BaseFare']));
//        $YQ = (($value['YQ'] + $valueInb['YQ']));
//        $AGST = (($value['AGST'] + $valueInb['AGST']));
//        $FixedMarkUp = (($value['FixedMarkUp'] + $valueInb['FixedMarkUp']));
//        $GSTOnMarkUp = (($value['GSTOnMarkUp'] + $valueInb['GSTOnMarkUp']));
//        $intTotalGST = (($value['intTotalGST'] + $valueInb['intTotalGST']));
//        $apiMarkup = (($value['apiMarkup'] + $valueInb['apiMarkup']));
//        $apiTaxOnMarkup = (($value['apiTaxOnMarkup'] + $valueInb['apiTaxOnMarkup']));
//        $CommEarned = (($value['CommEarned'] + $valueInb['CommEarned']));
//        $intGTXMarkUp = (($value['intGTXMarkUp'] + $valueInb['intGTXMarkUp']));
//        $GTXMarkUpGST = (($value['GTXMarkUpGST'] + $valueInb['GTXMarkUpGST']));
//        $ExtraMarkup = isset($value['ExtraMarkup']) ? $value['ExtraMarkup'] + $valueInb['ExtraMarkup'] : 0;
//        $ExtraMarkupOnGST = isset($value['ExtraMarkupOnGST']) ? $value['ExtraMarkupOnGST'] + $valueInb['ExtraMarkupOnGST'] : 0;
//        $showintax = isset($value['showintax']) ? $value['showintax'] : 0;
//
//
//        $ServiceFee = ($intGTXMarkUp + $GTXMarkUpGST);
//        $OTTax = ($MF + $MFT + $OT + $YR);
//        //$OTTax = ($apiTaxOnMarkup);
//
//
//
//
//
//        $OtherCharges = ($ExtraMarkup + $ExtraMarkupOnGST);
//        $TotalExtraCharge = ($ExtraMarkup + $ExtraMarkupOnGST);
//        $TotalAmount += ($BaseFareCal + $OTTax + $AGST + $YQ + $GSTOnMarkUp + $FixedMarkUp + $apiMarkup + $apiTaxOnMarkup + $intGTXMarkUp + $GTXMarkUpGST + $TotalExtraCharge);
//        if ($showintax == 1) {
//            $OtherCharges = $OtherCharges;
//            $ExtraMarkup = 0;
//            $ExtraMarkupOnGST = 0;
//            $TotalExtraProfit = $TotalExtraCharge;
//            $BaseFareCal = $BaseFareCal + $TotalExtraCharge;
//        } else {
//            $ExtraMarkup = $ExtraMarkup;
//            $ExtraMarkupOnGST = $ExtraMarkupOnGST;
//            $OtherCharges = 0;
//            $TotalExtraProfit = $ExtraMarkup;
//            $BaseFareCal = $BaseFareCal;
//        }
//        $TotalServiceFee +=  ($FixedMarkUp  + $ExtraMarkup + $apiMarkup);
//        $TotalGST += ($GSTOnMarkUp + $ExtraMarkupOnGST + $apiTaxOnMarkup);
//        // $TotalGST += ($GSTOnMarkUp + $apiTaxOnMarkup + $ExtraMarkupOnGST);
//        $TotalFare += ($BaseFareCal + $OTTax + $AGST + $YQ + $intGTXMarkUp + $GTXMarkUpGST);
//    }
//}
//
//// if ($showintax == 1) {
////     $OtherCharges = $OtherCharges;
////     $ExtraMarkup = 0;
////     $ExtraMarkupOnGST = 0;
////     $TotalExtraProfit = $TotalExtraCharge;
////     $TotalFare = $TotalFare + $TotalExtraCharge;
//// } else {
////     $ExtraMarkup = $ExtraMarkup;
////     $ExtraMarkupOnGST = $ExtraMarkupOnGST;
////     $OtherCharges = 0;
////     $TotalExtraProfit = $ExtraMarkup;
////     $TotalFare = $TotalFare;
//// }
//$IsSeriesFareData = $arrAPIBookingRes['value']['IsSeriesFareData'];
//// echo "<pre>";
//// print_r($IsSeriesFareData);
//// echo "</pre>";die;
//
//$Segments = $arrAPIBookingRes['value']['Segments'];
//$status = $arrAPIBookingRes['response']['order']['status'];
//$travellerInfos = $arrAPIBookingRes['response']['itemInfos']['AIR']['travellerInfos'];
//$SECTORS = trim($arrCustomerInvoiceData[0]['SourceAirportCode']) . '-' . trim($arrCustomerInvoiceData[0]['DestAirportCode']);
//
//
//
//if ($IsInternational == 1 && $TripType == 2) {
//    $CustomeSegment = [];
//    foreach ($arrAPIBookingRes['value']['InternationalData']['Segments'] as $seg) {
//        foreach ($seg as $val) {
//            $CustomeSegment[] = $val;
//        }
//    }
//} else {
//    $CustomeSegment = $arrAPIBookingRes['value']['Segments'];
//    $CustomeSegment1 = $arrAPIBookingRes1['value']['Segments'];
//}
//$sectorArr = [];
//$sectorArrInb = [];
//if ($CustomeSegment) {
//    foreach ($CustomeSegment as $key => $value) {
//        $sectorKey = $value['originAirportCode'] . '-' . $value['destinationAirportCode'];
//        $sectorArr[$sectorKey] = $value['originAirportCode'] . '-' . $value['destinationAirportCode'];
//        $sectorKeyinb = $value['destinationAirportCode'] . '-' . $value['originAirportCode'];
//        $sectorArrInb[$sectorKeyinb] = $value['destinationAirportCode'] . '-' . $value['originAirportCode'];
//    }
//}
//if (isset($arrAPIBookingRes1) && !empty($arrAPIBookingRes1)) {
//    $CustomeSegment = array_merge($CustomeSegment, $CustomeSegment1);
//} else {
//    $CustomeSegment = $CustomeSegment;
//}
$FlightBookingData = $this->FlightBookingData;

$strXRefBookingId = $FlightBookingData[0]['XRefBookingId'];
$TPSysId = $FlightBookingData[0]['TPSysId'];
$bookingDate = date('D, d M y',strtotime($FlightBookingData[0]['bookingDate']));
$strStatusType = $FlightBookingData[0]['StatusType'];
$bookingStatus = $arrStatusType[$strStatusType];
$ICSourceSysId = isset($FlightBookingData[0]['ICSourceSysId']) ? $FlightBookingData[0]['ICSourceSysId'] : 0;
$IsSeriesFareData = 0; // Find

$CustomeSegment = $FlightBookingData[0]['Segments'];

//echo "<pre>123";print_r($CustomeSegment);die;

?>

<body>
    <!--Navigation Top Bar End-->
    <section id="main-container">
        <!--Left navigation section start-->
        <!--Page main section start-->
        <section id="min-wrapper" class="active">
            <div id="main-content">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-12">
                            <!--Top header start-->
                            <h3 class="ls-top-header">Flight Booking</h3>
                            <!--Top header end -->

                            <!--Top breadcrumb start -->
                            <ol class="breadcrumb">
                                <li><a href="#"><i class="fa fa-home"></i></a></li>
                                <li class="active">Booking</li>
                                <li class="active">Cancel Flight Booking</li>
                            </ol>
                            <!--Top breadcrumb start -->
                        </div>
                    </div>
                    <!-- Main Content Element  Start-->
                    <div class="row">

                        <div class="col-md-12">

                            <div class="panel panel-primary">

                                <div class="panel-body">

                                    <div class="col-md-12 no-padding">
                                        <div class="mobile_scrolling">
                                            <table cellspacing="0" cellpadding="0">
                                                <tbody>
                                                    <tr>
                                                        <td height="25" valign="middle"><strong>Booking Id / PNR No. : </strong></td>
                                                        <td height="25" valign="middle"><?php echo $strXRefBookingId; ?></td>
                                                        <td height="25" valign="middle">&nbsp;Travel Plan Id:</td>
                                                        <td height="25" valign="middle"><?= $TPSysId ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td height="25" valign="middle"><strong>Booking Date : </strong></td>
                                                        <td height="25" valign="middle"><?php echo $bookingDate; ?></td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                    </tr>

                                                    <tr>
                                                        <td height="25" valign="middle"><strong>Status :</strong> </td>
                                                        <td height="25" valign="middle"><?php echo $bookingStatus; ?></td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td height="25" valign="middle">Cancellation Type:</td>
                                                        <td height="25" valign="middle">
                                                            <select id="requestType" name="requestType" class="form-control" style="width: auto !important;">
                                                                <option value="">-Select-</option>
                                                                <?php if ($IsSeriesFareData == 1 && $ICSourceSysId == 8) { ?>
                                                                    <option data-value="CANCELLATION" value="8">Cancellation</option>
                                                                    <option data-value="PARTIAL_CANCELATTION" value="7">Partial Cancellation</option>
                                                                <?php } elseif ($ICSourceSysId == 7) { ?>
                                                                    <option data-value="SSR" value="11">Ssr</option>
                                                                    <option data-value="CANCELLATION_QUOTATION" value="12">Cancellation Quotation</option>
                                                                    <option data-value="CANCELLATION" value="8">Cancellation</option>
                                                                    <option data-value="REISSUE_QUOTATION" value="13">Reissue Quotation</option>
                                                                    <option data-value="REISSUE" value="14">Re-Issue</option>
                                                                    <option data-value="FARE_CHANGE" value="15">Fare Change</option>
                                                                    <option data-value="MISCELLANEOUS" value="16">Miscellaneous</option>
                                                                    <option data-value="NO_SHOW" value="17">No Show</option>
                                                                    <option data-value="VOIDED" value="18">Void</option>
                                                                    <option data-value="CORRECTION" value="19">Correction</option>
                                                                <?php } else { ?>
                                                                    <option data-value="FULL_CANCELLATION" value="6">Full Cancellation</option>
                                                                    <option data-value="PARTIAL_CANCELATTION" value="7">Partial Cancellation</option>
                                                                    <option data-value="CHANGE_ITINERARY_REISSUE" value="14">Change Itinerary / Reissue</option>
                                                                <?php } ?>
                                                            </select>
                                                            <!-- <select id="requestType" name="requestType" class="form-control" style="width: auto !important;">
                                                            <option value="">-Select-</option>
                                                            <option value="1">Full Cancellation</option>
                                                            <option value="2">Partial Cancellation</option>
                                                        </select> -->
                                                        </td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                        <td height="25" valign="middle">&nbsp;</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>


                                    <div class="col-md-12 no-padding" style="margin-top:15px;">
                                        <div class="mobile_scrolling">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #bce8f1; border-right: solid 1px #bce8f1; border-left: solid 1px #bce8f1;" class="tablestyle">
                                                <tr class="alert alert-graylight">
                                                    <th class="small smallbold pt_tableth" style="vertical-align:middle;">Select</th>
                                                    <th colspan="2" class="small smallbold pt_tableth" style="vertical-align:middle;">Flight</th>
                                                    <th class="small smallbold pt_tableth" style="vertical-align:middle;">Departure</th>
                                                    <th class="small smallbold pt_tableth" style="vertical-align:middle;">Arrival</th>
                                                    <th class="small smallbold pt_tableth" style="vertical-align:middle;">Baggage, Meal & Other Preference </th>
                                                </tr>
                                                <?php
                                                if ($CustomeSegment) {
                                                    foreach ($CustomeSegment as $k => $flight) {
                                                        $strAirlineCode = $flight['AirlineCode'];
                                                        $filePath = $_SERVER['DOCUMENT_ROOT'] . "/public/upload/AirlineLogo/";
                                                        if (file_exists($filePath . $strAirlineCode . ".gif")) {
                                                            $strAirlineLogo = $strAirlineCode . ".gif";
                                                            $filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
                                                        } elseif (file_exists($filePath . $strAirlineCode . ".png")) {
                                                            $strAirlineLogo = $strAirlineCode . ".png";
                                                            $filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
                                                        } elseif (file_exists($filePath . $strAirlineCode . ".jpg")) {
                                                            $strAirlineLogo = $strAirlineCode . ".jpg";
                                                            $filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
                                                        } elseif (file_exists($filePath . $strAirlineCode . ".jpeg")) {
                                                            $strAirlineLogo = $strAirlineCode . ".jpeg";
                                                            $filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
                                                        } else {
                                                            $filePath = $this->baseUrl("public/upload/AirlineLogo/noimage.png");
                                                        }
                                                        $departureDate = str_replace('T', ' ', $flight['originDepTime']);
                                                        $SourceAirportCode = $flight['OriginAirportCode'];
                                                        $DestAirportCode = $flight['DestAirportCode'];
                                                        // echo '<pre>';
                                                        // print_r($flight);
                                                        // echo '</pre>';

                                                ?>
                                                        <tr>
                                                            <td width="4%" valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <label class="checkbox_popup" for="sectorsSelectors_<?= $k ?>">
                                                                    <input class="checkme" type="checkbox" name="sectorsSelectors" date="<?= date('Y-m-d', strtotime($departureDate)) ?>" value="<?= $SourceAirportCode ?>-<?= $DestAirportCode ?>" id="sectorsSelectors_<?= $k ?>" />
                                                                    <span class="checkmark"></span>
                                                                </label>
                                                            </td>
                                                            <td width="4%" valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <img width="20" src="<?php echo $filePath; ?>" title="<?php echo $flight['AirlineName']; ?>" />
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <?= $flight['AirlineName'] ?>

                                                                <?= $flight['FlightNumber'] ?><br>
                                                                <?= $flight['FareClass'] ?> Class <br>
                                                                Aircraft : <?= $flight['Craft'] ?>
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;  ">
                                                                <?= $flight['OriginAirportCode']; ?> (<?= $flight['originAirportName']; ?>, <?= $flight['originCityName']; ?>)<br>
                                                                <?php if (!empty($flight['DepTerminal'])) {
                                                                    echo 'Terminal: ' . $flight['DepTerminal'] . '<br>';
                                                                } ?>

                                                                <?= date('g:i A D , d-M-Y', strtotime(str_replace('T', ' ', $flight['originDepTime']))); ?>
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <?= $flight['DestAirportCode']; ?> (<?= $flight['destinationAirportName']; ?>, <?= $flight['destinationCityName']; ?>)<br>
                                                                <?php if (!empty($flight['ArrTerminal'])) {
                                                                    echo 'Terminal: ' . $flight['Baggage'] . '<br>';
                                                                } ?>
                                                                <?= date('g:i A D , d-M-Y', strtotime(str_replace('T', ' ', $flight['destinationArrTime']))); ?>
                                                            </td>
                                                            <td width="23%" valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">

                                                                <?php if (!empty($flight['AirlinePNR'])) {
                                                                    echo 'Airline Ref: ' . $flight['AirlinePNR'];
                                                                } ?><br>
                                                                <?php if (!empty($flight['Baggage'])) {
                                                                    echo '<b>Baggage(per Adult):</b> ' . $flight['Baggage'] . '<br>';
                                                                    echo '<b>Cabin Baggage(per Adult):</b> ' . $flight['CabinBaggage'];
                                                                } ?><br>
                                                                <?php if (!empty($Meal[$k])) {
                                                                    echo 'Meal(per Adult): ' . $Meal[$k];
                                                                } ?>
                                                                <?php //echo '<pre>';print_r($Meal[$k]);echo '</pre>'; 
                                                                ?>
                                                                <?php //echo '<pre>';print_r($SegmentAdditionalInfo[$k]);echo '</pre>'; 
                                                                ?>

                                                            </td>
                                                        </tr>
                                                <?php

                                                    }
                                                }

                                                $totalAddon = ($TotalMealFare + $TotalBaggFare + $TotalSeatFare);
                                                $TotalFare = ($TotalFare + $TotalBaggFare + $TotalMealFare + $TotalSeatFare);
                                                ?>
                                            </table>
                                        </div>
                                    </div>

                                    <h3 class="col-md-12 no-padding no-margin slect_passenger_align">Select Passenger</h3>
                                    <div class="col-md-12 no-padding" style="margin-top:10px;">
                                        <div class="table-responsive">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #bce8f1; border-right: solid 1px #bce8f1; border-left: solid 1px #bce8f1;" class="tablestyle">
                                                <tr class="alert alert-graylight">
                                                    <th class="small smallbold pt_tableth">Select</th>
                                                    <th class="small smallbold pt_tableth">Passengers Name</th>
                                                    <th class="small smallbold pt_tableth">Sector</th>
                                                    <th class="small smallbold pt_tableth">PNR</th>
                                                </tr>
                                                <?php 
                                                $ARR_SALUTION = unserialize(ARR_SALUTIONTBO);
                                                if (!empty($this->arrtravellerList)) {

                                                    $intPaxCT = 1;
                                                    foreach ($this->arrtravellerList as $ks1 => $trevllerValue) {
                                                        $CustomerFirstName = trim($trevllerValue['FirstName']);
                                                        $CustomerLastName = trim($trevllerValue['LastName']);
                                                         
                                                        $TicketId = $trevllerValue['TicketId'];
                                                        $CustomerTitle = $ARR_SALUTION[$trevllerValue['Title']];
                                                        $sector = explode('@@', $trevllerValue['Sectors']);
                                                        $pnr = '';
                                                        if ($trevllerValue['paxType'] == 1) {
                                                            $PaxType = 'ADULT';
                                                        } elseif ($trevllerValue['paxType'] == 2) {
                                                            $PaxType = 'CHILD';
                                                        } else {
                                                            $PaxType = 'INFANT';
                                                        }
                                                ?>
                                                        <tr>
                                                            <td valign="middle" style="padding: 9px 0px 15px 5px;width:4%;">
                                                                <label class=" checkbox_popup" for="PaxDetails_<?= $intPaxCT ?>">
                                                                    <input class="checkme" type="checkbox" value="<?= $CustomerFirstName; ?>-<?= $CustomerLastName ?>" PaxType="<?= $PaxType ?>" TPPaxSysId="<?= $trevllerValue['TPPaxSysId']; ?>" TicketId="<?= $TicketId ?>" name="PaxDetails" id="PaxDetails_<?= $intPaxCT ?>" <?php echo (isset($trevllerValue['ChangeRequestStatus']) && $trevllerValue['ChangeRequestStatus'] == 1) ? 'disabled' : ''; ?>>
                                                                    <span class="checkmark"></span>
                                                                </label>
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <?php echo $intPaxCT; ?>. <?php echo $CustomerTitle; ?> <?php echo $CustomerFirstName; ?> <?php echo $CustomerLastName; ?> (<?= $PaxType ?>)
                                                                <span style="color:red"> <?php echo (isset($trevllerValue['ChangeRequestStatus']) && $trevllerValue['ChangeRequestStatus'] == 1) ? 'Cancelled' : ''; ?></span>
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <?= implode('<br>', $sector) ?> <br> <?= ($TripType == 2) ? $sectorInb : '' ?>
                                                            </td>
                                                            <td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
                                                                <?php echo $TicketId; ?>
                                                            </td>
                                                        </tr>
                                                <?php


                                                        $intPaxCT++;
                                                    }
                                                }
                                                ?>
                                            </table>
                                        </div>
                                    </div>

                                    <h3 class="col-md-12 no-padding no-margin remark_title_top">Remarks</h3>
                                    <div class="col-md-12 no-padding" style="margin-top:10px;">
                                        <div class="mobile_scrolling">
                                            <table width="100%" cellspacing="0" cellpadding="0">
                                                <tbody>

                                                    <tr>
                                                        <td valign="middle">&nbsp;</td>
                                                    </tr>

                                                    <tr>
                                                        <td valign="middle">
                                                            <textarea class="cancellation_comments" id="cancellation_comments" name="cancellation_comments" style="height:80px; width: 100%;"></textarea>
                                                            <!-- <textarea id="cancellation_comments" name="cancellation_comments" style="height:100px; width: 650px;"></textarea> -->
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <button type="button" class="btn btn-primary btn-sm pull-right" id="cancel_booking" onclick="cancelBookingNow()">Submit</button>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>

                                </div>
                            </div>

                            <div class="clearfix"></div>
                        </div>



                    </div>

                    <!-- Main Content Element  End-->
                </div>
            </div>
            <div class="modal fade" id="cancelBookingNow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-body">
                            <div class=""><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <div id="GetCancelCharge"></div>
                            </div>
                        </div> <!-- modal-body -->
                    </div> <!-- modal-content -->
                </div> <!-- modal-dialog -->
            </div>

            <?php echo $this->render('copyrightfooter.phtml'); ?>
        </section>

    </section>

    <?php include_once 'application/views/scripts/newfooter.phtml'; ?>
    <script src="<?php echo $this->baseUrl('public/assets/js/bootstrap3-typeahead.js'); ?>"></script>
    <script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
    <script type="text/javascript" src="<?php echo $this->baseUrl('public/js/buyhotel/buyhotellist.js'); ?>"></script>

</body>

</html>
<script type="text/javascript">
    $(document).on('change', '#requestType', function() {
        var value = $(this).val();
        var requestTypeValue = $(this).find('option:selected').attr('data-value');
        var ICSourceSysId = <?= $ICSourceSysId ?>;
        if (requestTypeValue == 'CANCELLATION') {
            $("#cancel_booking").attr('onclick', "cancelBookingNow()");
        } else {
            $("#cancel_booking").attr('onclick', "SubmitcancelBooking()");
        }

        // alert(requestTypeValue);
        // alert(ICSourceSysId);
        if (requestTypeValue == 'CANCELLATION' && (ICSourceSysId == '3' || ICSourceSysId == '8')) {
            $('.checkme').each(function() {
                $(this).prop('checked', true).trigger('change');
                $(this).attr('disabled', true);
                $("#cancel_booking").attr('onclick', "cancelBookingNow()");
            });
        } else {
            $('.checkme').each(function() {
                $(this).prop('checked', false).trigger('change');
                $(this).attr('disabled', false);
                $("#cancel_booking").attr('onclick', "cancelBookingNow()");
            });
        }
    });

    function cancelBookingNow() {

        var cType = '2';
        var cRemarks = $("#cancellation_comments").val();
        var requestType = $("#requestType").val();
        var requestTypeValue = $('#requestType').find('option:selected').attr('data-value');
        var PaxDetails = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).val();
        }).get();
        var PaxType = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('PaxType');
        }).get();
        var ticketid = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('ticketid');
        }).get();
        var TPPaxSysId = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('TPPaxSysId');
        }).get();
        var sectorsSelectors = $('input[name="sectorsSelectors"]:checked').map(function(_, el) {
            return $(el).val();
        }).get();
        var sectorsDates = $('input[name="sectorsSelectors"]:checked').map(function(_, el) {
            return $(el).attr('date');
        }).get();
        if (requestType === '') {
            alert('Please Select Cancellation Type!');
            $("#requestType").focus();
            return false;
        }

        //if (requestType === '2') {
        if (sectorsSelectors.length === 0) {
            alert('Please Select Sector(s)');
            return false;
        }
        if (PaxDetails.length === 0) {
            alert('Please Select Passenger(s)');
            return false;

        }
        //}
        if (cRemarks === "") {
            alert('Enter Remarks');
            return false;
        }
        $.ajax({
            url: '/booking-flight/amendment-itinerary/id/<?= $this->intTPSysId ?>',
            data: {
                requestType: requestType,
                cRemarks: cRemarks,
                sectorsSelectors: sectorsSelectors,
                PaxDetails: PaxDetails,
                PaxType: PaxType,
                ticketid: ticketid,
                TPPaxSysId: TPPaxSysId,
                requestTypeValue: requestTypeValue,
                sectorsDates: sectorsDates
            },
            type: 'POST',
            dataType: 'json',
            beforeSend: function() {
                $("#cancel_booking").html("Please Wait...");
                $("#cancel_booking").prop('disabled', true);
            },
            success: function(response) {

                if (!response.success) {
                    alert(response.msg);
                    $("#cancel_booking").html("Submit").prop('disabled', false);
                    return false;
                } else {
                    $('#cancelBookingNow').modal({
                        backdrop: 'static',
                        keyboard: false
                    });
                    $('#GetCancelCharge').html(response.html);
                    //$("#cancellation_comments").val('');
                    $("#cancel_booking").html("Submit");
                    $("#cancel_booking").prop('disabled', false);
                    // if (response.redirect) {
                    //     location.href = "/customer/myprofile#!0=2"

                    // }
                }
            }
        });
    }

    function SubmitcancelBooking() {
        var cType = '2';
        var cRemarks = $('.cancellation_comments').val();
        var requestType = $("#requestType").val();
        var bookingId_TJ = $("#bookingId_TJ").val();
        var bookingId = $("#bookingId").val();
        var strUrlData = $("#strUrlData").val();
        var requestTypeValue = $('#requestType').find('option:selected').attr('data-value');
        var PaxDetails = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).val();
        }).get();
        var PaxType = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('PaxType');
        }).get();
        var ticketid = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('ticketid');
        }).get();
        var TPPaxSysId = $('input[name="PaxDetails"]:checked').map(function(_, el) {
            return $(el).attr('TPPaxSysId');
        }).get();
        var sectorsSelectors = $('input[name="sectorsSelectors"]:checked').map(function(_, el) {
            return $(el).val();
        }).get();
        var sectorsDates = $('input[name="sectorsSelectors"]:checked').map(function(_, el) {
            return $(el).attr('date');
        }).get();
        if (requestType === '') {
            alert('Please Select Cancellation Type!');
            $("#requestType").focus();
            return false;
        }

        //if (requestType === '2') {
        if (sectorsSelectors.length === 0) {
            alert('Please Select Sector(s)');
            return false;
        }
        if (PaxDetails.length === 0) {
            alert('Please Select Passenger(s)');
            return false;
        }
        //}
        if (cRemarks === "") {
            alert('Enter Remarks');
            return false;
        }
        if (cRemarks !== "") {
            var confrm = confirm("Are you sure ? You want to continue.");
            if (!confrm) {
                return false;
            }
        }
        //return false;

        $.ajax({
            url: '/booking-flight/submit-amendment/id/<?= $this->intTPSysId ?>',
            data: {
                requestType: requestType,
                cRemarks: cRemarks,
                sectorsSelectors: sectorsSelectors,
                PaxDetails: PaxDetails,
                requestTypeValue: requestTypeValue,
                sectorsDates: sectorsDates,
                bookingId: bookingId,
                bookingId_TJ: bookingId_TJ,
                strUrlData: strUrlData,
                PaxType: PaxType,
                ticketid: ticketid,
                TPPaxSysId: TPPaxSysId,
            },
            type: 'POST',
            dataType: 'json',
            beforeSend: function() {
                if (requestTypeValue == 'CANCELLATION') {
                    $("#cancel_ticket").html("Please Wait...");
                    $("#cancel_ticket").prop('disabled', true);
                } else {
                    $("#cancel_booking").html("Please Wait...");
                    $("#cancel_booking").prop('disabled', true);
                }
            },
            success: function(response) {

                if (!response.success) {
                    alert(response.msg);
                    $("#cancel_ticket").html("Continue");
                    return false;
                } else {
                    alert(response.msg);
                    if (requestTypeValue == 'CANCELLATION') {
                        $("#cancel_ticket").html("Continue");
                        $("#cancel_ticket").prop('disabled', false);
                    } else {
                        $("#cancel_booking").html("Please Wait...");
                        $("#cancel_booking").prop('disabled', true);
                    }
                    if (response.redirect) {
                        location.href = "/booking-flight"

                    }
                }


            }
        });


    }
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit