Viewing File: /home/quiczmwg/solixproperties.org/canada.php
<?php
@session_start();
include_once ("include/header.php");
if (!isset($_SESSION['userid'])) {
header("Location: login.php");
exit();
}
?>
<?php
include_once ("include/topbar.php");
?>
<?php include_once ("search.php"); ?>
<!-- Category Start -->
<div class="container-xxl py-3">
<!-- Category End -->
<div class="row g-0 gx-5 align-items-end">
<div class="col-lg-6">
<div class="text-start mx-auto mb-5 wow slideInLeft" data-wow-delay="0.1s">
<h1 class="mb-3">Rental Listings</h1>
<p>Explore our curated selection of rental listings tailored to your needs and preferences.</p>
</div>
</div>
<div class="col-lg-6 text-start text-lg-end wow slideInRight" data-wow-delay="0.1s">
<ul class="nav nav-pills d-inline-flex justify-content-end mb-5">
<li class="nav-item me-2">
<a class="btn btn-outline-primary active" data-bs-toggle="pill" href="#tab-0">Apartments</a>
</li>
<li class="nav-item me-2">
<a class="btn btn-outline-primary" data-bs-toggle="pill" href="#tab-1">Studio</a>
</li>
<li class="nav-item me-2">
<a class="btn btn-outline-primary" data-bs-toggle="pill" href="#tab-2">1 Bed</a>
</li>
<li class="nav-item me-2">
<a class="btn btn-outline-primary" data-bs-toggle="pill" href="#tab-3">2 Bed</a>
</li>
<li class="nav-item me-2">
<a class="btn btn-outline-primary" data-bs-toggle="pill" href="#tab-4">3 Bed</a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="container">
<div class="tab-content">
<div id="tab-0" class="tab-pane fade show p-0 active">
<div class="row g-4">
<?php
$select_rentals = mysqli_query($conn, "SELECT DISTINCT rental_id, bedroom_category, location, baths, heights, description, price, country FROM `rentals` WHERE country = 'canada' ORDER BY created_at DESC");
if (mysqli_num_rows($select_rentals) > 0) {
while ($row = mysqli_fetch_assoc($select_rentals)){
// Retrieve all images associated with the current rental_id
$rental_id = $row['rental_id'];
$select_images_query = "SELECT nft_img FROM rentals WHERE rental_id = '$rental_id'";
$result_images = mysqli_query($conn, $select_images_query);
$images = array();
while ($image_row = mysqli_fetch_assoc($result_images)) {
$images[] = $image_row['nft_img'];
}
?>
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<a href="apartment_details.php?rental_id=<?php echo $rental_id; ?>" class="text-decoration-none">
<div class="property-item rounded overflow-hidden">
<div id="carousel_<?php echo $rental_id; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<!-- Generate indicators dynamically based on number of images -->
<?php
foreach ($images as $key => $image) {
?>
<button type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide-to="<?= $key ?>" <?= $key === 0 ? 'class="active"' : '' ?> aria-current="true" aria-label="Slide <?= $key ?>"></button>
<?php
}
?>
</div>
<div class="carousel-inner">
<!-- Generate carousel items dynamically -->
<?php
foreach ($images as $key => $image) {
?>
<div class="carousel-item <?= $key === 0 ? 'active' : '' ?>">
<img src="rental/<?php echo $image; ?>" class="d-block w-100" alt="" style="max-height: 300px;">
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="p-4 pb-0">
<h5 class="text-primary mb-3">$<?php echo number_format($row['price']); ?>/mo</h5>
<a class="d-block h5 mb-2" href="apartment_details.php?rental_id=<?php echo $rental_id; ?>">Apartment For Rent</a>
<p><i class="fa fa-map-marker-alt text-primary me-2"></i><?php echo $row['location']; ?></p>
</div>
<div class="d-flex border-top">
<small class="flex-fill text-center border-end py-2"><i class="fa fa-ruler-combined text-primary me-2"></i><?php echo $row['heights']; ?> Sqft</small>
<small class="flex-fill text-center border-end py-2"><i class="fa fa-bed text-primary me-2"></i><?php echo $row['bedroom_category']; ?> Bed</small>
<small class="flex-fill text-center py-2"><i class="fa fa-bath text-primary me-2"></i><?php echo $row['baths']; ?> Bath</small>
</div>
</div>
</a>
</div>
<?php
} // End of while loop
} // End of if condition
else {
// If no apartments are found, you can display a message
echo '<p>No apartments found.</p>';
}
?>
</div>
</div>
<div id="tab-1" class="tab-pane fade show p-0">
<div class="row g-4">
<?php
$select_rentals_1_bed = mysqli_query($conn, "SELECT DISTINCT rental_id, bedroom_category, location, baths, heights, description, price, country FROM `rentals` WHERE country = 'canada' AND bedroom_category = 'studio' ORDER BY created_at DESC");
if (mysqli_num_rows($select_rentals_1_bed) > 0) {
while ($row = mysqli_fetch_assoc($select_rentals_1_bed)){
// Retrieve all images associated with the current rental_id
$rental_id = $row['rental_id'];
$select_images_query = "SELECT nft_img FROM rentals WHERE rental_id = '$rental_id'";
$result_images = mysqli_query($conn, $select_images_query);
$images = array();
while ($image_row = mysqli_fetch_assoc($result_images)) {
$images[] = $image_row['nft_img'];
}
?>
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<a href="apartment_details.php?rental_id=<?php echo $rental_id; ?>" class="text-decoration-none">
<div class="property-item rounded overflow-hidden">
<div id="carousel_<?php echo $rental_id; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<!-- Generate indicators dynamically based on number of images -->
<?php
foreach ($images as $key => $image) {
?>
<button type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide-to="<?= $key ?>" <?= $key === 0 ? 'class="active"' : '' ?> aria-current="true" aria-label="Slide <?= $key ?>"></button>
<?php
}
?>
</div>
<div class="carousel-inner">
<!-- Generate carousel items dynamically -->
<?php
foreach ($images as $key => $image) {
?>
<div class="carousel-item <?= $key === 0 ? 'active' : '' ?>">
<img src="rental/<?php echo $image; ?>" class="d-block w-100" alt="" style="max-height: 300px;">
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="p-4 pb-0">
<h5 class="text-primary mb-3">$<?php echo number_format($row['price']); ?>/mo</h5>
<a class="d-block h5 mb-2" href="apartment_details.php?rental_id=<?php echo $rental_id; ?>">Apartment For Rent</a>
<p><i class="fa fa-map-marker-alt text-primary me-2"></i><?php echo $row['location']; ?></p>
</div>
<div class="d-flex border-top">
<small class="flex-fill text-center border-end py-2"><i class="fa fa-ruler-combined text-primary me-2"></i><?php echo $row['heights']; ?> Sqft</small>
<small class="flex-fill text-center border-end py-2"><i class="fa fa-bed text-primary me-2"></i><?php echo $row['bedroom_category']; ?> Bed</small>
<small class="flex-fill text-center py-2"><i class="fa fa-bath text-primary me-2"></i><?php echo $row['baths']; ?> Bath</small>
</div>
</div>
</a>
</div>
<?php
} // End of while loop
} // End of if condition
else {
// If no apartments are found, you can display a message
echo '<p>No apartments found.</p>';
}
?>
</div>
</div>
<div id="tab-2" class="tab-pane fade show p-0">
<div class="row g-4">
<?php
$select_rentals_1_bed = mysqli_query($conn, "SELECT DISTINCT rental_id, bedroom_category, location, baths, heights, description, price, country FROM `rentals` WHERE country = 'canada' AND bedroom_category = '1' ORDER BY created_at DESC");
if (mysqli_num_rows($select_rentals_1_bed) > 0) {
while ($row = mysqli_fetch_assoc($select_rentals_1_bed)){
// Retrieve all images associated with the current rental_id
$rental_id = $row['rental_id'];
$select_images_query = "SELECT nft_img FROM rentals WHERE rental_id = '$rental_id'";
$result_images = mysqli_query($conn, $select_images_query);
$images = array();
while ($image_row = mysqli_fetch_assoc($result_images)) {
$images[] = $image_row['nft_img'];
}
?>
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<a href="apartment_details.php?rental_id=<?php echo $rental_id; ?>" class="text-decoration-none">
<div class="property-item rounded overflow-hidden">
<div id="carousel_<?php echo $rental_id; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<!-- Generate indicators dynamically based on number of images -->
<?php
foreach ($images as $key => $image) {
?>
<button type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide-to="<?= $key ?>" <?= $key === 0 ? 'class="active"' : '' ?> aria-current="true" aria-label="Slide <?= $key ?>"></button>
<?php
}
?>
</div>
<div class="carousel-inner">
<!-- Generate carousel items dynamically -->
<?php
foreach ($images as $key => $image) {
?>
<div class="carousel-item <?= $key === 0 ? 'active' : '' ?>">
<img src="rental/<?php echo $image; ?>" class="d-block w-100" alt="" style="max-height: 300px;">
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="p-4 pb-0">
<h5 class="text-primary mb-3">$<?php echo number_format($row['price']); ?>/mo</h5>
<a class="d-block h5 mb-2" href="apartment_details.php?rental_id=<?php echo $rental_id; ?>">Apartment For Rent</a>
<p><i class="fa fa-map-marker-alt text-primary me-2"></i><?php echo $row['location']; ?></p>
</div>
<div class="d-flex border-top">
<small class="flex-fill text-center border-end py-2"><i class="fa fa-ruler-combined text-primary me-2"></i><?php echo $row['heights']; ?> Sqft</small>
<small class="flex-fill text-center border-end py-2"><i class="fa fa-bed text-primary me-2"></i><?php echo $row['bedroom_category']; ?> Bed</small>
<small class="flex-fill text-center py-2"><i class="fa fa-bath text-primary me-2"></i><?php echo $row['baths']; ?> Bath</small>
</div>
</div>
</a>
</div>
<?php
} // End of while loop
} // End of if condition
else {
// If no apartments are found, you can display a message
echo '<p>No apartments found.</p>';
}
?>
</div>
</div>
<div id="tab-3" class="tab-pane fade show p-0">
<div class="row g-4">
<?php
$select_rentals_1_bed = mysqli_query($conn, "SELECT DISTINCT rental_id, bedroom_category, location, baths, heights, description, price, country FROM `rentals` WHERE country = 'canada' AND bedroom_category = '2' ORDER BY created_at DESC");
if (mysqli_num_rows($select_rentals_1_bed) > 0) {
while ($row = mysqli_fetch_assoc($select_rentals_1_bed)){
// Retrieve all images associated with the current rental_id
$rental_id = $row['rental_id'];
$select_images_query = "SELECT nft_img FROM rentals WHERE rental_id = '$rental_id'";
$result_images = mysqli_query($conn, $select_images_query);
$images = array();
while ($image_row = mysqli_fetch_assoc($result_images)) {
$images[] = $image_row['nft_img'];
}
?>
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<a href="apartment_details.php?rental_id=<?php echo $rental_id; ?>" class="text-decoration-none">
<div class="property-item rounded overflow-hidden">
<div id="carousel_<?php echo $rental_id; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<!-- Generate indicators dynamically based on number of images -->
<?php
foreach ($images as $key => $image) {
?>
<button type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide-to="<?= $key ?>" <?= $key === 0 ? 'class="active"' : '' ?> aria-current="true" aria-label="Slide <?= $key ?>"></button>
<?php
}
?>
</div>
<div class="carousel-inner">
<!-- Generate carousel items dynamically -->
<?php
foreach ($images as $key => $image) {
?>
<div class="carousel-item <?= $key === 0 ? 'active' : '' ?>">
<img src="rental/<?php echo $image; ?>" class="d-block w-100" alt="" style="max-height: 300px;">
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="p-4 pb-0">
<h5 class="text-primary mb-3">$<?php echo number_format($row['price']); ?>/mo</h5>
<a class="d-block h5 mb-2" href="apartment_details.php?rental_id=<?php echo $rental_id; ?>">Apartment For Rent</a>
<p><i class="fa fa-map-marker-alt text-primary me-2"></i><?php echo $row['location']; ?></p>
</div>
<div class="d-flex border-top">
<small class="flex-fill text-center border-end py-2"><i class="fa fa-ruler-combined text-primary me-2"></i><?php echo $row['heights']; ?> Sqft</small>
<small class="flex-fill text-center border-end py-2"><i class="fa fa-bed text-primary me-2"></i><?php echo $row['bedroom_category']; ?> Bed</small>
<small class="flex-fill text-center py-2"><i class="fa fa-bath text-primary me-2"></i><?php echo $row['baths']; ?> Bath</small>
</div>
</div>
</a>
</div>
<?php
} // End of while loop
} // End of if condition
else {
// If no apartments are found, you can display a message
echo '<p>No apartments found.</p>';
}
?>
</div>
</div>
<div id="tab-4" class="tab-pane fade show p-0">
<div class="row g-4">
<?php
$select_rentals_1_bed = mysqli_query($conn, "SELECT DISTINCT rental_id, bedroom_category, location, baths, heights, description, price, country FROM `rentals` WHERE country = 'canada' AND bedroom_category = '3' ORDER BY created_at DESC");
if (mysqli_num_rows($select_rentals_1_bed) > 0) {
while ($row = mysqli_fetch_assoc($select_rentals_1_bed)){
// Retrieve all images associated with the current rental_id
$rental_id = $row['rental_id'];
$select_images_query = "SELECT nft_img FROM rentals WHERE rental_id = '$rental_id'";
$result_images = mysqli_query($conn, $select_images_query);
$images = array();
while ($image_row = mysqli_fetch_assoc($result_images)) {
$images[] = $image_row['nft_img'];
}
?>
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<a href="apartment_details.php?rental_id=<?php echo $rental_id; ?>" class="text-decoration-none">
<div class="property-item rounded overflow-hidden">
<div id="carousel_<?php echo $rental_id; ?>" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<!-- Generate indicators dynamically based on number of images -->
<?php
foreach ($images as $key => $image) {
?>
<button type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide-to="<?= $key ?>" <?= $key === 0 ? 'class="active"' : '' ?> aria-current="true" aria-label="Slide <?= $key ?>"></button>
<?php
}
?>
</div>
<div class="carousel-inner">
<!-- Generate carousel items dynamically -->
<?php
foreach ($images as $key => $image) {
?>
<div class="carousel-item <?= $key === 0 ? 'active' : '' ?>">
<img src="rental/<?php echo $image; ?>" class="d-block w-100" alt="" style="max-height: 300px;">
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel_<?php echo $rental_id; ?>" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="p-4 pb-0">
<h5 class="text-primary mb-3">$<?php echo number_format($row['price']); ?>/mo</h5>
<a class="d-block h5 mb-2" href="apartment_details.php?rental_id=<?php echo $rental_id; ?>">Apartment For Rent</a>
<p><i class="fa fa-map-marker-alt text-primary me-2"></i><?php echo $row['location']; ?></p>
</div>
<div class="d-flex border-top">
<small class="flex-fill text-center border-end py-2"><i class="fa fa-ruler-combined text-primary me-2"></i><?php echo $row['heights']; ?> Sqft</small>
<small class="flex-fill text-center border-end py-2"><i class="fa fa-bed text-primary me-2"></i><?php echo $row['bedroom_category']; ?> Bed</small>
<small class="flex-fill text-center py-2"><i class="fa fa-bath text-primary me-2"></i><?php echo $row['baths']; ?> Bath</small>
</div>
</div>
</a>
</div>
<?php
} // End of while loop
} // End of if condition
else {
// If no apartments are found, you can display a message
echo '<p>No apartments found.</p>';
}
?>
</div>
</div>
</div>
</div>
<?php include_once("include/footer.php") ?>
Back to Directory
File Manager
<