45 lines
2.3 KiB
PHP
45 lines
2.3 KiB
PHP
<?php
|
|
require_once 'db/config.php';
|
|
$page_title = "Paket Travel";
|
|
$page_description = "Jelajahi destinasi terbaik bersama kami.";
|
|
include __DIR__ . '/includes/header.php';
|
|
|
|
$tours = db()->query("SELECT * FROM tour_packages ORDER BY name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
|
?>
|
|
|
|
<div class="container mt-5 pt-5">
|
|
<div class="text-center mb-5">
|
|
<h1 class="display-5 fw-bold text-uppercase">Paket Wisata</h1>
|
|
<p class="lead text-muted">Jelajahi destinasi terbaik bersama kami.</p>
|
|
</div>
|
|
|
|
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
|
|
<?php if (empty($tours)): ?>
|
|
<div class="col-12">
|
|
<div class="alert alert-info text-center">Saat ini belum ada paket wisata yang tersedia. Silakan cek kembali nanti.</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?php foreach ($tours as $tour): ?>
|
|
<div class="col">
|
|
<div class="card h-100 shadow-sm vehicle-card">
|
|
<img src="assets/images/<?php echo htmlspecialchars($tour['image']); ?>" class="card-img-top" alt="<?php echo htmlspecialchars($tour['name']); ?>" style="height: 200px; object-fit: cover;">
|
|
<div class="card-body d-flex flex-column">
|
|
<h5 class="card-title fw-bold"><?php echo htmlspecialchars($tour['name']); ?></h5>
|
|
<p class="card-text text-muted flex-grow-1"><?php echo nl2br(htmlspecialchars($tour['itinerary'])); ?></p>
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<span class="badge bg-light text-dark p-2"><i class="bi bi-clock-fill me-1"></i> <?php echo htmlspecialchars($tour['duration']); ?></span>
|
|
</div>
|
|
<h4 class="card-text text-end fw-bold text-primary mb-3">Rp <?php echo number_format($tour['price'], 0, ',', '.'); ?> <span class="fw-normal fs-6 text-muted">/ pax</span></h4>
|
|
<a href="tour_booking.php?tour_id=<?php echo $tour['id']; ?>" class="btn btn-primary w-100 fw-bold">
|
|
<i class="bi bi-calendar-check-fill"></i> Book Now
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php include __DIR__ . '/includes/footer.php'; ?>
|