MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.138.69.39
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/activesports.co.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/activesports.co.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>Projects</span></h2>
                <!--<p>To provide a better quality of life by designing eco-friendly structures with aesthetic sense.</p>-->
            </div>
            <div class="project-menu-style project-menu-active isotope-btn-add-active mb-6">
                <button class="active btn-project" data-filter="*">All</button>
                <?php 
                    $sql = "SELECT DISTINCT tbl_gallery.work_status FROM `tbl_gallery`";
                    $run = mysqli_query($db,$sql) or die("Query Not run");
                    while($data = mysqli_fetch_assoc($run)){
                ?>
                <button class="btn-project" data-filter=".<?php echo $data['work_status']?>"><?php 
                if($data['work_status'] == 1) {
                    echo "Ongoing Projects";
                } elseif ($data['work_status'] == 2) {
                    echo "Completed Projects";
                }
                ?></button>
                <?php } ?>
            </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` ORDER BY g_id DESC LIMIT 8";
                    $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']?>">
                            
                            <div class="project-content">
                                 <span class="category">Active Sports</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'); // Get the title from the alt attribute of the image
            const lightbox = document.createElement('div');
            lightbox.className = 'lightbox';
            const lightboxImage = document.createElement('img');
            lightboxImage.src = imageUrl;
            lightboxImage.alt = title; // Set the alt attribute of the lightbox image to the title
            const imageTitle = document.createElement('h3');
            imageTitle.textContent = title; // Set the text content of the paragraph to the title
            const closeButton = document.createElement('button');
            closeButton.className = 'close-button';
            closeButton.innerHTML = 'Close';
            lightbox.appendChild(lightboxImage);
            lightbox.appendChild(imageTitle); // Append the title to the lightbox
            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