-
Notifications
You must be signed in to change notification settings - Fork 0
/
imovel.php
339 lines (306 loc) · 16.9 KB
/
imovel.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?php
include 'api/config.inc.php';
session_start();
$data = array(
'client_id' => $client_id,
'key' => $keyPass,
'limit' => '3',
'page' => '0',
'order' => 'imoveis_suites DESC,imoveis_publicar_destaque DESC',
'adicionar' => 'caracteristicas'
);
$filter = array(
'filter[5][field]' => 'imoveis_codigo',
'filter[5][operand]' => '=',
'filter[5][value]' => $_GET['id'],
);
$data = array_merge($data, $filter);
$url = $servidor . '/api/imovel/search';
$ch = curl_init();
//curl_setopt($ch, CURLOPT_GET, true);
curl_setopt($ch, CURLOPT_URL, $url . "/?" . http_build_query($data));
//curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response_json = curl_exec($ch);
//var_dump($response_json);
curl_close($ch);
$response = json_decode($response_json, true);
$imovel = (object) $response[0];
$caracteristicas = (object) $imovel->caracteristicas;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Title -->
<title>South - Real Estate Agency Template | Listings Details</title>
<!-- Favicon -->
<link rel="icon" href="img/core-img/favicon.ico">
<!-- Style CSS -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Preloader -->
<div id="preloader">
<div class="south-load"></div>
</div>
<!-- ##### Header Area Start ##### -->
<header class="header-area">
<!-- Top Header Area -->
<?php include 'topHeaderArea.php'; ?>
<!-- Main Header Area -->
<div class="main-header-area" id="stickyHeader">
<div class="classy-nav-container breakpoint-off">
<?php include 'navArea.php'; ?>
</div>
</div>
</header>
<!-- ##### Header Area End ##### -->
<!-- ##### Breadcumb Area Start ##### -->
<section class="breadcumb-area bg-img" style="height: 200px; background-color: #000">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<div class="breadcumb-content">
</div>
</div>
</div>
</div>
</section>
<!-- ##### Breadcumb Area End ##### -->
<?php
include 'searchArea.php';
?>
<!-- ##### Listings Content Area Start ##### -->
<section class="listings-content-wrapper section-padding-100">
<div class="container">
<div class="row" >
<div class="col-12" >
<!-- Single Listings Slides -->
<div class="single-listings-sliders owl-carousel">
<!-- Single Slide -->
<?php
$files = glob("api/img.imoveis/" . $imovel->imoveis_codigo . "*.{jpeg,jpg,png}", GLOB_BRACE);
if (!isset($imovel->imoveis_imagem_capa)) {
$imovel->imoveis_imagem_capa = $files[0];
} else {
$imovel->imoveis_imagem_capa = 'api/' . $imovel->imoveis_imagem_capa;
}
echo '<img src="' . $imovel->imoveis_imagem_capa . '" alt="" >';
foreach ($files as $file) {
if ($file != $imovel->imoveis_imagem_capa || count($files) == 1) {
echo '<img src="' . $file . '" alt="" >';
}
}
?>
<!-- Single Slide -->
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-12 col-lg-8">
<div class="listings-content">
<!-- Price -->
<div class="list-price">
<p><?php echo ($_GET['finalidade'] == 'alugar') ? 'Valor do aluguel: R$ ' . number_format($imovel->imoveis_valor_aluguel, 2, ',', '') : 'Valor do imóvel: R$ ' . number_format($imovel->imoveis_valor, 2, ',', ''); ?></p>
</div>
<h5><?php echo (isset($imovel->imoveis_texto_promocional)) ? $imovel->imoveis_texto_promocional : ''; ?></h5>
<p class="location"><img src="img/icons/location.png" alt=""><?php echo $imovel->imoveis_referencia; ?></p>
<p class="location"><?php echo (isset($imovel->imoveis_texto_promocional2)) ? $imovel->imoveis_texto_promocional2 : ''; ?></p>
<p>Cod.: <?php echo $imovel->imoveis_codigo; ?></p>
<!-- Meta -->
<div class="property-meta-data d-flex align-items-end">
<div class="bathroom">
<img src="img/icons/bathtub.png" alt="">
<span><?php echo (isset($imovel->imoveis_banheiros)) ? $imovel->imoveis_banheiros : 0; ?></span>
</div>
<div class="garage">
<img src="img/icons/garage.png" alt="">
<span><?php echo (isset($imovel->imoveis_garagens)) ? $imovel->imoveis_garagens : 0; ?></span>
</div>
<div class="space">
<img src="img/icons/space.png" alt="">
<span><?php echo (isset($imovel->imoveis_area_util)) ? $imovel->imoveis_area_util : 0.00; ?>m<sup>2</sup></span>
</div>
</div>
<!-- Core Features -->
<ul class="listings-core-features d-flex align-items-center">
<?php
foreach ($caracteristicas as $caracteristica) {
echo '<li><i class="fa fa-check" aria-hidden="true"></i> ' . $caracteristica['caracteristicas_nome'] . ' = ' . $caracteristica['caracteristicas_itens_valor'] . '</li>';
}
?>
</ul>
<!-- Listings Btn Groups -->
<div class="listings-btn-groups">
<a href="#" class="btn south-btn">See Floor plans</a>
<a href="#" class="btn south-btn active">calculate mortgage</a>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="contact-realtor-wrapper">
<div class="realtor-info">
<img src="img/bg-img/listing.jpg" alt="">
<div class="realtor---info">
<h2>Jeremy Scott</h2>
<p>Realtor</p>
<h6><img src="img/icons/phone-call.png" alt=""> +45 677 8993000 223</h6>
<h6><img src="img/icons/envelope.png" alt=""> [email protected]</h6>
</div>
<div class="realtor--contact-form">
<form action="#" method="post">
<div class="form-group">
<input type="text" class="form-control" id="realtor-name" placeholder="Your Name">
</div>
<div class="form-group">
<input type="number" class="form-control" id="realtor-number" placeholder="Your Number">
</div>
<div class="form-group">
<input type="enumber" class="form-control" id="realtor-email" placeholder="Your Mail">
</div>
<div class="form-group">
<textarea name="message" class="form-control" id="realtor-message" cols="30" rows="10" placeholder="Your Message"></textarea>
</div>
<button type="submit" class="btn south-btn">Send Message</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Listing Maps -->
<div class="row">
<div class="col-12">
<div class="listings-maps mt-100">
<div id="googleMap"></div>
</div>
</div>
</div>
</div>
</section>
<!-- ##### Listings Content Area End ##### -->
<!-- ##### Footer Area Start ##### -->
<footer class="footer-area section-padding-100-0 bg-img gradient-background-overlay" style="background-image: url(img/bg-img/cta.jpg);">
<!-- Main Footer Area -->
<div class="main-footer-area">
<div class="container">
<div class="row">
<!-- Single Footer Widget -->
<div class="col-12 col-sm-6 col-xl-3">
<div class="footer-widget-area mb-100">
<!-- Widget Title -->
<div class="widget-title">
<h6>About Us</h6>
</div>
<img src="img/bg-img/footer.jpg" alt="">
<div class="footer-logo my-4">
<img src="img/core-img/logo.png" alt="">
</div>
<p>Integer nec bibendum lacus. Suspen disse dictum enim sit amet libero males uada feugiat. Praesent malesuada.</p>
</div>
</div>
<!-- Single Footer Widget -->
<div class="col-12 col-sm-6 col-xl-3">
<div class="footer-widget-area mb-100">
<!-- Widget Title -->
<div class="widget-title">
<h6>Hours</h6>
</div>
<!-- Office Hours -->
<div class="weekly-office-hours">
<ul>
<li class="d-flex align-items-center justify-content-between"><span>Monday - Friday</span> <span>09 AM - 19 PM</span></li>
<li class="d-flex align-items-center justify-content-between"><span>Saturday</span> <span>09 AM - 14 PM</span></li>
<li class="d-flex align-items-center justify-content-between"><span>Sunday</span> <span>Closed</span></li>
</ul>
</div>
<!-- Address -->
<div class="address">
<h6><img src="img/icons/phone-call.png" alt=""> +45 677 8993000 223</h6>
<h6><img src="img/icons/envelope.png" alt=""> [email protected]</h6>
<h6><img src="img/icons/location.png" alt=""> Main Str. no 45-46, b3, 56832, Los Angeles, CA</h6>
</div>
</div>
</div>
<!-- Single Footer Widget -->
<div class="col-12 col-sm-6 col-xl-3">
<div class="footer-widget-area mb-100">
<!-- Widget Title -->
<div class="widget-title">
<h6>Useful Links</h6>
</div>
<!-- Nav -->
<ul class="useful-links-nav d-flex align-items-center">
<li><a href="#">Home</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Properties</a></li>
<li><a href="#">Listings</a></li>
<li><a href="#">Testimonials</a></li>
<li><a href="#">Properties</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Testimonials</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Elements</a></li>
<li><a href="#">FAQ</a></li>
</ul>
</div>
</div>
<!-- Single Footer Widget -->
<div class="col-12 col-sm-6 col-xl-3">
<div class="footer-widget-area mb-100">
<!-- Widget Title -->
<div class="widget-title">
<h6>Featured Properties</h6>
</div>
<!-- Featured Properties Slides -->
<div class="featured-properties-slides owl-carousel">
<!-- Single Slide -->
<div class="single-featured-properties-slide">
<a href="#"><img src="img/bg-img/fea-product.jpg" alt=""></a>
</div>
<!-- Single Slide -->
<div class="single-featured-properties-slide">
<a href="#"><img src="img/bg-img/fea-product.jpg" alt=""></a>
</div>
<!-- Single Slide -->
<div class="single-featured-properties-slide">
<a href="#"><img src="img/bg-img/fea-product.jpg" alt=""></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Copywrite Text -->
<div class="copywrite-text d-flex align-items-center justify-content-center">
<p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
</div>
</footer>
<!-- ##### Footer Area End ##### -->
<!-- jQuery (Necessary for All JavaScript Plugins) -->
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<!-- Popper js -->
<script src="js/popper.min.js"></script>
<!-- Bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<!-- Plugins js -->
<script src="js/plugins.js"></script>
<script src="js/classy-nav.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<!-- Active js -->
<script src="js/active.js"></script>
<!-- Google Maps -->
<!--<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCYx6AF7Lmdhdzd4rtUzQKqUdpBWHI1GF8"></script> -->
<script src="js/map-active.js"></script>
</body>
</html>