/
home
/
u775757334
/
domains
/
civicwelllife.com
/
public_html
/
include
/
/home/u775757334/domains/civicwelllife.com/public_html/include
mkdir
upload
Name
Size
Mode
Actions
about1.php
1746
0644
edit
dl
rm
about2.php
3128
0644
edit
dl
rm
blog-section.php
8307
0644
edit
dl
rm
category-list.php
5334
0644
edit
dl
rm
category-wise-product.php
4868
0644
edit
dl
rm
category.php
2107
0644
edit
dl
rm
client-section.php
2156
0644
edit
dl
rm
cta-banner.php
405
0644
edit
dl
rm
cta-section-1.php
1180
0644
edit
dl
rm
cta-section.php
1165
0644
edit
dl
rm
customer-menu.php
382
0644
edit
dl
rm
day-offer.php
13055
0644
edit
dl
rm
doctor-menu.php
1478
0644
edit
dl
rm
footer-file.php
1779
0644
edit
dl
rm
footer-tab.php
1928
0644
edit
dl
rm
footer.php
11953
0644
edit
dl
rm
header-file.php
658
0644
edit
dl
rm
header-top.php
4157
0644
edit
dl
rm
header.php
19312
0644
edit
dl
rm
impact-section.php
2841
0644
edit
dl
rm
mobile-category.php
1292
0644
edit
dl
rm
mobile-menu.php
8536
0644
edit
dl
rm
model.php
49991
0644
edit
dl
rm
offer.php
2821
0644
edit
dl
rm
product-slide.php
7439
0644
edit
dl
rm
related-product.php
11034
0644
edit
dl
rm
shopping-cart.php
1938
0644
edit
dl
rm
slider.php
2252
0644
edit
dl
rm
testimonial.php
2023
0644
edit
dl
rm
trust-section.php
3902
0644
edit
dl
rm
video-section.php
4045
0644
edit
dl
rm
yt-section.php
4945
0644
edit
dl
rm
Edit:
/home/u775757334/domains/civicwelllife.com/public_html/include/yt-section.php
(4945B)
<?php $video_sql = mysqli_query($conn, " SELECT v.*, d.id AS doctor_id, d.name AS doctor_name, d.eduaction AS degree, d.experience FROM tbl_vedio v LEFT JOIN tbl_doctor_registration d ON v.doctor_id = d.id ORDER BY v.id DESC LIMIT 3 "); function getYouTubeId($url) { preg_match('/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&]+)/', $url, $matches); return $matches[1] ?? ''; } $home_videos = []; while ($row = mysqli_fetch_assoc($video_sql)) { $youtube_id = getYouTubeId($row['link']); if (empty($youtube_id)) continue; $row['youtube_id'] = $youtube_id; $home_videos[] = $row; // ✅ FIXED } ?> <section class="home-video-section py-5"> <div class="container"> <div class="flat-title wow fadeInUp" data-wow-delay="0s"> <span class="title">Latest Videos</span> <p class="sub-title"> Watch doctor-guided wellness videos with helpful advice, short descriptions, and expert consultation insights. </p> </div> <div class="row g-4 mt-1"> <?php foreach ($home_videos as $video): ?> <div class="col-md-4"> <div class="home-video-card h-100"> <!-- Thumbnail --> <a href="javascript:void(0);" class="home-video-img-wrap open-video" data-id="<?= $video['youtube_id']; ?>"> <img src="https://img.youtube.com/vi/<?= $video['youtube_id']; ?>/hqdefault.jpg" alt="<?= $video['tittle']; ?>" class="home-video-img"> <span class="home-video-play-btn"> <i class="icon icon-play"></i> </span> </a> <!-- Content --> <div class="home-video-content"> <h3 class="home-video-card-title"> <a href="javascript:void(0);" class="open-video" data-id="<?= $video['youtube_id']; ?>"> <?= $video['tittle']; ?> </a> </h3> <p class="home-video-card-desc"> <?= $video['short_description']; ?> </p> <!-- Doctor --> <div class="home-video-doctor"> <div class="home-video-doctor-left"> <div class="home-video-avatar"> <?= !empty($video['doctor_name']) ? strtoupper(substr($video['doctor_name'], 0, 1)) : 'D'; ?> </div> <div> <a href="doctor-profile.php?doctor_id=<?= $video['doctor_id']; ?>" style="text-decoration:none;color:inherit;"> <h6 class="mb-1"> <?= $video['doctor_name'] ?? 'Doctor'; ?> </h6> </a> <p class="mb-0"> <?= $video['degree'] ?? ''; ?> </p> </div> </div> <span class="home-video-exp"> <?= !empty($video['experience']) ? $video['experience'] . ' Years' : ''; ?> </span> </div> <!-- Button --> <a href="javascript:void(0);" class="home-video-read-btn open-video text-center" data-id="<?= $video['youtube_id']; ?>"> Watch Video <i class="icon icon-arrow-right"></i> </a> </div> </div> </div> <?php endforeach; ?> </div> <!-- View More Button --> <div class="text-center mt-4"> <a href="vedios.php" class="btn btn-primary px-4 py-2"> View More Videos </a> </div> </div> </section>
Save
cmd:
run