/
home
/
capindnl
/
public_html
/
Upload File
HOME
<?php include "include/header.php"; ?> <section class="about-main-cover-section"> <div class="about-cover-bg-shapes-container"> <div class="about-cover-shape-element about-cover-shape-element-1"></div> <div class="about-cover-shape-element about-cover-shape-element-2"></div> <div class="about-cover-shape-element about-cover-shape-element-3"></div> <div class="about-cover-shape-element about-cover-shape-element-4"></div> </div> <div class="container"> <div class="about-cover-content-wrapper"> <!-- Breadcrumb Navigation --> <nav class="about-cover-breadcrumb-nav"> <a href="index.php" class="about-breadcrumb-home-link"> <i class="fas fa-home"></i> Home </a> <span class="about-breadcrumb-divider"><i class="fas fa-chevron-right"></i></span> <span class="about-breadcrumb-active-page">Video Gallery</span> </nav> <!-- Page Title --> <h1 class="about-cover-heading-title">Video Gallery</h1> <p class="about-cover-description-text"> Watch our corporate videos, event highlights, customer testimonials, and company updates from CAPIN DHANVARSHA NIDHI LTD. </p> </div> </div> </section> <!-- Video Gallery Section --> <section class="cdnl-vids-section py-5"> <div class="cdnl-vids-bg"> <div class="cdnl-vids-bg-shape cdnl-vids-shape-hex"></div> <div class="cdnl-vids-bg-shape cdnl-vids-shape-dia"></div> </div> <div class="container"> <div class="row g-4"> <?php // Fetch videos from database $sql = "SELECT * FROM video ORDER BY video_date DESC"; $res = mysqli_query($obj->mysqli, $sql); if($res && mysqli_num_rows($res) > 0): while($video_data = mysqli_fetch_assoc($res)): // Extract YouTube video ID from link $video_link = $video_data['video_link']; $video_id = ''; // Parse YouTube URL to get video ID $patterns = [ '/youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/', '/youtu\.be\/([a-zA-Z0-9_-]+)/', '/youtube\.com\/embed\/([a-zA-Z0-9_-]+)/' ]; foreach($patterns as $pattern) { if(preg_match($pattern, $video_link, $matches)) { $video_id = $matches[1]; break; } } // If no video ID found, skip this video if(empty($video_id)) continue; // Format date $video_date = date('M d, Y', strtotime($video_data['video_date'])); ?> <!-- Video Card --> <div class="col-lg-4 col-md-6"> <div class="cdnl-vid-card"> <div class="cdnl-video-container"> <iframe src="https://www.youtube.com/embed/<?php echo $video_id; ?>?rel=0&modestbranding=1" title="<?php echo htmlspecialchars($video_data['video_title']); ?>" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen> </iframe> </div> <div class="cdnl-vid-info"> <h5 class="cdnl-vid-title"><?php echo htmlspecialchars($video_data['video_title']); ?></h5> <div class="cdnl-vid-meta"> <div class="cdnl-vid-date"> <i class="far fa-calendar-alt me-1"></i> <?php echo $video_date; ?> </div> <a href="<?php echo $video_link; ?>" target="_blank" class="cdnl-vid-watch-full"> <i class="fab fa-youtube me-1"></i> Watch Full Video </a> </div> </div> </div> </div> <?php endwhile; else: ?> <!-- No Videos Message --> <div class="col-12"> <div class="text-center py-5"> <div class="cdnl-no-videos"> <i class="fas fa-video-slash fa-3x mb-4" style="color: #0a2463;"></i> <h3 class="mb-3">No Videos Available</h3> <p class="text-muted">Check back soon for our latest videos.</p> </div> </div> </div> <?php endif; ?> </div> </div> </section> <!-- CTA Section --> <section class="cdnl-vids-cta py-5"> <div class="cdnl-vids-cta-bg"> <div class="cdnl-vids-cta-shape cdnl-vids-cta-1"></div> <div class="cdnl-vids-cta-shape cdnl-vids-cta-2"></div> </div> <div class="container"> <div class="cdnl-vids-cta-content text-center"> <h2 class="cdnl-vids-cta-title mb-3">Subscribe to Our YouTube Channel</h2> <p class="cdnl-vids-cta-description mb-4"> Stay updated with our latest videos, corporate updates, financial insights, and more by subscribing to our official YouTube channel. </p> <a href="https://www.youtube.com" target="_blank" class="cdnl-vids-cta-button"> <i class="fab fa-youtube me-2"></i> Subscribe on YouTube </a> </div> </div> </section> <?php include"include/footer.php" ?>