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/b2c.hellogtx.com/application/views/scripts/flight/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2c.hellogtx.com/application/views/scripts/flight/seatmap.phtml
<?php
$baseUrl = $this->baseUrl;
$SegmentsArr = $this->SegmentsArr;
$apiResponse = $this->apiResponse;
$segmentid = $this->segmentid;
$CustomerSession = $this->CustomerSession;

// echo '<pre>';
// print_r($segmentid);
// echo '</pre>';
// echo '<pre>';
// print_r(json_encode($sabir));
// echo '</pre>';
$status = $apiResponse['status']['success'];
$tripSeat = $apiResponse['tripSeatMap']['tripSeat'];
$value = $tripSeat[$segmentid];
$Data = $SegmentsArr[$segmentid];
$originDepTime = Zend_Controller_Action_HelperBroker::getStaticHelper("Flight")->getArrivalDepartureIndianFormat($Data['originDepTime']);
$rows = $value['sData']['row'];
$column = $value['sData']['column'];
$sInfo = $value['sInfo'];

$amount = [];
$seats = [];
$items = [];
foreach ($sInfo as $k => $val) {
    $row = $val['seatPosition']['row'];
    $cols = $val['seatPosition']['column'];
    $amount[] = $val['amount'];
    $seats[$row . '-' . $cols] = array(
        'seatNo' => $val['seatNo'],
        'amount' => $val['amount'],
        'price' => round(($val['amount'] * $this->CurrencyRate),2),
        'isBooked' => $val['isBooked'],
        'isLegroom' => isset($val['isLegroom']) ? $val['isLegroom'] : 0,
        'code' => $val['code'],
        'isAisle' => isset($val['isAisle']) ? $val['isAisle'] : 0,
    );
    $items[$val['seatNo']] = array(
        'seatNo' => $val['seatNo'],
        'amount' => $val['amount'],
        'price' => round(($val['amount'] * $this->CurrencyRate),2),
        'isBooked' => $val['isBooked'],
        'isLegroom' => isset($val['isLegroom']) ? $val['isLegroom'] : 0,
        'code' => $val['code'],
        'isAisle' => isset($val['isAisle']) ? $val['isAisle'] : 0,
    );
}

sort($amount);
$numColors = count(array_values(array_unique($amount)));
$valamount = array_values(array_unique($amount));
$rgbColor = array('f3c0c0', '806a7d', 'e69c77', 'E9C352', 'B589D7', '81f5dc', '4AB8ED', '921297', '923B35', '7C6716','DF3B18','491004','F9D005','0544F9','B305F9','8C043E','04088C','020438','03B9A6','D8DB07','F49204','212F3D');
$ColorArr = array();
for ($i = 0; $i < $numColors; $i++) {
    $ColorArr[$valamount[$i]] = $rgbColor[$i];
}
$selectedSeatSession = new Zend_Session_Namespace('selectedSeatSession');
$selectedSeat = $selectedSeatSession->params[$segmentid];
// echo '<pre>';
// print_r($segmentid);
// echo '</pre>';
// echo 'segmentid<pre>';
// print_r($apiResponse);
// echo '</pre>';die;
?>
<style>
    .Table {
        display: table;

        width: 100%;
    }

    .Title {
        display: table-caption;
        text-align: center;
        font-weight: bold;
        font-size: larger;
    }

    .Heading {
        display: table-row;
        font-weight: bold;
        text-align: center;
    }

    .Row {
        display: table-row;
    }

    .Cell,
    .CellSelected {
        display: table-cell;
        border: solid 1px white;
        border-width: thin;
        padding-left: 8px;
        padding-right: 8px;
        text-align: center;
        height: 35px;
        line-height: 33px;
        color: #fff;
        cursor: pointer;
        background: #cdf;
    }

    .CellBoked {
        display: table-cell;
        border: solid 1px white;
        border-width: thin;
        padding-left: 8px;
        padding-right: 8px;
        text-align: center;
        height: 35px;
        line-height: 33px;
        color: #fff;
    }

    .Cell_text {
        font-size: 14px;
        line-height: 33px;
    }

    .Cell_empty {
        display: table-cell;
        border: solid 1px white;
        border-width: thin;
        padding-left: 8px;
        padding-right: 8px;
        text-align: center;
        height: 35px;
        line-height: 33px;
        color: #fff;

    }

    .CellSelected {
        background: #4aa301 !important;
    }

    .CellTypeC {
        border-right: solid 12px white;
        width: 76px;
        display: inline-block;
    }

    @media (max-width:992px) {
        .CellTypeC {
            border-right: solid 12px white;
            width: 63px;
        }
    }
</style>

