-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlisting-city-select.php
58 lines (56 loc) · 3.02 KB
/
listing-city-select.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!--
FILE: : <?php echo basename(__FILE__, $_SERVER['PHP_SELF'])."\n"; ?>
TITLE : AveNest Listings
AUTHORS : Smit Patel, Mike Cusson, Roshan Persaud
LAST MODIFIED : NOV 11, 2019
DESCRIPTION : Listing City Select
-->
<?php
$title = "Listing City Select";
$file = "listing-search.php";
$date = "NOV 11, 2019";
$banner = "Listing City Select";
$desc = "Listing City Select Page used to select a city";
require("./header.php");
if(is_get()){
$city = isset($_SESSION['search']['city']) ? $_SESSION['search']['city'] : sum_check_box([1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]);
} else if(is_post()) {
$city = sum_check_box($_POST['city']);
if(isset($city)){
$_SESSION['search']['city'] = $city;
header('Location: ./listing-search.php');
ob_flush();
exit();
}
}
?>
<div class="text-center flex flex-wrap flex-col py-4 content-center container mx-auto justify-center">
<p class="text-2xl text-primary-500 w-auto lg:w-1/3 py-2 px-3 font-headline font-semibold underline">
Select A City
</p>
</div>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" class="w-full flex lg:flex-wrap flex-wrap-reverse justify-center items-center py-0 lg:py-10">
<!-- Image Map Generated by http://www.image-map.net/ -->
<div class="w-full lg:w-3/5 flex flex-wrap justify-center">
<img src="./images/durham_region.jpg" usemap="#image-map">
<map name="image-map">
<area target="_self" alt="scugog" title="scugog" href="./listing-search.php?city=256" coords="560,115,217,1" shape="rect">
<area target="_self" alt="pickering" title="pickering" href="./listing-search.php?city=16" coords="40,331,43,117,215,116,215,228,137,230,140,363,59,366" shape="poly">
<area target="_self" alt="ajax" title="ajax" href="./listing-search.php?city=1" coords="212,364,137,231" shape="rect">
<area target="_self" alt="whitby" title="whitby" href="./listing-search.php?city=64" coords="215,117,300,365" shape="rect">
<area target="_self" alt="oshawa" title="oshawa" href="./listing-search.php?city=8" coords="304,119,388,371" shape="rect">
<area target="_self" alt="clarington" title="clarington" href="./listing-search.php?city=128" coords="391,116,632,391" shape="rect">
</map>
</div>
<div class="w-full lg:w-2/5 flex flex-wrap justify-center p-6 lg:p-2">
<?php build_checkbox('city', 'value', $city, false, "w-full");?>
<div class="w-full flex flex-wrap justify-start">
<div class="w-auto pt-2">
<input type="submit" value="Submit" class="focus:outline-none focus:shadow-outline w-full text-lg py-2 px-3 shadow-lg rounded hover:bg-primary-500 bg-primary-300 text-white font-semibold cursor-pointer"/>
</div>
</div>
</div>
</form>
<?php
require("./footer.php");
?>