📄 accomodation.includes.php

Size: 9,625 bytes
Path: /home/islandholiday/public_html/includes/accomodation.includes.php
Modified: 2025-01-18 14:31:43
<section class="accomodation__area section-space"> 
        <div class="container">
            <div class="section3__title-wrapper mb-60">
                <h2 class="section3__title-wrapper-title wow fadeInLeft animated" data-wow-delay=".3s">The Accomodation</h2>
                <a class="rr-btn-4" href="rooms.php">Explore More<i class="fa-solid fa-plus"></i></a>
            </div>
            <div class="row mb-minus-30">


                <?php
                    $rooms = New Room();
                    $ima = New Images();
                    $room_data= $rooms->getAllRoomsDetails();
                    $room_data1= $rooms->getAllRoomsDetails();
                    $count =1;

                    $room_row= $room_data->fetchAll(PDO::FETCH_ASSOC);

                    

                    if ($room_row==true) {

                        while($room_row2= $room_data1->fetch(PDO::FETCH_ASSOC)){
                                $roomGet= $ima->getRoomimages($room_row2['roomID']);

                                while($room_row3 = $roomGet->fetch(PDO::FETCH_ASSOC)){
                                $roomimageName=DecryptInput($room_row3['pic']);

                                //var_dump($roomimageName);
                                }

                                
                            

                     
                ?>


                            <!-- ==================================================== -->
                <div class="col-xl-4 col-lg-4 col-md-6">
                    <div class="accomodation__item mb-30">
                        <div class="accomodation__thumb">
                            <img src="admin/panel/uploads/hotel/<?=$roomimageName;?>" alt="img not found">
                            <div class="accomodation__box">
                                <div class="accomodation__box-list">
                                    <?php include_once("includes/bedtype.svg.includes.php");?>
                                </div>
                                <div class="accomodation__box-list">
                                    <div class="accomodation__box-list-icon">
                                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path d="M8.0935 4.75H6.125C5.89294 4.75 5.67038 4.84219 5.50628 5.00628C5.34219 5.17038 5.25 5.39294 5.25 5.625V19.875C5.25 20.3585 5.642 20.75 6.125 20.75H17.875C18.1071 20.75 18.3296 20.6578 18.4937 20.4937C18.6578 20.3296 18.75 20.1071 18.75 19.875V5.625C18.75 5.39294 18.6578 5.17038 18.4937 5.00628C18.3296 4.84219 18.1071 4.75 17.875 4.75H15.9065C15.7727 5.18433 15.5032 5.56434 15.1376 5.8343C14.772 6.10426 14.3295 6.24995 13.875 6.25H10.125C9.67052 6.24995 9.22802 6.10426 8.86241 5.8343C8.4968 5.56434 8.22732 5.18433 8.0935 4.75ZM15.9065 3.5H17.875C18.4386 3.5 18.9791 3.72388 19.3776 4.1224C19.7761 4.52091 20 5.06141 20 5.625V19.875C20 20.4386 19.7761 20.9791 19.3776 21.3776C18.9791 21.7761 18.4386 22 17.875 22H6.125C5.56141 22 5.02091 21.7761 4.6224 21.3776C4.22388 20.9791 4 20.4386 4 19.875V5.625C4 5.06141 4.22388 4.52091 4.6224 4.1224C5.02091 3.72388 5.56141 3.5 6.125 3.5H8.0935C8.22732 3.06567 8.4968 2.68566 8.86241 2.4157C9.22802 2.14574 9.67052 2.00005 10.125 2H13.875C14.3295 2.00005 14.772 2.14574 15.1376 2.4157C15.5032 2.68566 15.7727 3.06567 15.9065 3.5ZM9.25 4.125C9.25 4.608 9.642 5 10.125 5H13.875C13.9899 5 14.1037 4.97737 14.2098 4.93339C14.316 4.88942 14.4125 4.82497 14.4937 4.74372C14.575 4.66247 14.6394 4.56601 14.6834 4.45985C14.7274 4.35369 14.75 4.23991 14.75 4.125C14.75 4.01009 14.7274 3.89631 14.6834 3.79015C14.6394 3.68399 14.575 3.58753 14.4937 3.50628C14.4125 3.42503 14.316 3.36058 14.2098 3.31661C14.1037 3.27263 13.9899 3.25 13.875 3.25H10.125C9.89294 3.25 9.67038 3.34219 9.50628 3.50628C9.34219 3.67038 9.25 3.89294 9.25 4.125ZM12 8.75C11.6022 8.75 11.2206 8.90804 10.9393 9.18934C10.658 9.47064 10.5 9.85218 10.5 10.25C10.5 10.6478 10.658 11.0294 10.9393 11.3107C11.2206 11.592 11.6022 11.75 12 11.75C12.3978 11.75 12.7794 11.592 13.0607 11.3107C13.342 11.0294 13.5 10.6478 13.5 10.25C13.5 9.85218 13.342 9.47064 13.0607 9.18934C12.7794 8.90804 12.3978 8.75 12 8.75ZM9.25 10.25C9.25 9.52065 9.53973 8.82118 10.0555 8.30546C10.5712 7.78973 11.2707 7.5 12 7.5C12.7293 7.5 13.4288 7.78973 13.9445 8.30546C14.4603 8.82118 14.75 9.52065 14.75 10.25C14.75 10.9793 14.4603 11.6788 13.9445 12.1945C13.4288 12.7103 12.7293 13 12 13C11.2707 13 10.5712 12.7103 10.0555 12.1945C9.53973 11.6788 9.25 10.9793 9.25 10.25ZM8.25 15.9C8.25 15.7276 8.31848 15.5623 8.44038 15.4404C8.56228 15.3185 8.72761 15.25 8.9 15.25H15.1C15.2724 15.25 15.4377 15.3185 15.5596 15.4404C15.6815 15.5623 15.75 15.7276 15.75 15.9C15.75 16.6285 15.4115 17.185 14.787 17.586C14.1385 18.003 13.175 18.25 12 18.25C10.825 18.25 9.8615 18.003 9.213 17.586C8.5885 17.185 8.25 16.6285 8.25 15.9ZM8.9 14C8.39609 14 7.91282 14.2002 7.5565 14.5565C7.20018 14.9128 7 15.3961 7 15.9C7 17.1035 7.599 18.035 8.537 18.6375C9.451 19.2255 10.675 19.5 12 19.5C13.325 19.5 14.549 19.225 15.463 18.6375C16.401 18.035 17 17.1035 17 15.9C17 15.6505 16.9509 15.4034 16.8554 15.1729C16.7599 14.9424 16.6199 14.7329 16.4435 14.5565C16.2671 14.3801 16.0576 14.2401 15.8271 14.1446C15.5966 14.0491 15.3495 14 15.1 14H8.9Z" fill="#0E1730"/>
                                        </svg>                                                                                                                   
                                    </div>
                                    <h6 class="accomodation__box-list-text"><?=$room_row2['maxPeople']; ?> Guest</h6>
                                </div>
                                <!-- <div class="accomodation__box-list">
                                    <div class="accomodation__box-list-icon">
                                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path d="M21 13V16C21 17.0609 20.5786 18.0783 19.8284 18.8284C19.0783 19.5786 18.0609 20 17 20H7C5.93913 20 4.92172 19.5786 4.17157 18.8284C3.42143 18.0783 3 17.0609 3 16V13.6C3 13.4409 3.06321 13.2883 3.17574 13.1757C3.28826 13.0632 3.44087 13 3.6 13H21ZM21 13V7C21 5.93913 20.5786 4.92172 19.8284 4.17157C19.0783 3.42143 18.0609 3 17 3H12M16 20L17 22M8 20L7 22" stroke="#0E1730" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                                            <path d="M15.4004 8H8.60039C8.26939 8 8.00439 7.732 8.04039 7.402C8.18639 6.075 8.86339 3 12.0004 3C15.1374 3 15.8144 6.075 15.9604 7.402C15.9964 7.732 15.7314 8 15.4004 8Z" stroke="#0E1730" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                                        </svg>                                                                                                                      
                                    </div>
                                    <h6 class="accomodation__box-list-text">Bath</h6>
                                </div> -->
                            </div>
                        </div>
                        <div class="accomodation__content">
                            <h3 class="accomodation__dolar"> <?php

                            $offerPriceResult = checkOfferPrice($room_row2['roomID']);

                            // Check the success value returned by the function
                                if ($offerPriceResult['success'] == 1) {
                                    // Success case
                                    ?>
                                    <strike style="font-size: 50%;"> $<?=$room_row2['roomPrice']; ?> </strike>
                                    
                                    $<?=$room_row2['offerPrice']; ?> 

                                    <span>/<?=DecryptInput($room_row2['priceType']); ?></span>
                                    <?php
                                } elseif ($offerPriceResult['success'] == 0) {
                                    // No offer case
                                    ?>
                                   
                                    
                                    $<?=$room_row2['roomPrice']; ?> 

                                    <span>/<?=DecryptInput($room_row2['priceType']); ?></span>
                                    <?php
                                }
                             //var_dump(checkOfferPrice($room_row2['roomID'][0]));?>


                                
                            </h3>
                            <h5 class="accomodation__title"><?=DecryptInput($room_row2['roomName']); ?></h5>
                            <?=str_repeat('<i class="fa fa-star checked" style="color: #edd109; "></i>', $room_row2['roomstarRating']); ?>
                            <p><?=strip_tags(substr($room_row2['Roomdescription'],0, 80)) ; ?></p>
                            <a class="rr-btn-4 mt-20" href="booking.php?Enc=<?=EncryptInputurl($room_row2['roomID']); ?>&&Uid=<?=EncryptInputurl(date('Y-m-d')); ?>&&Value=Okay">Book Now <i class="fa-solid fa-plus"></i></a>
                        </div>
                    </div>
                </div>



                            <!-- ================================================================= -->

                       <?php

                      
                       }
                    };
                ?>


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