<?php
if ($status == 1 && $rows > 1) {
   
?>
    <div class="row">
        <div class="col-lg-3 col-sm-3 col-md-3 col-xs-12">
            <div class="selectsaet-box">
                <div class="selectsaet-title">Select Seats</div>
                <div class="selectflight">
                    <img class="selectseatimage" src="<?= $Data['filePath'] ?>" width="50">

                    <h5 class="alignleft"><?= $Data['AirlineName'] ?> <?= $Data['SegFlightNumber'] ?></h5>

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

                    <div class="destination_left_details alignflightdesti">
                        <div class="destination_name"> <?= $Data['originAirportCode'] ?> - <?= $Data['destinationAirportCode'] ?></div>
                        <p><?= $originDepTime ?></p>
                    </div>

                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
            <div class="passenger_details">
                <ul>
                    <li>
                        <div class="firstcolumn">Passenger</div>
                        <div class="secondcolumn">Seat</div>
                        <div class="thirdcolumn">Fee</div>
                    </li>
                    <?php
                    $totalPax = [];
                    $SelectedSeatArr = [];
                    $totalamount = 0;
                    if ($CustomerSession) {
                        foreach ($CustomerSession as $keys => $pax) {
                            
                            if ($pax['paxType'] == 1) {
                                $paxType = 'ADULT';
                            } elseif ($pax['paxType'] == 2) {
                                $paxType = 'CHILD';
                            }
                            if ($pax['paxType'] == 1 || $pax['paxType'] == 2) {
                                $totalPax[] = $keys;
                                if ($keys == 0) {
                                    $CustomerSysId = $pax['CustomerSysId'];
                                } else {
                                    $CustomerSysId = $pax['CustomerMemberSysId'];
                                }
                                $selectedData = isset($selectedSeat[$CustomerSysId]) ? $selectedSeat[$CustomerSysId] : '';
                                $SelectedSeatArr[] = !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '';
                                $totalamount += !empty($selectedData['amount']) ? $selectedData['amount'] : 0;
                                // echo '<pre>';
                                // print_r($selectedData);
                                // echo '</pre>';
                    ?>
                                <?php if (!empty($selectedData)) { ?>
                                    <li>
                                        <div class="firstcolumn"><?= $paxType ?>-<?= $keys + 1 ?></div>
                                        <div paxType="<?= $paxType ?>-<?= $keys + 1 ?>" id="SeatNoHtml<?= !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '' ?>" class="secondcolumn CustomerSysId CustomerSysIds SelectedSeatNo<?= $keys ?>" CustomerSysId="<?= $CustomerSysId ?>"><?= !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '&nbsp;' ?></div>
                                        <div id="SeatNo<?= !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '' ?>" class="thirdcolumn"><?= $this->CurrencyTitle ?> <span class="SelectedAmt<?= $keys ?>" id="SeatNo<?= !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '' ?>"><?= !empty($selectedData['amount']) ? number_format($selectedData['amount']) : '0.00' ?></span></div>
                                    </li>
                                <?php } else { ?>
                                    <li>
                                        <div class="firstcolumn"><?= $paxType ?>-<?= $keys + 1 ?></div>
                                        <div paxType="<?= $paxType ?>-<?= $keys + 1 ?>" class="secondcolumn CustomerSysId CustomerSysIds SelectedSeatNo<?= $keys ?>" CustomerSysId="<?= $CustomerSysId ?>"><?= !empty($selectedData['seatNo']) ? $selectedData['seatNo'] : '&nbsp;' ?></div>
                                        <div class="thirdcolumn"><?= $this->CurrencyTitle ?> <span class="SelectedAmt<?= $keys ?>"><?= !empty($selectedData['amount']) ? number_format($selectedData['amount']) : '0.00' ?></span></div>
                                    </li>
                                <?php } ?>
                    <?php
                            }
                        }
                    }
                    ?>

                    <li>
                        <div class="firstcolumn">Total</div>
                        <div class="secondcolumn">&nbsp;</div>
                        <div class="thirdcolumn"><?= $this->CurrencyTitle ?> <span class="totalamount"><?= ($totalamount) ? number_format($totalamount) : '0.00' ?></span></div>
                    </li>
                </ul>
                <div class="clearfix"></div>
                <button type="button" class="continue_seatbtn" actiontype="1" segmentid="<?= $segmentid ?>">Continue</button>
                <div class="clearfix"></div>
                <div class="proceedtext">
                    <div class="proceedtext_head continue_seatbtn" actiontype="2" style="text-align: center;text-decoration: underline; color:red !important;cursor: pointer;" segmentid="<?= $segmentid ?>">Proceed Without Seats</div>
                    <div class="clearfix"></div>
                    <div class="proceedtext_content">* Conditions apply. We will try our best to accomodate your seat preferences, however due to operational considerations we can't guarantee this selection. The seat map shown may not be the exact replica of flight layout, we shall not responsible for losses arising from the same. Thank you for your understanding</div>
                </div>

            </div> 
        </div>
        <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12 select_padding_0">
            <div class="seatmap_box">
                <?php

                echo '<div class="Table">';

                for ($tr = 1; $tr <= $rows; $tr++) {
                    echo '<div class="Row">';
                    for ($td = 1; $td <= $column; $td++) {
                        if ($td == 4 && $this->ICSourceSysId != 3) {
                            echo '<div class="Cell_empty"><span class="Cell_text"><span></div>';
                        } else {

                            $SeatData = isset($seats[$tr . '-' . $td]) ? $seats[$tr . '-' . $td] : '';
                            //echo '<pre>';
                            //echo($SeatData['code']);
                            //echo '</pre>';
                            if($SeatData){
                                $amount = $SeatData['amount'];
                                $isBooked = isset($SeatData['isBooked']) ? $SeatData['isBooked'] : 0;
                                if ($isBooked == 1) {
                                    $CellColor = 'a4b4c1';
                                    $Cell = 'CellBoked';
                                } else {
                                    $CellColor = isset($ColorArr[$amount]) ? $ColorArr[$amount] : '';
                                    $Cell = 'Cell';
                                }
                                if (in_array($SeatData['seatNo'], $SelectedSeatArr)) {
                                    $Cell = 'CellSelected';
                                } elseif ($isBooked != 1) {
                                    $Cell = 'Cell';
                                }
                                if ($td == 3 && $this->ICSourceSysId == 3) {
                                    $CellTypeC = 'CellTypeC';
                                } else {
                                    $CellTypeC = '';
                                }

                                if (!empty($SeatData['seatNo'])) {
                                    echo "<div class='" . $Cell . " " . $CellTypeC . "' style='background:#" . $CellColor . "'><span class='Cell_text'>" . $SeatData['seatNo'] . "<span></div>";
                                } else {
                                    echo '<div class="Cell_empty"><span class="Cell_text"></span></div>';
                                }
                            }
                        }
                    }
                    echo "</div>";
                }
                echo "</div>";
                ?>
            </div>

        </div>
        <div class="col-lg-3 col-sm-3 col-md-3 col-xs-12">
            <div class="select_orientation">
                <div class="select_orintationhead">Flight Orientation</div>
                <img src="<?= $baseUrl ?>public/flight/images/selectplane.png" alt="" title="" />

            </div> 
            <div class="selectstatue">
                <div class="status_head">Seat Status</div>
                <ul>
                    <li>
                        <div class="status_green seat_boxalign"></div> - Selected
                    </li>
                    <li>
                        <div class="status_grey seat_boxalign"></div> - Booked
                    </li>
                </ul>

            </div> 

            <div class="selectseatfee">
                <div class="fee_head">Seat Fees</div>
                <ul>
                    <?php
                    if ($ColorArr) {
                        foreach ($ColorArr as $key => $value) {

                    ?>
                            <li>
                                <div class="status_pink seat_boxalign" style="background:#<?= $value ?>"></div><?= $this->CurrencyTitle ?> <?= number_format(($key * $this->CurrencyRate),2) ?>
                            </li>
                    <?php
                        }
                    }
                    ?>

                </ul>

            </div> 


        </div>
        <input type="hidden" value="<?= count($totalPax) ?>" id="totalPax">
    </div>
    <script>
        $(document).on('click', '.Cell', function() {
            var items = jQuery.parseJSON('<?= json_encode($items) ?>');
            var SeatNo = $(this).text();
            var SelectedVal = items[SeatNo];
            var TotalPax = parseInt('<?= count($totalPax) ?>');
            if (TotalPax == CheckPaxcount()) {
                return false;
            }

            $(this).addClass('CellSelected');
            $(this).removeClass('Cell');

            $('.CellSelected').each(function(e) {

                var SelectedVal = items[SeatNo];
                var checkSeat = $('.SelectedAmt' + e).attr('id');
                //alert(e);
                
                if (typeof checkSeat == 'undefined' && SeatNo === SelectedVal.seatNo) {
                    
                    $('.SelectedAmt' + e).html(SelectedVal.price);
                    $('.SelectedAmt' + e).attr('id', 'SeatNo' + SeatNo);
                    $('.SelectedSeatNo' + e).html(SelectedVal.seatNo);
                    $('.SelectedSeatNo' + e).attr('id', 'SeatNoHtml' + SeatNo);
                    // console.log(e);
                    // console.log(SeatNo);
                    return false;

                }


            });

            sumAmount(items);
        });

        function sumAmount(items) {
            var total = 0;
            $('.CellSelected').each(function(e) {
                var SeatNo = $(this).text();
                var SelectedVal = items[SeatNo];
                total += SelectedVal.price;
            });
            $('.totalamount').html(total.toFixed(2));
        }

        function CheckPaxcount() {
            var counter = 0;
            $('.CellSelected').each(function(e) {
                counter++;
            });
            return counter;
        }
        $(document).on('click', '.CellSelected', function() {
            var SeatNo = $(this).text();
            //alert(SeatNo);
            var items = jQuery.parseJSON('<?= json_encode($items) ?>');
            $('#SeatNo' + SeatNo).html('0.00');
            $('#SeatNoHtml' + SeatNo).html('NA');
            $('#SeatNo' + SeatNo).removeAttr('id', 'SeatNo' + SeatNo);
            $('#SeatNoHtml' + SeatNo).removeAttr('id', 'SeatNoHtml' + SeatNo);
            $(this).addClass('Cell');
            $(this).removeClass('CellSelected');

            sumAmount(items);
        });
    </script>
<?php } else { ?>
    <div class="row">
        <p style="text-align: center;">Seat Selection Not Applicable for this Itinerary</p>
    </div>
<?php } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit