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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/hotel/add-new-backup
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    
    <link href="<?php echo $this->baseUrl('public/assets/css/style.css'); ?>" rel="stylesheet">
    <link href="<?php echo $this->baseUrl('public/assets/css/bootstrap.min.css'); ?>" rel="stylesheet">
    
    <link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/plugins/selectize.bootstrap3.css'); ?>">
    
    
    
    
    <script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/lib/jquery-1.11.min.js'); ?>"></script>
    

  
      
      
    <style>
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #map {
        height: 40%;
      }
      table {
        font-size: 12px;
      }
      #map {
        width: 220px;
        margin-left:15px; 
        float: left;
      }
      #listing {
        position: absolute;
        width: 200px;
        height: 470px;
        overflow: auto;
        left: 442px;
        top: 0px;
        cursor: pointer;
        overflow-x: hidden;
      }
      #findhotels {
        /*position: absolute;
        text-align: right;
        width: 100px;*/
        font-size: 14px;
        z-index: 5;
        background-color: #fff;
      }
      #locationField {
       /* position: absolute;
        width: 190px;*/
        height: 25px;
        left: 108px;
        top: 0px;
        z-index: 5;
        background-color: #fff;
      }
      #controls {
        position: absolute;
        left: 300px;
        width: 140px;
        top: 0px;
        z-index: 5;
        background-color: #fff;
      }
      #autocomplete {
        width: 100%;
      }
      #country {
        width: 100%;
      }
      .placeIcon {
        width: 20px;
        height: 34px;
        margin: 4px;
      }
      .hotelIcon {
        width: 24px;
        height: 24px;
      }
      #resultsTable {
        border-collapse: collapse;
        width: 240px;
      }
      #rating {
        font-size: 13px;
        font-family: Arial Unicode MS;
      }
      .iw_table_row {
        height: 18px;
      }
      .iw_attribute_name {
        font-weight: bold;
        text-align: right;
      }
      .iw_table_icon {
        text-align: right;
      }
    </style>
  </head>

    <body>
      
       
      

     <?php
     $objCountry = new Travel_Model_TblCountry();
     $arrCountryList = $objCountry->getCountryList();
    ?>
      
    <form name="frmAddHotel" id="frmAddHotel" method="post">  
        <div style="margin-top: 20px">&nbsp;</div>  
         <div class="col-md-12">
         <div class="alert alert-danger" id="hotel-popup-error-message-box" style="display:none">
            <span id="supplier-popup-error-message"></span>
        </div>
         </div>
        
    <div class="col-md-6">
        
        <div class="form-group">
        <label>Country</label>
          <select id="country" name="country" class="form-control">
            <option value="0">Select</option>
            <?php 
                if(count($arrCountryList) > 0 ) {
                    foreach($arrCountryList as $country) { ?>
                         <option value="<?php echo trim($country['Code']); ?>"><?php echo $country['Title']; ?></option>
                    <?php 
                    }
                }   
            ?>
          </select>
        
         </div>
        
        
             <div class="form-group">
    <label id="findhotels">
      Find hotels in:
    </label>
    <div id="locationField">
        <input id="autocomplete" name="autocomplete" placeholder="Enter a city" type="text" class="form-control" maxlength="75" />
    </div>

         </div>
    </div>   
      
     
     <div class="col-md-6 pull-right"> 
    
         <div class="col-md-12 no-margin" style="padding-top:10px; padding-bottom:10px;">
                    <h4 class="modal-title" id="myModalLabel">Add Hotel</h4>
                    </div>
              
                
               
                    
                    
                   <div class="col-md-6 no-margin">
                    <div class="form-group">
                        <label>Hotel Name</label>
                        <input type="text" name="hotel_name" id="hotel_name" class="form-control whbg" maxlength="200">                       
                    </div>
                    </div>
                    
                    <div class="col-md-6 no-margin" >
                    <div class="form-group">
                        <label>Accommodation Type</label>
                        <select id="hotel-type" name="hotel-type" class="form-control" placeholder="Select">
                            <option value="0">Select</option>
                             <?php 
                             $objHotel = new Travel_Model_TblHotel();
                             $arrAccomodationEconomyType = $objHotel->getAccomodationEconomyType();
                             if(count($arrAccomodationEconomyType) > 0 ) {
                                 foreach($arrAccomodationEconomyType as $type) { ?>
                                     <option value="<?php echo $type['EconomyType']; ?>" <?php if($this->arrHotelInfo['EconomyTypeId'] == $type['EconomyType']) echo "selected"; ?>><?php echo $type['Title']; ?></option>
                                 <?php }
                             }
                             ?>
                        </select>                       
                    </div>
                    </div>
                    
                    <?php
                    $arrStarRatings = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getStarRatings();
                    ?>
                    
                    <div class="col-md-6 no-margin">
                    <div class="form-group">
                        <label>Star Rating</label>
                        <select id="star-rating" name="star-rating" class="form-control" placeholder="Select">
                            <option value="">Select</option>
                            <?php
                            if(count($arrStarRatings) > 0 ) {
                                while ( list($key, $value) = each($arrStarRatings) ) { ?>
                                     <option value="<?php echo $key; ?>" <?php if($this->arrHotelInfo['Stars'] == $key) echo "selected"; ?>><?php echo $value; ?></option>
                                <?php
                                }
                            }
                            ?>
                        </select>                      
                    </div>
                    </div>
                    
                    <div class="col-md-6 no-margin">
                    <div class="form-group">
                        <label>Room Types</label>
                        <select id="hotel-room-types" multiple="multiple" name="hotel-room-types[]" class="form-control selectized" placeholder="Select">
                            <option value="0">Select</option>
                            <?php
                            $arrRoomTypes = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getRoomTypes();
                            if(count($arrRoomTypes) > 0 ) { 
                                    foreach($arrRoomTypes as $room) { ?>
                                        <option value="<?php echo $room['RoomType']; ?>" <?php if($this->arrRoomDetail['RoomType'] == $room['RoomType']) echo "selected"; ?> ><?php echo $room['Title']; ?></option>
                                    <?php 
                                    }
                                }
                            ?>   
                                                                    
                        </select>                       
                    </div>
                    </div>
                    
                    
                    <div class="col-md-6 no-margin">
                    <div class="form-group">
                        <label>Pin Code</label>
                        <input type="text" id="pinCode" name="pinCode" class="form-control whbg numberonly" maxlength="6">          
                    </div>
                    </div>
                    
                    
                    <div class="col-md-6 no-margin">
                    <div class="form-group">
                        <label>Address</label>
                        <input type="text" id="hotel-address" name="hotel-address" class="form-control whbg" maxlength="250"> 
                    </div>
                    </div>
                    
                    
                <div class="clear"></div>
                
                
                <div class="col-md-12 no-margin">
                    <button type="button" class="btn btn-warning btn-round" onclick="addNewHotel();">Submit</button>
                    <button type="button" id="close_supplier_form" class="btn btn-default btn-round" data-dismiss="modal">Cancel</button>
                </div>
    </div>
      
    </form>

    <div id="map"></div>

    <div id="listing " class="col-md-2">
      <table id="resultsTable">
        <tbody id="results"></tbody>
      </table>
    </div>
      
    <script>
    function addNewHotel() {
        var data = $("#frmAddHotel").serialize();
        
        $.ajax({
            url  : '<?php echo $this->baseUrl('/hotel/add-new') ?>',
            data : data ,
            type : 'POST',
            dataType : 'json',
            beforeSend : function() {
               
            },
            success : function(response) {
                
                if(response.success) {
                    window.opener.document.frmAddHotelInventory.hotel_name.value = response.Title;
                    window.opener.document.frmAddHotelInventory.hidden_selected_hotel_id.value = response.intLastInsertId;
                    self.close();
                }
                else {
                    //alert('<?php echo TECHNICAL_ERROR_MSG; ?>');
                   // alert(response.msg);
                   $("#hotel-popup-error-message-box").css("display","block");
                   $("#hotel-popup-error-message-box").html(response.msg);
                }
                
            }
        });
        
    }
    </script>
    
    <script type="text/javascript" src="<?php echo $this->baseUrl('public/js/functions.js'); ?>"></script>
    
    <!--selectize Library start-->
    <script src="<?php echo $this->baseUrl('public/assets/js/selectize.min.js'); ?>"></script>
    <!--selectize Library End-->

    <!--Select & Tag demo start-->
    <script src="<?php echo $this->baseUrl('public/assets/js/pages/selectTag.js'); ?>"></script>
    <!--Select & Tag demo end-->
    
   
    <script>
      // This example uses the autocomplete feature of the Google Places API.
      // It allows the user to find all hotels in a given place, within a given
      // country. It then displays markers for all the hotels returned,
      // with on-click details for each hotel.

      // This example requires the Places library. Include the libraries=places
      // parameter when you first load the API. For example:
      // <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places">

      var map, places, infoWindow;
      var markers = [];
      var autocomplete;
      var countryRestrict = {'country': 'us'};
      var MARKER_PATH = 'https://maps.gstatic.com/intl/en_us/mapfiles/marker_green';
      var hostnameRegexp = new RegExp('^https?://.+?/');

      var countries = {
        'au': {
          center: {lat: -25.3, lng: 133.8},
          zoom: 4
        },
        'br': {
          center: {lat: -14.2, lng: -51.9},
          zoom: 3
        },
        'ca': {
          center: {lat: 62, lng: -110.0},
          zoom: 3
        },
        'fr': {
          center: {lat: 46.2, lng: 2.2},
          zoom: 5
        },
        'de': {
          center: {lat: 51.2, lng: 10.4},
          zoom: 5
        },
        'mx': {
          center: {lat: 23.6, lng: -102.5},
          zoom: 4
        },
        'nz': {
          center: {lat: -40.9, lng: 174.9},
          zoom: 5
        },
        'it': {
          center: {lat: 41.9, lng: 12.6},
          zoom: 5
        },
        'za': {
          center: {lat: -30.6, lng: 22.9},
          zoom: 5
        },
        'es': {
          center: {lat: 40.5, lng: -3.7},
          zoom: 5
        },
        'pt': {
          center: {lat: 39.4, lng: -8.2},
          zoom: 6
        },
        'us': {
          center: {lat: 37.1, lng: -95.7},
          zoom: 3
        },
        'uk': {
          center: {lat: 54.8, lng: -4.6},
          zoom: 5
        }
      };

      function initMap() {
        map = new google.maps.Map(document.getElementById('map'), {
          zoom: countries['us'].zoom,
          center: countries['us'].center,
          mapTypeControl: false,
          panControl: false,
          zoomControl: false,
          streetViewControl: false
        });

        infoWindow = new google.maps.InfoWindow({
          content: document.getElementById('info-content')
        });

        // Create the autocomplete object and associate it with the UI input control.
        // Restrict the search to the default country, and to place type "cities".
        autocomplete = new google.maps.places.Autocomplete(
            /** @type {!HTMLInputElement} */ (
                document.getElementById('autocomplete')), {
              types: ['(cities)'],
              componentRestrictions: countryRestrict
            });
        places = new google.maps.places.PlacesService(map);

        autocomplete.addListener('place_changed', onPlaceChanged);

        // Add a DOM event listener to react when the user selects a country.
        document.getElementById('country').addEventListener(
            'change', setAutocompleteCountry);
      }

      // When the user selects a city, get the place details for the city and
      // zoom the map in on the city.
      function onPlaceChanged() {
        var place = autocomplete.getPlace();
        if (place.geometry) {
          map.panTo(place.geometry.location);
          map.setZoom(15);
          search();
        } else {
          document.getElementById('autocomplete').placeholder = 'Enter a city';
        }
      }

      // Search for hotels in the selected city, within the viewport of the map.
      function search() {
        var search = {
          bounds: map.getBounds(),
          types: ['lodging']
        };

        places.nearbySearch(search, function(results, status) {
          if (status === google.maps.places.PlacesServiceStatus.OK) {
            clearResults();
            clearMarkers();
            // Create a marker for each hotel found, and
            // assign a letter of the alphabetic to each marker icon.
            for (var i = 0; i < results.length; i++) {
              var markerLetter = String.fromCharCode('A'.charCodeAt(0) + i);
              var markerIcon = MARKER_PATH + markerLetter + '.png';
              // Use marker animation to drop the icons incrementally on the map.
              markers[i] = new google.maps.Marker({
                position: results[i].geometry.location,
                animation: google.maps.Animation.DROP,
                icon: markerIcon
              });
              // If the user clicks a hotel marker, show the details of that hotel
              // in an info window.
              markers[i].placeResult = results[i];
              google.maps.event.addListener(markers[i], 'click', showInfoWindow);
              setTimeout(dropMarker(i), i * 100);
              addResult(results[i], i);
            }
          }
        });
      }

      function clearMarkers() {
        for (var i = 0; i < markers.length; i++) {
          if (markers[i]) {
            markers[i].setMap(null);
          }
        }
        markers = [];
      }

      // Set the country restriction based on user input.
      // Also center and zoom the map on the given country.
      function setAutocompleteCountry() {
        var country = document.getElementById('country').value;
        if (country == 'all') {
          autocomplete.setComponentRestrictions([]);
          map.setCenter({lat: 15, lng: 0});
          map.setZoom(2);
        } else {
          autocomplete.setComponentRestrictions({'country': country});
          map.setCenter(countries[country].center);
          map.setZoom(countries[country].zoom);
        }
        clearResults();
        clearMarkers();
      }

      function dropMarker(i) {
        return function() {
          markers[i].setMap(map);
        };
      }

      function addResult(result, i) {
        var results = document.getElementById('results');
        var markerLetter = String.fromCharCode('A'.charCodeAt(0) + i);
        var markerIcon = MARKER_PATH + markerLetter + '.png';

        var tr = document.createElement('tr');
        tr.style.backgroundColor = (i % 2 === 0 ? '#F0F0F0' : '#FFFFFF');
        tr.onclick = function() {
          google.maps.event.trigger(markers[i], 'click');
        };

        var iconTd = document.createElement('td');
        var nameTd = document.createElement('td');
        var icon = document.createElement('img');
        icon.src = markerIcon;
        icon.setAttribute('class', 'placeIcon');
        icon.setAttribute('className', 'placeIcon');
        var name = document.createTextNode(result.name);
        iconTd.appendChild(icon);
        nameTd.appendChild(name);
        tr.appendChild(iconTd);
        tr.appendChild(nameTd);
        results.appendChild(tr);
      }

      function clearResults() {
        var results = document.getElementById('results');
        while (results.childNodes[0]) {
          results.removeChild(results.childNodes[0]);
        }
      }

      // Get the place details for a hotel. Show the information in an info window,
      // anchored on the marker for the hotel that the user selected.
      function showInfoWindow() {
        var marker = this;
        places.getDetails({placeId: marker.placeResult.place_id},
            function(place, status) {
              if (status !== google.maps.places.PlacesServiceStatus.OK) {
                return;
              }
              
              $("#hotel_name").val(place.name);
              $("#hotel-address").val(place.formatted_address);
              $("#star-rating").val(place.rating);
              
              //console.log(place);
              
            /*  alert(place.name);
              alert(place.formatted_address);
              alert(place.formatted_phone_number);
              alert(place.geometry.location.lat);
              alert(place.geometry.location.lng);
              alert(place.rating);
              alert(place.website); */
              
              
              infoWindow.open(map, marker);
              buildIWContent(place);
            });
      }

      // Load the place information into the HTML elements used by the info window.
      function buildIWContent(place) {
        document.getElementById('iw-icon').innerHTML = '<img class="hotelIcon" ' +
            'src="' + place.icon + '"/>';
        document.getElementById('iw-url').innerHTML = '<b><a href="' + place.url +
            '">' + place.name + '</a></b>';
        document.getElementById('iw-address').textContent = place.vicinity;

        if (place.formatted_phone_number) {
          document.getElementById('iw-phone-row').style.display = '';
          document.getElementById('iw-phone').textContent =
              place.formatted_phone_number;
        } else {
          document.getElementById('iw-phone-row').style.display = 'none';
        }

        // Assign a five-star rating to the hotel, using a black star ('&#10029;')
        // to indicate the rating the hotel has earned, and a white star ('&#10025;')
        // for the rating points not achieved.
        if (place.rating) {
          var ratingHtml = '';
          for (var i = 0; i < 5; i++) {
            if (place.rating < (i + 0.5)) {
              ratingHtml += '&#10025;';
            } else {
              ratingHtml += '&#10029;';
            }
          document.getElementById('iw-rating-row').style.display = '';
          document.getElementById('iw-rating').innerHTML = ratingHtml;
          }
        } else {
          document.getElementById('iw-rating-row').style.display = 'none';
        }

        // The regexp isolates the first part of the URL (domain plus subdomain)
        // to give a short URL for displaying in the info window.
        if (place.website) {
          var fullUrl = place.website;
          var website = hostnameRegexp.exec(place.website);
          if (website === null) {
            website = 'http://' + place.website + '/';
            fullUrl = website;
          }
          document.getElementById('iw-website-row').style.display = '';
          document.getElementById('iw-website').textContent = website;
        } else {
          document.getElementById('iw-website-row').style.display = 'none';
        }
      }
    </script>
    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAhllAlYk3B-XWGaT0duMfWIQF1KicTl2s&libraries=places&callback=initMap"
        async defer></script>
  </body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit