-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-list_sale.php
476 lines (433 loc) · 14.1 KB
/
single-list_sale.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
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
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<!DOCTYPE html>
<html lang="en">
<head>
<title>PropWave</title>
<meta charset="UTF-8">
<meta name="description" content="LERAMIZ Landing Page Template">
<meta name="keywords" content="LERAMIZ, unica, creative, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link href="img/favicon.ico" rel="shortcut icon"/>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<!-- Stylesheets -->
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/font-awesome.min.css"/>
<link rel="stylesheet" href="css/animate.css"/>
<link rel="stylesheet" href="css/owl.carousel.css"/>
<link rel="stylesheet" href="css/magnific-popup.css"/>
<link rel="stylesheet" href="css/style.css"/>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body,html {
height: 100%;
}
body {
padding-top: 50px;
}
#myBtn{
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
border: none;
outline: none;
background-color: green;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 10px;
}
#myBtn:hover {
background-color: darkgreen;
color: white;
}
.bg-4{
background-color: #2f2f2f;
color: #ffffff;
}
footer{
display: block;
}
</style>
</head>
<body>
<!-- Page Preloder -->
<div id="preloder">
<div class="loader"></div>
</div>
<!-- Header section -->
<header class="header-section">
<div class="header-top">
<div class="container">
<div class="row">
<div class="col-lg-6 header-top-left">
</div>
<div class="col-lg-6 text-lg-right header-top-right">
<div class="top-social">
<a href=""><i class="fa fa-facebook"></i></a>
<a href=""><i class="fa fa-twitter"></i></a>
<a href=""><i class="fa fa-instagram"></i></a>
<a href=""><i class="fa fa-pinterest"></i></a>
<a href=""><i class="fa fa-linkedin"></i></a>
</div>
<div class="user-panel">
<a href="logout.php"><?php session_start(); echo $_SESSION['username']." ";?><i class="fa fa-sign-in"></i> Logout</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12">
<div class="site-navbar">
<a href="#" class="site-logo"><img src="img/logo1.png" alt=""></a>
<div class="nav-switch">
<i class="fa fa-bars"></i>
</div>
<ul class="main-menu">
<?php
if($_SESSION['type']=='builder')
{
echo "<li><a href='builderHome.php'>Home</a></li>";
}
else
{
echo "<li><a href='normalHomeSale.php'>Home</a></li>";
}
?>
<?php
if($_SESSION['type']=='builder')
{
echo "<li><a href='builderHome.php'>FOR SALE</a></li>";
}
else
{
echo "<li><a href='normalHomeSale.php'>FOR SALE</a></li>";
}
?>
<?php if($_SESSION['type']=='builder')
{
echo "<li><a href='builderHome.php'>FOR RENT</a></li>";
}
else
{
echo "<li><a href='normalHomeSale.php'>FOR RENT</a></li>";
}
?>
<li><a href="PackersAndMovers.php">Packers And Movers</a></li>
<li><a href="questions_builder.php">Questions</a></li>
</ul>
</div>
</div>
</div>
</div>
</header>
<!-- Header section end -->
<!-- Page top section -->
<section class="page-top-section set-bg" data-setbg="img/page-top-bg.jpg">
<div class="container text-white">
<h2>SINGLE LISTING</h2>
</div>
</section>
<!-- Page top end -->
<!-- Breadcrumb -->
<div class="site-breadcrumb">
<div class="container">
<a href=""><i class="fa fa-home"></i>Home</a>
<span><i class="fa fa-angle-right"></i>Single Listing</span>
</div>
</div>
<?php
include('indexDB.php');
$x=$_GET["id"];
$sql = "SELECT * FROM flat natural join sale where flat_id=$x";
$result = $conn->query($sql);
$row = mysqli_fetch_assoc($result);
$q='';$a;
if($_SESSION['type']=='normal')
{
$a=1;
$q="select name,surname from login where uid=".$row['uid']."";
}
else
{
$a=2;
$q="select nameorg from login_builder where bid=".$row['bid']."";
}
$a="SELECT totalcost FROM SALE where flat_id=$x";
$r1 = $conn->query($a);
$r2 = mysqli_fetch_assoc($r1);
$_SESSION["amt"]=$r2['totalcost'];
$b="SELECT name from login where UID=(SELECT uid from flat where flat_id=$x)";
$r4=$conn->query($b);
$r5= mysqli_fetch_assoc($r4);
$_SESSION["buyer"]=$r5['name'];
$_SESSION["flat_id"]=$x;
?>
<!-- Page -->
<section class="page-section">
<div class="container">
<div class="row">
<div class="col-lg-8 single-list-page">
<div class="single-list-slider owl-carousel" id="sl-slider">
<div class="sl-item set-bg" data-setbg="<?php echo $row['image'] ?>"></div>
<div class="sl-item set-bg" data-setbg="<?php echo $row['image1'] ?>"></div>
<div class="sl-item set-bg" data-setbg="<?php echo $row['image2'] ?>"></div>
<div class="sl-item set-bg" data-setbg="<?php echo $row['image3'] ?>"></div>
</div>
<div class="owl-carousel sl-thumb-slider" id="sl-slider-thumb">
<div class="sl-thumb set-bg" data-setbg="<?php echo $row['image'] ?>"></div>
<div class="sl-thumb set-bg" data-setbg="<?php echo $row['image1'] ?>"></div>
<div class="sl-thumb set-bg" data-setbg="<?php echo $row['image2'] ?>"></div>
<div class="sl-thumb set-bg" data-setbg="<?php echo $row['image3'] ?>"></div>
</div>
<div class="single-list-content">
<div class="row">
<div class="col-xl-8 sl-title">
<h2><?php echo $row['location'] ?></h2>
<p><i class="fa fa-map-marker"></i><?php echo $row['city'] ?></p>
</div>
<div class="col-xl-4">
<a href="payment.php" class="price-btn"><?php echo "Rs. ".$row['totalcost']."/-" ?></a>
</div>
</div>
<h3 class="sl-sp-title">Property Details</h3>
<div class="row property-details-list">
<div class="col-md-4 col-sm-6">
<p><i class="fa fa-th-large"></i><?php echo "Area: ".$row['area']." sqft" ?></p>
</div>
<div class="col-md-4 col-sm-6">
<p><i class="fa fa-th-large"></i><?php echo "Rate: ".$row['rate']." per sqft"?></p>
</div>
</div>
<h3 class="sl-sp-title">Description</h3>
<div class="description">
<p><?php echo $row['description'] ?></p>
</div>
<h3 class="sl-sp-title">Property Amenities</h3>
<div class="row property-details-list">
<div class="col-md-12 col-sm-6">
<p><i class="fa fa-check-circle-o"></i><?php echo $row['amenities'] ?></p>
</div>
</div>
<h3 class="sl-sp-title bd-no">Floorplan</h3>
<div id="accordion" class="plan-accordion">
<div class="panel">
<div class="panel-header" id="headingOne">
<button class="panel-link" data-toggle="collapse" data-target="#collapse3" aria-expanded="flase" aria-controls="collapse3"><span><?php echo $row['area']." sqft"; ?></span> <i class="fa fa-angle-down"></i>
</button>
</div>
<div id="collapse3" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
<div class="panel-body">
<img src="img/plan-sketch.jpg" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include('indexDB.php');
$x=$_GET["id"];
$sql1="SELECT * FROM flat natural join sale where flat_id=$x";
$result1 = $conn->query($sql1);
$row1 = mysqli_fetch_assoc($result1);
$b=0;$q1='';
if($row1['bid']==NULL)
{
if($row1['uid']!=NULL)
{
$y=$row1['uid'];
//echo "UID".$row1['uid'];
// echo $y;
$b=1;
//echo $b;
}
}
if($row1['uid']==NULL)
{
if($row1['bid']!=NULL)
{
$y=$row1['bid'];
//echo "BID".$row1['bid'];
//echo $y;
$b=2;
//echo $b;
}
}
if($b==1)
{
$q1="select * from login where UID=".$row1['uid']."";
$_SESSION["save"] =$row1['uid'] ;
}
else if($b==2)
{
$q1="select * from login_builder where BID=".$row['bid']."";
$_SESSION["save"] =$row1['bid'] ;
}
$res1=$conn->query($q1);
$r1= mysqli_fetch_assoc($res1);
?>
<div class="col-lg-4 col-md-7 sidebar">
<div class="author-card">
<div class="author-img set-bg" data-setbg="img/author.jpg"></div>
<div class="author-info">
<h5><?php if($b==1){echo $r1['name']." ".$r1['surname'];} else {echo $r1['nameorg'];} ?></h5>
<p><?php if($b==1){echo "Normal User";} else {echo "Builder";} ?></p>
</div>
<div class="author-contact">
<p><i class="fa fa-phone"></i><?php if($b==1){echo $r1['phone'];} else {echo $r1['phoneno'];} ?></p>
<p><i class="fa fa-envelope"></i><?php if($b==1){echo $r1['email'];} else {echo $r1['emailid'];} ?></p>
</div>
</div>
<div class="contact-form-card">
<h5>Do you have any question?</h5>
<form id="form" method="post">
<input type="text" name="name" placeholder="Your name">
<input type="text" name="email" placeholder="Your email">
<textarea name="question"placeholder="Your question"></textarea>
<button name="send">SEND</button>
</form>
<?php
include('indexDB.php');
if(isset($_POST['name']))
{
$name=$_POST['name'];
}
if(isset($_POST['email']))
{
$email=$_POST['email'];
}
if(isset($_POST['question']))
{
$question=$_POST['question'];
}
$id='';
$c;
if($_SESSION['type']=='normal')
{
$c=1;
$id=$row1['uid'];
}
else
{
$c=2;
$id=$row1['bid'];
}
if($c==1)
{
if(isset($_POST['send']))
{
$q1="insert into feedbackuser(val,name,email,question) values(".$_SESSION['id'].",'$name','$email','$question')";
}
$result1 = $conn->query($q1);
}
else
{
if(isset($_POST['send']))
{
$q1="insert into feedbackbuilder(val,name,email,question) values(".$_SESSION['id'].",'$name','$email','$question')";
}
$result1 = $conn->query($q1);
}
?>
</div>
</div>
</section>
<!-- Page end -->
<!-- Clients section -->
<div class="clients-section">
<div class="container">
<div class="clients-slider owl-carousel">
<a href="#">
<img src="img/partner/1.png" alt="">
</a>
<a href="#">
<img src="img/partner/2.png" alt="">
</a>
<a href="#">
<img src="img/partner/3.png" alt="">
</a>
<a href="#">
<img src="img/partner/4.png" alt="">
</a>
<a href="#">
<img src="img/partner/5.png" alt="">
</a>
</div>
</div>
</div>
<!-- Clients section end -->
<!-- Footer section -->
<footer class="footer-section set-bg" data-setbg="img/footer-bg.jpg">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 footer-widget">
<img src="img/logo1.png" alt="">
<p>We provide you with the best services which is best for your family and which suits your pocket.</p>
<div class="social">
<a href="https://www.facebook.com/"><i class="fa fa-facebook"></i></a>
<a href="https://www.twitter.com/"><i class="fa fa-twitter"></i></a>
<a href="https://www.instagram.com/"><i class="fa fa-instagram"></i></a>
<a href="https://www.pinterest.com/"><i class="fa fa-pinterest"></i></a>
</div>
</div>
<div class="col-lg-3 col-md-6 footer-widget">
<div class="contact-widget">
<h5 class="fw-title">CONTACT US</h5>
<p><i class="fa fa-map-marker"></i>You can contact us here...... </p>
<p><i class="fa fa-phone"></i>Number</p>
<p><i class="fa fa-envelope"></i>[email protected]</p>
<p><i class="fa fa-clock-o"></i>Mon - Sat, 08 AM - 06 PM</p>
</div>
</div>
<div class="col-lg-3 col-md-6 footer-widget">
<div class="double-menu-widget">
<h5 class="fw-title">POPULAR PLACES</h5>
<ul>
<li><a href="">Mumbai</a></li>
<li><a href="">Delhi</a></li>
<li><a href="">Chennai</a></li>
<li><a href="">Kolkata</a></li>
<li><a href="">Banglore</a></li>
</ul>
<ul>
<li><a href="">Chandigarh</a></li>
<li><a href="">Pune</a></li>
<li><a href="">Jaipur</a></li>
<li><a href="">Kochi</a></li>
<li><a href="">Ooty</a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6 footer-widget">
<div class="newslatter-widget">
<h5 class="fw-title">NEWSLETTER</h5>
<p>Subscribe your email to get the latest news and new offer also discount</p>
<form class="footer-newslatter-form">
<input type="text" placeholder="Email address">
<button><i class="fa fa-send"></i></button>
</form>
</div>
</div>
</div>
</div>
</footer> <!-- Footer section end -->
<!--====== Javascripts & Jquery ======-->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/masonry.pkgd.min.js"></script>
<script src="js/magnific-popup.min.js"></script>
<script src="js/main.js"></script>
<!-- load for map -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB0YyDTa0qqOjIerob2VTIwo_XVMhrruxo"></script>
<script src="js/map-2.js"></script>
</body>
</html>