<?php include 'header.php'; ?>
<!-- END nav -->

<section class="hero-wrap hero-wrap-2 js-fullheight" style="background-image: url('admin/pic/32.jpg');">
  <div class="overlay"></div>
  <div class="container">
    <div class="row no-gutters slider-text js-fullheight align-items-end justify-content-center">
	<div class="col-md-9 ftco-animate pb-5 text-center">
	   <p class="breadcrumbs">
		<span class="mr-2">
		   <a href="home.php">Home <i class="fa fa-chevron-right"></i></a>
		</span> 
		<span class="mr-2">
		   <a href="destination.php">Destinations <i class="fa fa-chevron-right"></i></a>
		</span> 
		<span>China <i class="fa fa-chevron-right"></i></span>
	   </p>
	   <h1 class="mb-0 bread text-uppercase font-weight-bold">Explore China</h1>
	 </div>
 </div>
</div>
</section>



<section class="ftco-section">
   <div class="container" style="
    max-width: 1400px;
">
   <div class="row">
				<?php
include("admin/conn.php");

$stmt = $conn->prepare("SELECT * FROM add_adver WHERE country = 'China' ORDER BY RAND() LIMIT 21");
$stmt->execute();
$result = $stmt->get_result();

while ($row = $result->fetch_assoc()):
?>

					<div class="col-md-4 ftco-animate">
						<div class="project-wrap">
							<a href="details.php?category=<?= $row['id']; ?>" class="img" style="background-image: url(admin/pic/<?= $row['product_img']; ?>);">
								<span class="price">Trending</span>
							</a>
							<div class="text p-4">
							<?php
							$days = rand(4, 7); // Random number between 4 and 7
							$nights = $days - 1; // Nights are one less than days
							?>
							<span class="days text-uppercase font-weight-bold text-primary"><?= $days; ?> Days / <?= $nights; ?> Nights Tour</span>
								<h3 style="font-size: 18px;"><a href="details.php?category=<?= $row['id']; ?>"><?= $row['title']; ?></a></h3>
								<p class="location"><span class="fa fa-map-marker"></span> <?= $row['country']; ?></p>
								<?php
								$shower_count = rand(0, 5); // Random number between 0 and 5
								$bed_count = rand(1, 4); // Random number between 1 and 4
								?>
								<ul>
									<li><span class="flaticon-shower"></span><?= $shower_count; ?></li>
									<li><span class="flaticon-king-size"></span><?= $bed_count; ?></li>
								</ul>
							</div>
						</div>
					</div>
					
					<?php endwhile; ?>
					
				</div>

</div>
</section>



<?php include 'footer.php'; ?>