File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/mayergramprsfarm.in/index.php
Back
<?php $data = json_decode(file_get_contents("data/index.json"), true); ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Mayer Gram PRS Farm</title> <link rel="canonical" href="https://eyecix.com/html/ecoenvironment/index-two.html" /> <!-- Css Files --> <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/font-awesome.css" rel="stylesheet"> <link href="css/flaticon.css" rel="stylesheet"> <link rel="icon" type="image/x-icon" href="images/favicon.png"> <link href="css/slick-slider.css" rel="stylesheet"> <link href="css/fancybox.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> <link href="css/color.css" rel="stylesheet"> <link href="css/responsive.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css"> </head> <body> <!--// Main Wrapper \\--> <div class="environment-main-wrapper"> <?php include 'include/header.php';?> <!--// Main Banner \\--> <div class="environment-banner environment-banner-two"> <!--// Slider \\--> <div class="environment-banner-one"> <?php foreach($data['banner']['slides'] as $slide): ?> <div class="environment-banner-one-layer"> <img src="<?php echo htmlspecialchars($slide['image']); ?>" alt=""> <div class="environment-banner-caption"> <div class="container"> <div class="banner-caption-text"> <h1><?php echo htmlspecialchars($slide['title']); ?></h1> <p><?php echo htmlspecialchars($slide['description']); ?></p> <a href="<?php echo htmlspecialchars($slide['button_link']); ?>" class="environment-bgcolor"><?php echo htmlspecialchars($slide['button_text']); ?></a> </div> </div> </div> </div> <?php endforeach; ?> </div> <!--// Slider \\--> </div> <!-- Booking Section --> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="booking-section"> <div class="booking-header"> <h2><?php echo htmlspecialchars($data['booking_section']['title']); ?></h2> </div> <form id="bookingForm"> <div class="row"> <!-- Check-in Date --> <div class="col-sm-3"> <div class="form-group"> <div class="date-input-group"> <i class="fa-solid fa-calendar-days"></i> <input type="text" class="form-control datepicker" id="checkInDate" placeholder="CHECK-IN" readonly> </div> </div> </div> <!-- Check-out Date --> <div class="col-sm-3"> <div class="form-group"> <div class="date-input-group"> <i class="fa-solid fa-calendar-days"></i> <input type="text" class="form-control datepicker" id="checkOutDate" placeholder="CHECK-OUT" readonly> </div> </div> </div> <!-- Adults Selection --> <div class="col-sm-3"> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"> <i class="fa-solid fa-users"></i> </span> <select class="form-control" id="adults"> <option value="1">1 Adult</option> <option value="2" selected>2 Adults</option> <option value="3">3 Adults</option> <option value="4">4 Adults</option> <option value="5">5+ Adults</option> </select> </div> </div> </div> <div class="col-sm-3"> <button type="submit" class="btn btn-check-availability"> <i class="fa-solid fa-search"></i> Check Availability </button> </div> </div> </form> </div> </div> </div> </div> <!-- Main Content --> <div class="environment-main-content"> <!-- About Section --> <div class="environment-main-section environment-aboutus-textfull"> <div class="container"> <div class="row"> <div class="col-md-6"> <img src="<?php echo htmlspecialchars($data['about_section']['image']); ?>" alt="" class="environment-aboutus-img"> </div> <div class="col-md-6"> <div class="environment-section-title"><h2><?php echo $data['about_section']['title']; ?></h2></div> <div class="environment-aboutus-text"> <h4><?php echo htmlspecialchars($data['about_section']['subtitle']); ?></h4> <p><?php echo htmlspecialchars($data['about_section']['description']); ?></p> <a href="<?php echo htmlspecialchars($data['about_section']['button_link']); ?>" class="environment-donate-btn"><?php echo htmlspecialchars($data['about_section']['button_text']); ?></a> </div> </div> </div> </div> </div> <!-- Accommodation Section --> <div class="environment-main-section environment-blog-grid-full"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="environment-fancy-title"><h2><?php echo htmlspecialchars($data['accommodation']['title']); ?></h2></div> <div class="environment-blog environment-blog-grid"> <ul class="row"> <?php foreach($data['accommodation']['rooms'] as $room): ?> <?php // Determine column class based on room count $colClass = 'col-md-4'; $totalRooms = count($data['accommodation']['rooms']); if($totalRooms == 5) { // Special layout for 5 rooms $colClass = $room['title'] == 'Mayer Moner Ghor — Honeymoon Cottage' || $room['title'] == 'Mayer Paribar Shed — Group Dormitory' ? 'col-md-6' : 'col-md-4'; } ?> <li class="<?php echo $colClass; ?>"> <figure> <a href="<?php echo htmlspecialchars($room['link']); ?>"> <img src="<?php echo htmlspecialchars($room['image']); ?>" alt=""> <i class="fa fa-share-square-o"></i> </a> </figure> <div class="environment-blog-grid-text text-left"> <h4><a href="<?php echo htmlspecialchars($room['link']); ?>"><?php echo htmlspecialchars($room['title']); ?></a></h4> <p style="color: #f08267;"><?php echo htmlspecialchars($room['price']); ?></p> <p><?php echo htmlspecialchars($room['description']); ?></p> <?php if(!empty($room['features'])): ?> <ul> <?php foreach($room['features'] as $feature): ?> <li><?php echo htmlspecialchars($feature); ?></li> <?php endforeach; ?> </ul> <?php endif; ?> <a class="read-more-btn" href="<?php echo htmlspecialchars($room['link']); ?>">View Details</a> </div> </li> <?php endforeach; ?> </ul> </div> </div> </div> </div> </div> <!-- Testimonials Section --> <div class="environment-main-section environment-testimonial-full"> <span class="testimonial-transparent"></span> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="environment-fancy-title environment-white-color"><h2><?php echo $data['testimonials']['title']; ?></h2></div> <div class="environment-testimonials"> <ul class="row"> <?php foreach($data['testimonials']['items'] as $testimonial): ?> <li class="col-md-4"> <div class="environment-testimonials-wrap"> <div class="environment-testimonials-text"> <p><?php echo htmlspecialchars($testimonial['text']); ?></p> <i class="fa fa-quote-right"></i> </div> <figure> <a href="#"><img src="<?php echo htmlspecialchars($testimonial['image']); ?>" alt=""></a> <figcaption> <h6><a href="#"><?php echo htmlspecialchars($testimonial['name']); ?></a></h6> <span>Guest</span> </figcaption> </figure> </div> </li> <?php endforeach; ?> </ul> </div> </div> </div> </div> </div> <!-- Who Is This For Section --> <div class="environment-main-section environment-blog-grid-full"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="environment-fancy-title"><h2><?php echo $data['who_is_this_for']['title']; ?></h2></div> <div class="environment-blog environment-blog-grid"> <ul class="row"> <?php foreach($data['who_is_this_for']['categories'] as $category): ?> <li class="col-md-3"> <img src="<?php echo htmlspecialchars($category['image']); ?>" alt=""> <div class="environment-blog-grid-text"> <h4><a href="#"><?php echo htmlspecialchars($category['title']); ?></a></h4> <p><?php echo htmlspecialchars($category['description']); ?></p> </div> </li> <?php endforeach; ?> </ul> </div> </div> </div> </div> </div> </div> <!--// Main Content \\--> <?php include 'include/footer.php';?> <div class="clearfix"></div> </div> <!--// Main Wrapper \\--> <!-- JavaScript Files --> <script type="text/javascript" src="script/jquery.js"></script> <script type="text/javascript" src="script/bootstrap.min.js"></script> <script type="text/javascript" src="script/slick.slider.min.js"></script> <script type="text/javascript" src="script/jquery.countdown.min.js"></script> <script type="text/javascript" src="script/fancybox.pack.js"></script> <script type="text/javascript" src="script/isotope.min.js"></script> <script type="text/javascript" src="script/progressbar.js"></script> <script type="text/javascript" src="script/counter.js"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script> <script type="text/javascript" src="script/functions.js"></script> <!-- Bootstrap Datepicker JS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script> <!-- Booking Form JavaScript --> <script> $(document).ready(function() { // Initialize datepicker for check-in $('#checkInDate').datepicker({ format: 'yyyy-mm-dd', autoclose: true, todayHighlight: true, startDate: new Date() }).on('changeDate', function(e) { // Update placeholder when date is selected var selectedDate = formatDateForDisplay(e.date); $(this).attr('placeholder', selectedDate); // Set the minimum date for check-out to be the day after check-in var checkInDate = e.date; checkInDate.setDate(checkInDate.getDate() + 1); $('#checkOutDate').datepicker('setStartDate', checkInDate); // If check-out date is earlier than new minimum, clear it var checkOutDate = $('#checkOutDate').datepicker('getDate'); if (checkOutDate && checkOutDate < checkInDate) { $('#checkOutDate').datepicker('clearDates'); $('#checkOutDate').attr('placeholder', 'CHECK-OUT'); } }).on('clearDate', function() { // Reset placeholder when date is cleared $(this).attr('placeholder', 'CHECK-IN'); }); // Initialize datepicker for check-out $('#checkOutDate').datepicker({ format: 'yyyy-mm-dd', autoclose: true, todayHighlight: true }).on('changeDate', function(e) { // Update placeholder when date is selected var selectedDate = formatDateForDisplay(e.date); $(this).attr('placeholder', selectedDate); }).on('clearDate', function() { // Reset placeholder when date is cleared $(this).attr('placeholder', 'CHECK-OUT'); }); // Handle form submission $('#bookingForm').on('submit', function(e) { e.preventDefault(); // Get form values var checkIn = $('#checkInDate').val(); var checkOut = $('#checkOutDate').val(); var adults = $('#adults').val(); // Check if dates are selected (by checking if placeholder changed from default) var checkInPlaceholder = $('#checkInDate').attr('placeholder'); var checkOutPlaceholder = $('#checkOutDate').attr('placeholder'); if (checkInPlaceholder === 'CHECK-IN' || checkOutPlaceholder === 'CHECK-OUT') { alert('Please select both check-in and check-out dates.'); return; } // Check if check-out is after check-in var checkInDate = $('#checkInDate').datepicker('getDate'); var checkOutDate = $('#checkOutDate').datepicker('getDate'); if (checkOutDate <= checkInDate) { alert('Check-out date must be after check-in date.'); return; } // In a real application, you would submit the form data to a server alert('Checking availability for:\n' + 'Check-in: ' + formatDateForDisplay(checkInDate) + '\n' + 'Check-out: ' + formatDateForDisplay(checkOutDate) + '\n' + 'Adults: ' + adults + '\n\n' + 'This would typically redirect to a room selection page.'); }); // Make the datepicker icons clickable to open the calendar $('.fa-calendar-days').on('click', function() { $(this).siblings('.datepicker').focus(); }); // Helper function to format date for display function formatDateForDisplay(date) { if (!date) return ''; var options = { year: 'numeric', month: 'short', day: 'numeric' }; return new Date(date).toLocaleDateString('en-US', options); } // Set up clear buttons for date fields function setupClearButtons() { // Clear check-in date $('#checkInDate').parent().append('<span class="clear-date" style="position: absolute; right: 10px; top: 12px; cursor: pointer; color: #999; display: none;"><i class="fa-solid fa-times"></i></span>'); // Clear check-out date $('#checkOutDate').parent().append('<span class="clear-date" style="position: absolute; right: 10px; top: 12px; cursor: pointer; color: #999; display: none;"><i class="fa-solid fa-times"></i></span>'); // Show/hide clear buttons based on whether date is selected $('#checkInDate, #checkOutDate').on('change', function() { var $clearBtn = $(this).siblings('.clear-date'); if ($(this).val()) { $clearBtn.show(); } else { $clearBtn.hide(); } }); // Handle clear button click $(document).on('click', '.clear-date', function() { var $dateInput = $(this).siblings('.datepicker'); $dateInput.datepicker('clearDates'); $dateInput.val(''); $dateInput.attr('placeholder', $dateInput.attr('id') === 'checkInDate' ? 'CHECK-IN' : 'CHECK-OUT'); $(this).hide(); }); } // Initialize clear buttons setupClearButtons(); }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings