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/bookinghotel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/bookinghotel/index.phtml
<?php
$IsCallCenter = Travel_Model_AgencyAuth::getIdentity()->IsCallCenter;
//echo '<pre>'; print_r($this->hotelList);
$customhelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
$AgencyUser = new Zend_Session_Namespace('AgencyUser');
$IsMaskingOnEmailAndMobile = $AgencyUser->user->IsMaskingOnEmailAndMobile;
$IsFullMaskingEnabled = $AgencyUser->user->IsFullMaskingEnabled;
$arrStatusType = $customhelper->getAllStatusType();
$source = $this->source;
$sourceUrl = '';
if ($source != '') {
    $sourceUrl = '/filter/' . $source;
}
?>

<body class="">
    <!--Navigation Top Bar Start-->

    <!--Navigation Top Bar End-->

    <!--Left navigation section end-->


    <!--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">Hotels 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">Hotels</li>
                        </ol>
                        <!--Top breadcrumb start -->
                    </div>
                </div>
                <!-- Main Content Element  Start-->
                <div class="row">


                    <div class="col-md-12">
                        <div class="successMessage">
                            <?php
                            if (!empty($this->messages)) {
                                echo ($this->messages[0]);
                            }
                            ?>
                        </div>
                    </div>





                    <div class="col-md-12">
                        <div class="panel panel-primary">
                            <div class="panel-heading" style="padding:0">
                                <h3 class="panel-title" onClick="$('.minus').trigger('click')" style="padding:15px"><img src="<?php echo $this->baseUrl('public/images/query_dashboard/filtericon.png'); ?>">
                                    Filter By</h3>
                                <ul class="panel-control">
                                    <li><a class="minus active" href="javascript:void(0)"><i class="fa fa-angle-down large"></i></a></li>
                                </ul>
                            </div>
                            <div class="panel-body" style="display:none;">
                                <form name="packageFilterForm1" method="post" class="ls_form" role="form" action="<?php echo $this->baseUrl('bookinghotel/index/filter/' . $source); ?>" id="packageFilterForm">
                                    <div class="row">
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label>Proposal ID</label>
                                                <input class="form-control whbg" placeholder="Proposal Id" name="proposalId" id="proposalId" value="<?php echo isset($this->proposalId) ? $this->proposalId : '' ?>">

                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label>Hotel Name</label>
                                                <input name="hotel_name" id="hotel_name" placeholder="Hotel Name..." value="<?php echo !empty($this->strHotelName) ? $this->strHotelName : ''; ?>" type="text" class="form-control whbg">
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label>Destination</label>
                                                <input name="destination" id="selectDestination_" placeholder="Destination" value="<?php echo !empty($this->destination) ? $this->destination : ''; ?>" type="text" class="form-control whbg ">
                                                <input name="destinationId" id="hidden_selected_hotel_id" placeholder="Destination" value="<?php echo !empty($this->destinationId) ? $this->destinationId : ''; ?>" type="hidden" class="form-control whbg ">
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label>Check In Date</label>
                                                <input name="checkIn_date" id="checkIn_date" placeholder="DD-MM-YYYY" value="<?php echo !empty($this->strCheckInDate) ? $this->strCheckInDate : ''; ?>" readonly="" type="text" class="form-control whbg datePickerOnly">
                                            </div>
                                        </div>
                                        <div class="col-md-3" style="display:none;">
                                            <div class="active form-group">
                                                <label>Status</label>
                                                <select id="booking_status" name="booking_status" class="demo-default select-country" placeholder="Select">
                                                    <option value="0">Select</option>
                                                    <?php
                                                    if (!empty($arrStatusType)) {
                                                        foreach ($arrStatusType as $intKey => $strStatus) {
                                                            if ($intKey == $this->intBookingStatus) {
                                                                $selected = "selected";
                                                            } else {
                                                                $selected = "";
                                                            }
                                                    ?>
                                                            <option value="<?php echo $intKey; ?>" <?php echo $selected; ?>>
                                                                <?php echo $strStatus; ?></option>
                                                    <?php
                                                        }
                                                    }
                                                    ?>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label for="customername2">Customer Name</label>
                                                <input class="form-control whbg" type="text" id="customername2" name="customername" value="<?php echo isset($this->customername) ? $this->customername : ''; ?>" />

                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label for="customermobile">Customer Mobile</label>
                                                <input class="form-control whbg" type="text" id="customermobile" name="customermobile" value="<?php echo isset($this->customermobile) ? $this->customermobile : ''; ?>" />

                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="active form-group">
                                                <label for="customeremail">Customer Email</label>
                                                <input class="form-control whbg" type="text" id="customeremail" name="customeremail" value="<?php echo isset($this->customeremail) ? $this->customeremail : ''; ?>" />

                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group form-group1 flexipadding pull-right ">
                                                <button onClick="window.location.href = '<?php echo $this->baseUrl('/bookinghotel/index' . $sourceUrl); ?>'" class="btn btn-primarygray" type="button">Reset</button>
                                                <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> Filter</button>
                                                <input type="hidden" name="page" id="page" value="1" />
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>








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

                        <div class="panel-body table-responsivenew leadeBorder leadeBorder2 ">
                            <div class="clearfix"></div>
                            <form action="" method="post" id="query_status">
                                <div class="col-md-12 no-padding filter_status_report">
                                    <ul class="mobile_scrolling">
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/today'); ?>" class="btn <?php echo $source == 'today' || $source == '' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return activateUsers();">Today</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/yesterday'); ?>" class="btn <?php echo $source == 'yesterday' || $source == '' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return activateUsers();">Yesterday</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/current-week'); ?>" class="btn <?php echo $source == 'current-week' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return deactivateUsers();">Current Week</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/last-week'); ?>" class="btn <?php echo $source == 'last-week' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return deleteMarketingList();">Last Week</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/current-month'); ?>" class="btn <?php echo $source == 'current-month' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return deleteMarketingList();">Current Month</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/last-month'); ?>" class="btn <?php echo $source == 'last-month' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return deleteMarketingList();">Last Month</a></li>
                                        <li><a href="<?php echo $this->baseUrl('/bookinghotel/index/filter/overall'); ?>" class="btn <?php echo $source == 'overall' ? 'btn-warning' : 'btn-danger'; ?> btn-sm" onclick="return deleteMarketingList();">Over All</a> </li>

                                        <li class="" style="width:120px"> <input name="from_date" id="report_from_date" type="text" class="form-control  whbg report_from_date" value="<?php echo (isset($this->from_date) && $this->from_date != '') ? $this->from_date : ''; ?>" style="height:34px">
                                        </li>
                                        <li class="" style="width:120px"> <input name="to_date" id="report_to_date" type="text" class="form-control  whbg report_to_date" value="<?php echo (isset($this->to_date) && $this->to_date != '') ? $this->to_date : ''; ?>" style="height:34px">
                                        </li>
                                        <!-- <li class=""><a href="javascript://" class="btn btn-primarygray" onclick="submit_queryDate()">Submit</a>   </li> -->
                                        <li> <button class="btn btn-danger  btn-sm" type="submit" id="filter_query" style="padding:7px">
                                                Submit</button> </li>

                                    </ul>
                                </div>
                            </form>
                            <div class="clearfix"></div>
                            <div class="table-responsive">
                                <table class="table tablestyle sortable-theme-bootstrap">
                                    <thead>
                                        <tr class="alert alert-graylight">
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Proposal ID</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Booking&nbsp;&nbsp; Date</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Hotel Name</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Booking&nbsp;ID</th>

                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Check&nbsp;In /<br> Check&nbsp;Out</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Pax</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">City</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Total Amount</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Paid Amount</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Balance </th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Customer Details</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Booked By</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="true" data-sorted="true" data-sorted-direction="descending">Status</th>
                                            <th align="left" valign="top" class="small smallbold" data-sortable="false">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $customhelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
                                        if (!empty($this->arrHotelBookingList)) {
                                            //echo "<pre>";print_r($this->arrHotelBookingList); echo "</pre>";//exit;
                                            $objBuyHotel = new Travel_Model_TblBuyHotel();
                                            $h = 0;
                                            foreach ($this->arrHotelBookingList as $value) {
                                                // echo "<pre>";
                                                // print_r($value);
                                                // echo "</pre>";

                                                $IsFromAPI = $value['IsFromAPI'];
                                                $intCustomerSysId = $value['CustomerSysId'];
                                                $intTPSysId = $value['TPSysId'];
                                                $arrTrevllerDetails = $objBuyHotel->GetAgencyCustomerDetailsForBooking($intCustomerSysId, $intTPSysId);
                                                $strFirstName = $arrTrevllerDetails['FirstName'];
                                                $strLastName = $arrTrevllerDetails['LastName'];
                                                $strEmailId = $arrTrevllerDetails['EmailId'];
                                                $strContacts = $arrTrevllerDetails['Contacts'];
                                                $countrycode = $arrTrevllerDetails['countrycode'];
                                                $intNetCost = trim($value['NetCost']);
                                                $intAgencyMarkUp = trim($value['AgencyMarkUp']);
                                                $intGTXMarkup = trim($value['GTXMarkup']);
                                                $intXServiceTaxAmount = trim($value['XServiceTaxAmount']);
                                                $intGTXServiceTaxAmount = trim($value['GTXServiceTaxAmount']);
                                                $intAgentServiceTaxAmount = trim($value['AgentServiceTaxAmount']);
                                                $TotalAmountPaid =  (isset($value['TotalAmountPaid']) && !empty($value['TotalAmountPaid'])) ? ($value['TotalAmountPaid']) : 0;
                                                $arrBookingDate = (array) $value['bookingDate'];
                                                $strBookingDate = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrBookingDate['date']);

                                                //$arrFromDate = (array) $value['FromDate'];
                                                //$strFromDate = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrFromDate['date']);
                                                //$arrToDate = (array) $value['ToDate'];
                                                //$strToDate = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrToDate['date']);

                                                $strXRefBookingId = $value['XRefBookingId'];
                                                $IsNewMigration = $value['IsNewMigration'];
                                                $arrBookingId = explode("/", $strXRefBookingId);
                                                $strBookingId = trim($arrBookingId[0]);

                                                $uid = $value['CustomerSysId'] . ':' . $value['TPSysId'] . ':' . $value['MasterTPSysId'];
                                                $display = 'unique:yes';
                                                $uid = $this->controller->getEnc($uid);
                                                $display = $this->controller->getEnc($display);

                                                $currencySymbol = $customhelper->GetCurrencyByCurrencyType($value['CurrencyType']);

                                                $agtFirstName = $value['agtFirstName'];
                                                $agtLastName = $value['agtLastName'];

                                                if ($value['ToDate'] != '') {
                                                    //echo "sadsad"; exit;
                                                    if ($value['PackSpecType'] == 4) {
                                                        $ToDate = $value['ToDate']->format('Y-m-d');
                                                        $ToDate1 = date('d-M-y', strtotime($ToDate . ' - 1 days'));
                                                    } else {
                                                        $ToDate1 = $value['ToDate']->format('d-M-y');
                                                    }
                                                } else {
                                                    $ToDate1 = '';
                                                }
                                                $travellerDetail = isset($value['RoomInfoJson']) && $value['RoomInfoJson'] != '' ? json_decode($value['RoomInfoJson']) : 0;
                                                $adultPax = 0;
                                                $childPax = 0;
                                                $departuredate =  $returndate = '';
                                                if (is_object($travellerDetail)) {
                                                    foreach ($travellerDetail as $res) {
                                                        $adultPax += $res->Adult;
                                                        $childPax += $res->Child;
                                                        $departuredate = $res->departuredate;
                                                        $returndate = $res->returndate;
                                                    }
                                                }
                                                $departuredateYMD = $returndateYMD = '';
                                                if ($departuredate != '' && $returndate != '') {
                                                    $departuredateDT = DateTime::createFromFormat('d/m/Y', $departuredate);
                                                    $returndateDT = DateTime::createFromFormat('d/m/Y', $returndate);
                                                    $departuredateYMD = $departuredateDT->format('d-M-y');
                                                    $returndateYMD = $returndateDT->format('d-M-y');
                                                }

                                                $proposalID = 'D/' . date('y') . '/' . $value['TPSysId'] . "/V" . $value['VersionId'];
                                                //echo "askjdhksa";
                                                //exit;
                                                //echo '<pre>'; print_r($val);
                                        ?>
                                                <tr class="alert alert-warning small">
                                                    <td><?php echo $proposalID; ?></td>
                                                    <td><?php echo $value['bookingDate']->format('d-M-y'); ?></td>
                                                    <td align="left">
                                                        <?php echo ($value['hotelName'] != '') ? $value['hotelName'] : $value['hotelNameInv']; ?>
                                                    </td>
                                                    <td align="left">
                                                        <?php echo !empty($value['XRefBookingId']) ? $value['XRefBookingId'] : $value['TPSysId']; ?>
                                                    </td>


                                                    <td><?php
                                                        if ($departuredateYMD != '' && $returndateYMD != '') {
                                                            echo $departuredateYMD . '<br>' . $returndateYMD;
                                                        } else {
                                                            if ($value['FromDate'] != '') {
                                                                echo $value['FromDate']->format('d-M-y') . '<br>';
                                                            }
                                                            echo $ToDate1;
                                                        }
                                                        ?>
                                                    </td>
                                                    <td align="center">
                                                        <?php echo $adultPax . " Adult(s)";
                                                        echo $childPax > 0 ? "," . $childPax . " Kid(s)" : '';
                                                        ?> </td>
                                                    <td align="left">
                                                        <?php echo (trim($value['cityTitle']) != '') ? stripslashes($value['cityTitle']) : stripslashes($value['SourcePlaces']); ?>
                                                    </td>

                                                    <td align="left">
                                                        <?php
                                                        echo $currencySymbol['Symbol']; ?> <?php echo number_format($value['NetPrice'], 2);
                                                                                            if ($value['isOnlyHotelPackage'] == 1) {
                                                                                            ?>
                                                            <br>
                                                            <a class="viewtext_red myModalViewAddons" href="<?php echo $this->baseUrl('crm/query/get-addon-data/id/' . base64_encode($value['TPSysId'])); ?>" data-toggle="modal" data-target="#getAddonDataModal"><span class="blueview_text">(View)</span> </a>
                                                        <?php } ?>
                                                    </td>
                                                    <td align="left"><?php echo $currencySymbol['Symbol']; ?>
                                                        <?php echo (!empty($TotalAmountPaid)) ? number_format($TotalAmountPaid, 2) : '--'; ?>
                                                    </td>
                                                    <td align="left"><?php echo $currencySymbol['Symbol']; ?>
                                                        <?php echo (!empty($TotalAmountPaid)) ? number_format(($value['NetPrice'] - $TotalAmountPaid), 2) : '--'; ?>
                                                    </td>
                                                    <td align="left">
                                                        <span><i class="fa fa-user" aria-hidden="true"></i>
                                                            <?php echo !empty($strFirstName) ? $strFirstName . ' ' . $strLastName : 'NA'; ?>
                                                        </span>
                                                        <br />
                                                        <span valign="top" title="<?php echo $strEmailId ? $customhelper->hideEmailidCharacters(stripslashes($strEmailId), $IsFullMaskingEnabled): ''; ?>">
                                                            <i class="fa fa-envelope" aria-hidden="true"></i> <?php echo $strEmailId ? $customhelper->hideEmailidCharacters(stripslashes($strEmailId), $IsMaskingOnEmailAndMobile) : ''; ?>
                                                        </span>
                                                        <br />
                                                        <span valign="top" title="<?php echo $strContacts ? $customhelper->hidePhoneNumberDigit(stripslashes($strContacts), $IsFullMaskingEnabled): ''; ?>">
                                                            <?php
                                                            if ($IsCallCenter == 1) {
                                                                echo $strContacts ?  "<a href='javascripts://' onclick='callInitiated(" . $strContacts . ")'><i class='fa fa-phone' aria-hidden='true'></i> " . $countrycode . '-' .  $customhelper->hidePhoneNumberDigit(stripslashes($strContacts), $IsMaskingOnEmailAndMobile) . '</a>' : '';
                                                            } else {
                                                                echo $strContacts ? "<a href='tel:" . $customhelper->hidePhoneNumberDigit(stripslashes($strContacts), $IsFullMaskingEnabled) . "'><i class='fa fa-phone' aria-hidden='true'></i> " . $countrycode . '-' .  $customhelper->hidePhoneNumberDigit(stripslashes($strContacts), $IsMaskingOnEmailAndMobile) . '</a>' : '';
                                                            }
                                                            ?>
                                                        </span>
                                                    </td>
                                                    <td><?php echo !empty($agtFirstName) ? $agtFirstName : ''; ?>
                                                        <?php echo !empty($agtLastName) ? $agtLastName : ''; ?></td>
                                                    <td align="left"><span id="status_<?php echo $h; ?>" class="proposalStatus"><?php echo $customhelper->GetTravelPlanStatusName(2, $value['StatusType']); ?></span>
                                                    </td>
                                                    <td align="left">
                                                        <?php
                                                        if ($value['FromDate'] != '') {
                                                            $hotelFromDate = strtotime($value['FromDate']->format('Y-m-d'));
                                                        } else {
                                                            $hotelFromDate = '';
                                                        }
                                                        $curdate = strtotime(date('Y-m-d'));
                                                        // echo $curdate."/".$hotelFromDate;
                                                        if (isset($value['isOnlyHotelPackage']) && $value['isOnlyHotelPackage'] != 1) {
                                                            if ($curdate > $hotelFromDate) {
                                                                $allStatusDisplayArrayById = $customhelper->getDisplayStatusByStatusId($value['StatusType'], '', 'hotel', 2, 18);
                                                            } else {
                                                                $allStatusDisplayArrayById = $customhelper->getDisplayStatusByStatusId($value['StatusType'], '', 'hotel', 2, 18);
                                                            }
                                                            // echo "<pre>";
                                                            // print_r($value['StatusType']);
                                                            // print_r($allStatusDisplayArrayById);
                                                            // echo "</pre>";
                                                        } else {
                                                            if ($curdate > $hotelToDate) {

                                                                $allStatusDisplayArrayById = $customhelper->getDisplayStatusByStatusId($value['StatusType'], '', 'package', 2, 15);
                                                            } else {
                                                                $allStatusDisplayArrayById = $customhelper->getDisplayStatusByStatusId($value['StatusType'], '', 'package', 2, 15);
                                                            }
                                                        }

                                                        ?>
                                                        <div class="btn-group" id="hotel_<?php echo $value['TPSysId']; ?>">
                                                            <input type="hidden" id="packageCurrency_<?php echo $value['TPSysId']; ?>" value="<?php echo $this->CurrencySymbol[$value['CurrencyType']]; ?>">
                                                            <button type="button" class="btn btn-danger btn-sm dropdown-toggle" data-toggle="dropdown">
                                                                Select <span class="caret"></span>
                                                            </button>
                                                            <ul class="dropdown-menu pull-right" role="menu">
                                                                <?php
                                                                //"proposalModuleComp";
                                                                if (!empty($allStatusDisplayArrayById)) {
                                                                    if (isset($value['isOnlyHotelPackage']) && $value['isOnlyHotelPackage'] != 1) {
                                                                        foreach ($allStatusDisplayArrayById as $keyid => $keyval) {
                                                                            switch ($keyval['ComponentType']) {
                                                                                case 1: #for view proposal
                                                                ?>
                                                                                    <li><a href="<?php echo $this->baseUrl('/proposal/preview-hotel-result/mid/' . base64_encode($value['MasterTPSysId']) . '/pid/' . base64_encode($value['TPSysId']) . '/uid/' . base64_encode($uid) . '/type/' . base64_encode($display)); ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 3: #for Resend Proposal                                   
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onClick="actionSendProposal('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>)"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 4: #for Book Proposal
                                                                                ?>
                                                                                    <li><a href="<?php echo $this->baseUrl('/proposal/preview-hotel-result/mid/' . base64_encode($value['MasterTPSysId']) . '/pid/' . base64_encode($value['TPSysId']) . '/uid/' . base64_encode($uid) . '/type/' . base64_encode($display)); ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 5: #for Discard Proposal
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onClick="actionDiscardQuery('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>, 'hotel_<?php echo $value['TPSysId']; ?>',<?php echo $value['MasterTPSysId']; ?>,<?php echo $value['CustomerSysId']; ?>, '<?php echo base64_encode(15); ?>')"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 6: #for Cancel Proposal
                                                                                    $bookingCancelURL = '#';
                                                                                    if (($value['ICSourceSysId'] == 4 || $value['ICSourceSysId'] == 3) && $value['StatusType'] == 17) {
                                                                                        $XrefBookingIdArray = $value['XrefBookingId'];
                                                                                        if (isset($XrefBookingIdArray) && !empty($XrefBookingIdArray)) {
                                                                                            $XrefBookingIdArray = explode("/", $value['XrefBookingId']);
                                                                                            $XrefBookingId = $XrefBookingIdArray[1];
                                                                                            $bookingCancelURL = $this->baseUrl('/bookinghotel/view-and-cancel-hotel-booking/cid/' . base64_encode($value['CustomerSysId']) . '/tid/' . base64_encode($value['TPSysId']));
                                                                                        }
                                                                                    }
                                                                                ?>
                                                                                    <li><a target="_blank" href="<?php echo $bookingCancelURL; ?>"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 7: #for Refund proposal
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onClick="actionSendProposal('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>)"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 8: #for Iteration Required proposal
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onClick="actionChangeProposalStatus('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>, 'hotel_<?php echo $value['TPSysId']; ?>',<?php echo $value['MasterTPSysId']; ?>,<?php echo $value['CustomerSysId']; ?>, '<?php echo base64_encode(27); ?>')"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 9: #for Update Payment proposal
                                                                                ?>
                                                                                    <li><a onClick="alert('Work in progress');"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 10: #for Voucher proposal

                                                                                    if ($value['IsFromAPI'] == 1) {
                                                                                        if ($IsNewMigration == 3) {
                                                                                            $link = $this->baseUrl('/buyhotel/printvoucher/data/' . base64_encode($value['TPSysId']));
                                                                                        } else {
                                                                                            $link = $this->baseUrl('/proposal/hotel-voucher/mid/' . base64_encode($value['MasterTPSysId']) . '/pid/' . base64_encode($value['TPSysId']) . '/uid/' . base64_encode($uid));
                                                                                        }
                                                                                    } else {
                                                                                        $secureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(base64_encode($value['TPSysId']), 1);
                                                                                        $link = $this->baseUrl('/build-your-own/index/fullfillment/type/V/code/' . $secureCode . '/qid/' . base64_encode($value['TPSysId']));
                                                                                    }
                                                                                ?>
                                                                                    <li><a href="<?php echo $link; ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 11: #for Invoice proposal
                                                                                    if ($IsNewMigration == 3) {
                                                                                        $link = $this->baseUrl('/buyhotel/printinvoice/data/' . base64_encode($value['TPSysId']));
                                                                                    } else {
                                                                                        $link = $this->baseUrl('/proposal/hotel-invoice/mid/' . base64_encode($value['MasterTPSysId']) . '/pid/' . base64_encode($value['TPSysId']) . '/uid/' . base64_encode($uid));
                                                                                    }
                                                                                ?>
                                                                                    <li><a href="<?php echo $link; ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                            <?php
                                                                                    break;
                                                                            }
                                                                            ?>
                                                                            <?php
                                                                        }
                                                                    } else {
                                                                        $isPkgReadymade = 1;
                                                                        $secureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(base64_encode($value['TPSysId']), 1);

                                                                        $viewPackageLink = $this->baseUrl('/publicpackage/view-customer-final-package/code/' . $secureCode . '/id/' . base64_encode($value['TPSysId']));
                                                                        $pkgId = $value['MasterTPSysId'];
                                                                        if ($value['PackSpecType'] == 4) {
                                                                            $modifyOnclick = $this->baseUrl('/packagesearch/buildquickpackage/id/' . base64_encode($value['TPSysId']) . '/code/' . $secureCode . '/pkgId/' . base64_encode($pkgId) . '/type/mod');
                                                                        } else {
                                                                            $modifyOnclick = $this->baseUrl('/build-your-own/index/modify-customer-package/code/' . $secureCode . '/qid/' . base64_encode($value['TPSysId']));
                                                                        }

                                                                        foreach ($allStatusDisplayArrayById as $keyid => $keyval) {
                                                                            switch ($keyval['ComponentType']) {
                                                                                case 1:
                                                                            ?>
                                                                                    <li><a href="<?php echo $viewPackageLink; ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 2:
                                                                                ?>
                                                                                    <li><a href="<?php echo $modifyOnclick; ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 4:
                                                                                ?>
                                                                                    <li><a href="<?php echo $viewPackageLink; ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 5:
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onclick="actionChangeProposalStatus('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>, 'package_<?php echo $value['TPSysId']; ?>',<?php echo $value['MasterTPSysId']; ?>,<?php echo $value['CustomerSysId']; ?>, '<?php echo base64_encode(15); ?>')"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 6:
                                                                                ?>
                                                                                    <li><a href="/packagesearch/view-and-cancel-package-booking/id/<?php echo base64_encode($value['TPSysId']); ?>" target="_blank"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 7:
                                                                                ?>
                                                                                    <li><a onclick="alert('Work in progress');"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                <?php
                                                                                    break;
                                                                                case 8:
                                                                                ?>
                                                                                    <li><a href="javascript:void(0);" onclick="actionChangeProposalStatus('<?php echo base64_encode($value['TPSysId']); ?>',<?php echo $h; ?>, 'package_<?php echo $value['TPSysId']; ?>',<?php echo $value['MasterTPSysId']; ?>,<?php echo $value['CustomerSysId']; ?>, '<?php echo base64_encode(27); ?>')"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                                    <?php
                                                                                    break;
                                                                                case 9:
                                                                                    if ($value['StatusType'] != 17) {
                                                                                    ?>
                                                                                        <li><a onclick="updatePayment('<?php echo $value['TPSysId']; ?>', '<?php echo $value['NetPrice']; ?>', '<?php echo $value['TotalAmountPaid']; ?>');"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                        </li>
                                                                                    <?php
                                                                                    }
                                                                                    break;
                                                                                case 10:
                                                                                    ?>
                                                                                    <!--                                                <li><a target="_blank"
                                                                                                                                                href="<?php echo $this->baseUrl('/package-booking/package-booking-voucher/pid/' . base64_encode($value['TPSysId']) . '/cid/' . base64_encode($value['CustomerSysId'])); ?>"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                                                                        </li>-->
                                                                                <?php
                                                                                    break;
                                                                                case 11:
                                                                                ?>
                                                                                    <li><a target="_blank" href="<?php echo $this->baseUrl('/package-booking/package-booking-invoice/pid/' . base64_encode($value['TPSysId']) . '/cid/' . base64_encode($value['CustomerSysId'])); ?>"><?php echo stripslashes($keyval['Title']); ?></a>
                                                                                    </li>
                                                                        <?php
                                                                                    break;
                                                                            }
                                                                        }
                                                                        ?>
                                                                        <?php
                                                                        $secureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(base64_encode($value['TPSysId']), 1);
                                                                        ?>
                                                                        <li><a target="_blank" href="<?php echo $this->baseUrl('/build-your-own/index/fullfillment/type/V/code/' . $secureCode . '/qid/' . base64_encode($value['TPSysId'])); ?>">Fullfillment</a>
                                                                        </li>

                                                                <?php
                                                                    }
                                                                }
                                                                ?>
                                                            </ul>
                                                        </div>
                                                    </td>
                                                </tr>
                                            <?php
                                                $h++;
                                            }
                                        } else {
                                            ?>
                                            <tr class="alert alert-warning small">
                                                <td colspan="11">No records available!</td>
                                            </tr>
                                        <?php } ?>



                                    </tbody>
                                </table>
                            </div>

                            <div class="panel-box clearfix">
                                <?php if (!empty($this->arrHotelBookingList)) {
                                    $IsSubmitForm = (isset($this->searchArr) && !empty($this->searchArr)) ? true : false;
                                ?>
                                    <?php echo $this->paginationControl($this->arrHotelBookingList, 'Sliding', 'pagination-form.phtml', array('IsSubmitForm' => $IsSubmitForm, 'FormName' => 'packageFilterForm')); ?>
                                <?php } ?>
                            </div>


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

                <!-- Main Content Element  End-->
            </div>
        </div>


        <?php echo $this->render('copyrightfooter.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>

        <script src="<?php echo $this->baseUrl('public/js/customer/customer.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/customer.js'); ?>"></script>
        <?php include_once 'application/views/scripts/newfooter.phtml'; ?>
    </section>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#booking_date').datetimepicker({
                format: 'd-m-Y',
                timepicker: false,
                maxDate: 0
            });
            $('#checkIn_date').datetimepicker({
                format: 'd-m-Y',
                timepicker: false,
                //maxDate: 0
            });
            $('#getAddonDataModal').on('hidden.bs.modal', function() {
                $(this).removeData('bs.modal');
            });
        });
        $('#selectDestination_').typeahead({
            items: 'all',
            showHintOnFocus: true,
            minLength: 0,
            source: function(query, process) {

                if (query.replace(/ /g, '').length > 2) {
                    $('#hidden_selected_hotel_cityid').val('');
                    return $.ajax({
                        url: '/buyhotel/autosuggestnew',
                        type: 'post',
                        //async: false,
                        data: {
                            query: query
                        },
                        dataType: 'json',
                        success: function(result) {
                            var resultList = result.map(function(item) {
                                var aItem = {
                                    TBBCityId: item.TBBCityId,
                                    CityId: item.CityId,
                                    label: item.label,
                                    countryCode: item.countryCode,
                                    ContId: item.ContId
                                };
                                return JSON.stringify(aItem);
                            });
                            return process(resultList);
                        }
                    });
                } else {
                    var resultList = DefaultCity.map(function(item) {
                        var aItem = {
                            TBBCityId: item.TBBCityId,
                            CityId: item.CityId,
                            label: item.label,
                            countryCode: item.countryCode,
                            ContId: item.ContId
                        };
                        return JSON.stringify(aItem);
                    });
                    return process(resultList);
                }
            },
            sorter: function(items) {
                var beginswith = [],
                    caseSensitive = [],
                    caseInsensitive = [],
                    item;
                while (aItem = items.shift()) {
                    var item = JSON.parse(aItem);
                    if (!item.label.toLowerCase().indexOf(this.query.toLowerCase()))
                        beginswith.push(JSON.stringify(item));
                    else if (~item.label.indexOf(this.query))
                        caseSensitive.push(JSON.stringify(item));
                    else
                        caseInsensitive.push(JSON.stringify(item));
                }
                return beginswith.concat(caseSensitive, caseInsensitive)

            },
            highlighter: function(obj) {
                var item = JSON.parse(obj);
                var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
                return item.label.replace(new RegExp('(' + query + ')', 'ig'), function($1, match) {
                    return '<strong>' + match + '</strong>'
                })
            },
            updater: function(item) {
                var item = JSON.parse(item);
                console.log(item);
                $('#hidden_selected_hotel_cityid').val(item.CityId);
                $('#hidden_selected_hotel_id').val(item.TBBCityId);
                /*var $select = $("#selectNationality").selectize();
                 var selectize = $select[0].selectize;
                 selectize.setValue(item.countryCode);*/
                //selectize.setValue(selectize.search(item.countryCode).items[0].id);
                $("#hidden_selected_hotel_contid").val(item.CountryId);
                $("#countryCode").val(item.countryCode);

                return item.label;
            },
            afterSelect: function(item) {
                $('#selectDestination_').typeahead('close', {
                    showHintOnFocus: false,
                    minLength: 3,
                });
            }

            // displayField: 'label',
        });
    </script>





    <div class="modal fade" id="update-payment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Update Payment</h4>
                </div>
                <div class="modal-body">
                    <div class="col-md-12 no-padding">
                        <div class="col-md-7">

                            <input class="icheck-black1111" type="radio" checked="checked" name="payment_type" id="payment_type_online" value="1">
                            <label for="payment_type_online" class="leftsidearea">Online (Send Payment
                                Reminder)</label>&nbsp;
                        </div>
                        <div class="col-md-5">

                            <input class="icheck-black1111" type="radio" name="payment_type" id="payment_type_offline" value="2">
                            <label for="payment_type_offline" class="leftsidearea">Offline</label>
                        </div>

                    </div>
                    <div class="clear">&nbsp;</div>


                    <div class="col-md-12 no-padding" id="payment_table_online">

                        <div class="col-md-8">
                            <table class="table tablestyle">
                                <tbody>
                                    <tr>
                                        <td><label class="radio no-margin inlinebl"> Package Cost </label> <span style="text-align:center; font-size: 12px;">(Inc. GST)</span></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span id="pkgCostOnline"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><label class="radio no-margin inlinebl"> Amount Received </label></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span id="amountPaidOnline"></span></td>
                                    </tr>
                                    <tr>
                                        <td><strong>OutStanding Bal.</strong><br></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span class="outStandingBalOnline"></span></td>
                                    </tr>

                                </tbody>






                            </table>
                        </div>

                    </div>



                    <div class="col-md-12 no-padding" id="payment_table_offline" style="display:none;">

                        <div class="col-md-12">
                            <table class="table tablestyle ">
                                <tbody>
                                    <tr>
                                        <td><label class="radio no-margin inlinebl"> Package Cost </label> <span style="text-align:center; font-size: 12px;">(Inc. GST)</span></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span id="pkgCost"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><label class="radio no-margin inlinebl"> Amount Received </label></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span id="amountPaid"></span>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>

                                            <input type="radio" name="bookingPayment" id="fullPayment" value="" class="icheck-black1" checked="" />
                                            <label for="fullPayment" class="leftsidearea">Full Payment</label>

                                        </td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span id="remainingBalance"></span></td>
                                    </tr>

                                    <tr>
                                        <td>

                                            <input type="radio" name="bookingPayment" id="flexiblePayment" value="" class="icheck-black1" />
                                            <label for="flexiblePayment" class="leftsidearea">Flexible Payment</label>

                                        </td>
                                        <td class="pull-right" style="border:0px;">
                                            <span class="CurrencyHtml pull-left"></span>&nbsp;
                                            <input type="text" name="flex_pay" id="flex_pay" value="" class="form-control whbg" style="text-align:right; width: 120px">
                                        </td>
                                    </tr>



                                    <tr>
                                        <td><strong>Outstanding Amount</strong><br></td>
                                        <td align="right"><span class="CurrencyHtml"></span> <span class="outStandingBal"></span></td>
                                    </tr>

                                </tbody>


                                <form id="form_repayment" method="post" name="form_repayment" action="">
                                    <input name="paymentType" id="paymentType" value="1" type="hidden">
                                    <input name="guid" id="guid_repayment" value="" type="hidden">
                                    <input name="securecode" id="securecode_repayment" value="" type="hidden">
                                    <input name="Firstname" id="Firstname" value="" type="hidden">
                                    <input name="email" id="email" value="" type="hidden">
                                    <input name="phone" id="phone" value="" type="hidden">
                                    <input id="premium_val" name="amount" value="" type="hidden">
                                    <input name="AgencyUserSysId" id="AgencyUserSysId" value="" type="hidden">
                                    <input name="AgencySysId" id="AgencySysId" value="" type="hidden">
                                    <input name="TrxType" id="TrxType" value="" type="hidden">
                                    <input name="PlanType" id="PlanType" value="5" type="hidden">
                                    <input name="TPSysId" id="TPSysId" value="" type="hidden">
                                    <input name="IsCardChrgToCustomer" id="IsCardChrgToCustomer" value="" type="hidden">
                                    <input name="CustomerSysId" id="CustomerSysId" value="" type="hidden">
                                    <input name="returnURL" id="returnURL" value="" type="hidden">
                                    <input name="stringData" id="stringData" value="" type="hidden">
                                    <input name="errorURL" id="errorURL" value="" type="hidden">
                                </form>





                            </table>
                        </div>

                    </div>

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

                        <div class="form-group form-group1 flexipadding pull-right" id="offline-buttons">
                            <button onclick="closeModal();" class="btn btn-primarygray" type="button">Cancel</button>
                            <button class="btn btn-primary" onclick="offlinePaymentProcess();" type="submit"><i class="fa fa-search"></i> Submit</button>
                        </div>

                        <div class="form-group form-group1 flexipadding" id="offline-buttons-inprocess" style="display:none;">
                            <img src="<?php echo $this->baseUrl('public/assets/images/loader.gif'); ?>"> Please Wait...
                        </div>


                    </div>
                    <div class="clear"></div>

                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="payment-history" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Payment History</h4>
                </div>
                <div class="col-md-12 no-padding">
                    <div class="panel">
                        <div class="panel-body">
                            <div class="col-md-12 table-responsive no-padding overflowflight" id="history_response">
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade in" id="getAddonDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
        <div class="modal-dialog modal-lg">
            <div class="modal-content getAddonDataModalContent">
                <div class="center">
                    <img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
                </div>
            </div>
        </div>
    </div>
</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit