BLACKSITE
:
216.73.216.62
:
147.93.18.13 / vinyasaweddings.com
:
Linux srv667811 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
:
/
var
/
www
/
vkraft
/
views
/
layout
/
Upload File:
files >> /var/www/vkraft/views/layout/testimonial.php
<?php // Assuming you already have a PDO connection in $db require_once __DIR__ . '/../../db.php'; $stmt = $db->prepare("SELECT * FROM testimonials WHERE status = 'active' ORDER BY id DESC"); $stmt->execute(); $activeTestimonials = $stmt->fetchAll(PDO::FETCH_ASSOC); ?> <section class="testimonial-section py-5" style="background-color: var(--gray);"> <div class="container"> <div class="section-header text-center mb-5"> <h2 class="section-title">What Our Clients Say</h2> <p class="section-subtitle">Trusted by thousands of satisfied customers</p> </div> <div class="owl-carousel testimonial-carousel single-testimonial"> <?php if (count($activeTestimonials) > 0): ?> <?php foreach ($activeTestimonials as $testimonial): ?> <div class="testimonial-item text-center px-4"> <div class="testimonial-content bg-white p-4 p-lg-5 rounded-3 shadow-sm"> <div class="rating mb-3"> <?php $fullStars = floor($testimonial['rating']); $halfStar = ($testimonial['rating'] - $fullStars >= 0.5); for ($i = 0; $i < $fullStars; $i++) { echo '<i class="fas fa-star text-warning"></i>'; } if ($halfStar) { echo '<i class="fas fa-star-half-alt text-warning"></i>'; } for ($i = $fullStars + $halfStar; $i < 5; $i++) { echo '<i class="far fa-star text-warning"></i>'; } ?> </div> <p class="testimonial-text fs-5 mb-4">"<?= nl2br(htmlspecialchars($testimonial['details'])) ?>"</p> <div class="client-info"> <?php if (!empty($testimonial['image']) && file_exists('uploads/testimonials/' . $testimonial['image'])): ?> <img src="<?= BASE_URL ?>/uploads/testimonials/<?= htmlspecialchars($testimonial['image']) ?>" alt="Client" class="rounded-circle mb-2" width="80"> <?php else: ?> <!-- User Icon instead of placeholder image --> <div class="d-flex justify-content-center align-items-center rounded-circle bg-light mb-2" style="width:80px; height:80px; font-size:2rem; color:#806853;"> <i class="bi bi-person-fill"></i> </div> <?php endif; ?> <h5 class="mb-1"><?= htmlspecialchars($testimonial['name']) ?></h5> <p class="text-muted mb-0"><?= htmlspecialchars($testimonial['location']) ?></p> </div> </div> </div> <?php endforeach; ?> <?php else: ?> <div class="text-center">No testimonials available at the moment.</div> <?php endif; ?> </div> </div> </section>