Viewing File: /home/quiczmwg/solixproperties.org/apartment_details.php
<?php
@session_start();
include_once ("include/header.php");
?>
<?php
include_once ("include/topbar.php");
?>
<?php
include_once ("search.php");
// Check if rental ID is provided in the URL
if(isset($_GET['rental_id'])) {
// Get rental ID from URL
$rental_id = $_GET['rental_id'];
// Fetch details of the apartment using rental ID
$select_apartment_query = mysqli_query($conn, "SELECT * FROM `rentals` WHERE rental_id = '$rental_id'");
// Check if apartment exists
if(mysqli_num_rows($select_apartment_query) > 0) {
$apartment_details = mysqli_fetch_assoc($select_apartment_query);
// Display apartment details
?>
<div class="container">
<!-- Display all images associated with the apartment -->
<div class="row">
<?php
$select_images_query = mysqli_query($conn, "SELECT nft_img FROM `rentals` WHERE rental_id = '$rental_id'");
while($image_row = mysqli_fetch_assoc($select_images_query)) {
$image_path = $image_row['nft_img'];
?>
<div class="col-lg-3">
<img src="rental/<?php echo $image_path; ?>" alt="Apartment Image" class="img-fluid">
</div>
<?php
}
?>
</div>
<h1 class="mt-3 text-primary">Apartment Details</h1>
<p class="d-none">Rental ID: <?php echo $apartment_details['rental_id']; ?></p>
<p>Bedroom: <?php echo $apartment_details['bedroom_category']; ?></p>
<p>Location: <?php echo $apartment_details['location']; ?></p>
<p>Baths: <?php echo $apartment_details['baths']; ?></p>
<p>Heights: <?php echo $apartment_details['heights']; ?></p>
<p>Price: $<?php echo number_format($apartment_details['price']); ?>/mo</p>
<p>State: <?php echo $apartment_details['state']; ?></p>
<h5 class="m-0 text-primary">Description:</h5>
<!-- <h5 class="text-sucess"></h5> -->
<p><?php echo $apartment_details['description']; ?></p>
<h3 class="text-primary">Neighborhood: <?php echo $apartment_details['location']; ?></h3>
<div id="map">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d12469.776493332698!2d-80.14036379941481!3d25.907788681148624!2m3!1f357.26927939317244!2f20.870722720054623!3f0!3m2!1i1024!2i768!4f35!3m3!1m2!1s0x88d9add4b4ac788f%3A0xe77469d09480fcdb!2sSunny%20Isles%20Beach!5e1!3m2!1sen!2sth!4v1642869952544!5m2!1sen!2sth" width="100%" height="500px" frameborder="0" style="border:0; border-radius: 10px; box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);" allowfullscreen=""></iframe>
</div>
<p>Agent: <?php echo $apartment_details['agent']; ?></p>
<div class="d-flex gap-3">
<div class="my-3">
<a href="finance.php" class="btn btn-info text-wite" style="background: navy;">Finance Apartment</a>
</div>
<!-- <a class="d-block h5 mb-2" href="apartment_details.php?rental_id=</?php echo $rental_id; ?>">Apartment For Rent</a> -->
<div class="my-3">
<a href="deposit.php?rental_id=<?php echo $rental_id; ?>" class="btn btn-primary">Make Deposit</a>
</div>
</div>
</div>
<?php
} else {
// Apartment not found
echo '<p>Apartment not found.</p>';
}
} else {
// Rental ID not provided in URL
echo '<p>Rental ID not provided.</p>';
}
// Include footer
include_once("include/footer.php");
?>
Back to Directory
File Manager
<