-
Notifications
You must be signed in to change notification settings - Fork 4
/
favorited-properties.html
389 lines (349 loc) · 17.3 KB
/
favorited-properties.html
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Dream Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- External CSS libraries -->
<link type="text/css" rel="stylesheet" href="assets/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="assets/css/magnific-popup.css">
<link type="text/css" rel="stylesheet" href="assets/css/jquery.selectBox.css">
<link type="text/css" rel="stylesheet" href="assets/css/dropzone.css">
<link type="text/css" rel="stylesheet" href="assets/css/rangeslider.css">
<link type="text/css" rel="stylesheet" href="assets/css/animate.min.css">
<link type="text/css" rel="stylesheet" href="assets/css/leaflet.css">
<link type="text/css" rel="stylesheet" href="assets/css/slick.css">
<link type="text/css" rel="stylesheet" href="assets/css/slick-theme.css">
<link type="text/css" rel="stylesheet" href="assets/css/slick-theme.css">
<link type="text/css" rel="stylesheet" href="assets/css/map.css">
<link type="text/css" rel="stylesheet" href="assets/css/jquery.mCustomScrollbar.css">
<link type="text/css" rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="assets/fonts/flaticon/font/flaticon.css">
<!-- Favicon icon -->
<link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon" >
<!-- Custom Stylesheet -->
<link type="text/css" rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" type="text/css" id="style_sheet" href="assets/css/skins/default.css">
</head>
<body id="top">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PDTWJ3Z"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="page_loader"></div>
<!-- main header start -->
<header class="main-header sticky-header" id="main-header-2">
<div class="container">
<div class="row">
<div class="col-12">
<nav class="navbar navbar-expand-lg navbar-light rounded">
<a class="navbar-brand logo navbar-brand d-flex w-50 mr-auto" href="index.html">
<img src="assets/img/logos/black-logo.png" alt="logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="fa fa-bars"></span>
</button>
<div class="navbar-collapse collapse w-100" id="navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Properties
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="properties-list-rightside.html">List view</a></li>
<li><a class="dropdown-item" href="coming-soon.html">Map view</a></li>
<li><a class="dropdown-item" href="properties-comparison.html">Compare</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="blog-columns-3col.html" id="navbarDropdownMenuLink5" aria-haspopup="true" aria-expanded="false">
News
</a>
</li>
<li class="nav-item dropdown megamenu-li">
<a class="nav-link " href="faq-1.html" id="dropdown01" aria-haspopup="true" aria-expanded="false">FAQ</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link " href="about-2.html" id="navbarDropdown3" role="button" aria-haspopup="true" aria-expanded="false">
About
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link " href="contact-2.html" id="navbarDropdown3" role="button" aria-haspopup="true" aria-expanded="false">
Contact
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="login.html" id="logincheck" role="button" aria-haspopup="true" aria-expanded="false">
Log in
</a>
</li>
<li class="nav-item dropdown">
<a class="open-offcanvas nav-link" href="#">
<span></span>
<span class="fa fa-bars"></span>
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</header>
<!-- main header end -->
<!-- Sub banner start -->
<div class="sub-banner overview-bgi">
<div class="container">
<div class="breadcrumb-area">
<h1>Favorited Properties</h1>
<ul class="breadcrumbs">
<li><a href="index.html">Home</a></li>
<li class="active">Favorited Properties</li>
</ul>
</div>
</div>
</div>
<!-- Sub banner end -->
<!-- User page start -->
<div class="user-page content-area-2">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="user-profile-box mrb">
<!--header -->
<div class="header clearfix">
</div>
<!-- Detail -->
<div class="detail clearfix">
<ul>
<li>
<a href="user-profile.html">
<i class="flaticon-user"></i>Profile
</a>
</li>
<li>
<a href="my-properties.html">
<i class="flaticon-house"></i>My Properties
</a>
</li>
<li>
<a href="favorited-properties.html" class="active">
<i class="flaticon-heart-shape-outline"></i>Favorited Properties
</a>
</li>
<li>
<a href="submit-property.html">
<i class="flaticon-add"></i>Submit New Property
</a>
</li>
<li>
<a href="change-password.html">
<i class="flaticon-locked-padlock"></i>Change Password
</a>
</li>
<li>
<a href="index.html" onclick="logout()">
<i class="flaticon-logout"></i>Log Out
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-8 col-md-12 col-sm-12">
<div class="my-properties">
<table class="table">
<thead>
<tr>
<th>Property</th>
<th></th>
<th class="hdn">Date Added</th>
<th class="hdn">Views</th>
</tr>
</thead>
<tbody id="contain">
<tr class="prop_row" id="prop" style="visibility:hidden">
<td class="image">
<img alt="my-properties-3" src="assets/img/my-properties-3.jpg" class="img-fluid">
</td>
<td>
<div class="inner">
<h2 id="property">Modern Family Home</h2>
<figure><i id="location" class="flaticon-facebook-placeholder-for-locate-places-on-maps"></i></figure>
<div id="price" class="tag price"> 27,000</div>
</div>
</td>
<td class="hdn">14.02.2018</td>
<td id="views" class="hdn">421</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- User page end -->
<!-- Footer start -->
<footer class="footer">
<div class="container footer-inner">
<div class="row">
<div class="col-xl-3 col-lg-3 col-md-6 col-sm-6">
</div>
<div class="col-xl-2 col-lg-2 col-md-6 col-sm-6">
<div class="footer-item">
<h4>
Useful Links
</h4>
<ul class="links">
<li>
<a href="about-2.html"><i class="fa fa-angle-right"></i>About us</a>
</li>
<li>
<a href="properties-list-rightside.html"><i class="fa fa-angle-right"></i>Properties Listing</a>
</li>
<li>
<a href="contact-2.html"><i class="fa fa-angle-right"></i>Contact Us</a>
</li>
<li>
<a href="blog-columns-3col.html"><i class="fa fa-angle-right"></i>News</a>
</li>
</ul>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6">
<div class="footer-item">
<h4>Contact Us</h4>
<ul class="contact-info">
<li>
Address: DA-IICT, Near Reliance Chowkdi, Gandhinagar, Gujarat 382007
</li>
<li>
Email: <a href="mailto:[email protected]">[email protected]</a>
</li>
<li>
Phone: <a href="tel:+917874788021">+91 78747 88021</a>
</li>
</ul>
<ul class="social-list clearfix">
<li><a href="#" class="facebook"><i class="fa fa-facebook"></i></a></li>
<li><a href="#" class="twitter"><i class="fa fa-twitter"></i></a></li>
<li><a href="#" class="google"><i class="fa fa-google-plus"></i></a></li>
<li><a href="#" class="rss"><i class="fa fa-rss"></i></a></li>
<li><a href="#" class="linkedin"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<!-- Footer end -->
<!-- Off-canvas sidebar -->
<div class="off-canvas-sidebar">
<div class="off-canvas-sidebar-wrapper">
<div class="off-canvas-header">
<a class="close-offcanvas" href="#"><span class="fa fa-times"></span></a>
</div>
<div class="off-canvas-content">
<aside class="canvas-widget">
<div class="logo-sitebar text-center">
<img src="assets/img/logos/logo.png" alt="logo">
</div>
</aside>
<aside class="canvas-widget">
<ul class="menu">
<li class="menu-item menu-item-has-children"><a href="index.html">Home</a></li>
<li class="menu-item"><a href="properties-list-rightside.html">Properties List</a></li>
<li class="menu-item"><a href="blog-columns-3col.html">Blog</a></li>
<li class="menu-item"><a href="about-2.html">About Us</a></li>
<li class="menu-item"><a href="contact-2.html">Contact Us</a></li>
</ul>
</aside>
<aside class="canvas-widget">
<ul class="social-icons">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-google-plus"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
<li><a href="#"><i class="fa fa-vk"></i></a></li>
</ul>
</aside>
</div>
</div>
</div>
<!-- External JS libraries -->
<script src="assets/js/jquery-2.2.0.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.selectBox.js"></script>
<script src="assets/js/rangeslider.js"></script>
<script src="assets/js/jquery.magnific-popup.min.js"></script>
<script src="assets/js/jquery.filterizr.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/backstretch.js"></script>
<script src="assets/js/jquery.countdown.js"></script>
<script src="assets/js/jquery.scrollUp.js"></script>
<script src="assets/js/particles.min.js"></script>
<script src="assets/js/typed.min.js"></script>
<script src="assets/js/dropzone.js"></script>
<script src="assets/js/jquery.mb.YTPlayer.js"></script>
<script src="assets/js/leaflet.js"></script>
<script src="assets/js/leaflet-providers.js"></script>
<script src="assets/js/leaflet.markercluster.js"></script>
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/maps.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB0N5pbJN10Y1oYFRd0MJ_v2g8W2QT74JE"></script>
<script src="assets/js/ie-emulation-modes-warning.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.9.2/firebase.js"></script>
<script src="assets/js/initilize.js"></script>
<script src="assets/js/userdetails.js"></script>
<!-- Custom JS Script -->
<script src="assets/js/app.js"></script>
<script>
$('document').ready(function(){
if(loggedin())
{
console.log(getuserdetails());
$("#logincheck").attr('href',"user-profile.html");
$("#logincheck").text("Profile");
}
else
{
console.log("redirect");
setTimeout(function(){
location.href = "login.html";
},100);
}
// read user details
var userdet = firebase.database().ref("users/" + getuserdetails() + "/favorites/");
let iterator = 0;
userdet.on("value", function(data) {
let val = data.val();
for(x in val)
{
console.log(data.numChildren());
console.log(val[x])
let propdet = firebase.database().ref("properties/" + val[x] )
propdet.on("value", function(propdata) {
let property = propdata.val();
console.log(property)
let view = Math.floor(Math.random() * 70) + 2;
document.getElementById("prop").style.visibility = "visible";
document.getElementById("property").innerText = property.name;
document.getElementById("price").innerText = "$ "+property.price;
document.getElementById("location").innerText = property.city;
document.getElementById("views").innerHTML = view;
iterator += 1;
if(iterator== data.numChildren())
{return;}
$clone = $('#prop').clone();
$clone.attr("id",val[x]);
$clone.insertAfter('#prop');
});
}
});
});
</script>
</body>
</html>