MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.148.117.237
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/rectifysolution.in/../goldensafe.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/rectifysolution.in/../goldensafe.in/index-projects.php
   <style>
       .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
h3{
    color:white;
}
   </style>
   <!-- Project area -->
    <div class="section section-padding">
        <div class="container">
            <div class="section-title text-center mb-lg-8 mb-md-6 mb-4">
                <h2 class="title">Our <span>Gallery</span></h2>
                <!--<p>To provide a better quality of life by designing eco-friendly structures with aesthetic sense.</p>-->
            </div>
           
            <div class="row row-cols-lg-3 row-cols-md-2 row-cols-sm-2 row-cols-1 mb-n6 grid">
                <?php 
                    $sql = "SELECT * FROM `tbl_gallery` LIMIT 6";
                    $run = mysqli_query($db,$sql) or die("Query Not run");
                    while($data = mysqli_fetch_assoc($run)){
                ?>
                <div class="col mb-6 grid-item <?php echo $data['work_status']?>">
                    <div class="project-wrap">
                        <div class="project-inner">
                            <a class="thumbnail" href="<?php echo $wspath?>admin/images/gallery/<?php echo $data['image']?>">
                                <img src="<?php echo $wspath?>admin/images/gallery/<?php echo $data['image']?>" alt="<?php echo $data['title']?>" title="<?php echo $sitename?>">
                            
                            <div class="project-content">
                                 <span class="category"><?php echo $sitename?></span> 
                                <h3 class="title" style="color:white;"><?php echo $data['title']?></h3>
                            </div>
                            </a>
                        </div>
                    </div>
                </div>
                <?php } ?>
            </div>
            <div class="project-btn mt-6 mt-md-8 mt-lg-10 text-center">
                <!-- Add your project button content here -->
            </div>
        </div>
    </div>
    <script>
    const thumbnails = document.querySelectorAll('.thumbnail');
    thumbnails.forEach(thumbnail => {
        thumbnail.addEventListener('click', function(e) {
            e.preventDefault();
            const imageUrl = this.getAttribute('href');
            const title = this.querySelector('img').getAttribute('alt');
            const lightbox = document.createElement('div');
            lightbox.className = 'lightbox';
            const lightboxImage = document.createElement('img');
            lightboxImage.src = imageUrl;
            lightboxImage.alt = title;
            const imageTitle = document.createElement('h3');
            imageTitle.textContent = title;
            const closeButton = document.createElement('button');
            closeButton.className = 'close-button';
            closeButton.innerHTML = 'Close';
            lightbox.appendChild(lightboxImage);
            lightbox.appendChild(imageTitle);
            lightbox.appendChild(closeButton);
            document.body.appendChild(lightbox);
            closeButton.addEventListener('click', function() {
                document.body.removeChild(lightbox);
            });
            lightbox.addEventListener('click', function(e) {
                if (e.target === this) {
                    document.body.removeChild(lightbox);
                }
            });
        });
    });
</script>

MMCT - 2023