diff --git a/README.md b/README.md index d733e9a..3064d48 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,5 @@ The aim of this work is to ease the process of searching for suitable accomodati - Implemented the search for property feature. Users have the option to either enable strict search which would make sure the search results match exactly with what they're expecting or they can disable strict search which would make sure that the search results contain the search term. There are also certain fields such as property type, location of the property, and price range that can be used to narrow down the search results. - Implemented the contact property owner feature for individual apartments (the form to signify interest for an apartment) + + - Created the view all properties page where all available properties are listed. diff --git a/lib/pages/properties.php b/lib/pages/properties.php new file mode 100644 index 0000000..e949359 --- /dev/null +++ b/lib/pages/properties.php @@ -0,0 +1,20 @@ + + + +
+

+ All Property Listings +

+
+ +
+
+ getAllProperties() ?> +
+
+ \ No newline at end of file diff --git a/lib/pages/search.php b/lib/pages/search.php index 9370d2d..deca03d 100644 --- a/lib/pages/search.php +++ b/lib/pages/search.php @@ -1,4 +1,4 @@ - + con = DB::getInstance(); + } + + public function getAllProperties() + { + $houses = $this->con->select("id, title, index_img, price, summary, location, type, link", "properties", "WHERE status = 'available' ORDER BY id DESC"); + + if ($houses->num_rows < 1) : ?> +

+ No apartment yet. Please check again at a later time. +

+ fetch_object()) : ?> +
+
+ <?= $house->title ?> + + +
+ +
+
+ type === 'For Rent' ? "text-green-500 dark:text-green-400" : "text-rose-500 dark:text-rose-400" ?>> + + type ?> + + + + ₦ price) ?> + +
+ +
+

+ title ?> +

+ +

+ summary ?> +

+
+ +
+ + location ?> +
+ + + View Details + +
+
+