-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser_properties.php
174 lines (149 loc) · 6.09 KB
/
user_properties.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
<?php include('include/connect.php');
include('include/session.php');
include('function.php');
include('formatMoney.php');
$page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]);
$limit = 4;
$startpoint = ($page * $limit) - $limit;
//to make pagination
$statement = "`tb_properties`";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon">
<title>JERSEY DEVELOPERS LTD.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Less styles
<link rel="stylesheet/less" type="text/css" href="less/bootsshop.less">
<script src="less.js" type="text/javascript"></script>
-->
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet"/>
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"/>
<link href="assets/css/docs.css" rel="stylesheet"/>
<link href="assets/style.css" rel="stylesheet"/>
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
body {
background-image: url("background1.JPG");
background-repeat: no-repeat;
}
</style>
<!-- Le fav and touch icons -->
</head>
<body >
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a id="logoM" href="user_index.php"><img src="" alt=""/></a>
<a data-target="#sidebar" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse">
<ul class="nav">
<li class=""><a href="user_index.php"><i class="icon-home icon-large"></i> Home</a></li>
<li class="active"><a href="user_properties.php"><i class=" icon-th-large icon-large"></i> Properties</a></li>
<li class=""><a href="user_contact.php"><i class="icon-signal"></i> Contact Us</a></li>
<li class=""><a href="user_aboutus.php"><i class="icon-flag"></i> About Us</a></li>
<li class=""><a href="user_purchase.php"><i class="icon-shopping-cart"></i> Paid/Pending</a></li>
<li class=""><a href="Email.php"><i class="icon-envelope"></i> Email</a></li>
</ul>
<ul class="nav pull-right">
<li>
<a href="user_account2.php"><?php $query = mysql_query("select * from customers where CustomerID='$ses_id'") or die(mysql_error());
$row = mysql_fetch_array($query);
$id = $row['CustomerID']; ?> <b>Welcome! </b> <?php echo $row['Firstname'];?> <?php echo $row['Lastname'];?> <span class="badge badge-info"> <?Php include('announce.php');?></span></a>
</li>
<li>
<a href="logout.php"><i class="icon-off"></i> Log Out</a>
</li>
</ul>
</div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div>
<!-- ======================================================================================================================== -->
<div id="mainBody" class="container">
<div class="thumbnail">
<?php include ('user_header.php'); ?>
</div>
<!-- ==================================================Header End====================================================================== -->
<font color="white"><h3> Properties For Sale </h3>
<form method="post">
<div>
<Center>
<input type="image" title="Search" src="assets/img/search.png" name="submit" alt="Search"/>
<input type="text" name="search" placeholder="Search for...">
</Center>
<br /></div>
</form>
<form method="POST">
<hr class="soft"/>
<div class="tab-pane active" id="blockView">
<ul class="thumbnails">
<?php
$key="";
if(isset($_POST['search']))
$key=$_POST['search'];
if($key !="")
$sql_sel=mysql_query("SElECT * FROM tb_properties WHERE name like '%$key%' or price like '%$key%'");
else if($key !="" )
$sql_sel=mysql_query("SElECT * FROM tb_properties WHERE unit like '%$key%'");
else
$sql_sel=mysql_query("SELECT * FROM tb_properties {$statement} LIMIT {$startpoint} , {$limit}")or die(mysql_error());
while($row=mysql_fetch_array($sql_sel)){
$id=$row['propertyID'];
$qty=$row['unit'];
?>
<li class="span3">
<div class="thumbnail">
<?php
if($qty==0){
?>
<span class="sticker-wrapper top-left">
<span style="color:red;"><b>SOLD </b>
<img src="server/ADMIN/SERVER/AS/<?php echo $row['image']; ?>" alt="" style="max-width: 130px; max-height: 98px;"/>
</span></span>
<?php
}else{
?>
<img src="server/ADMIN/SERVER/AS/<?php echo $row['image']; ?>" alt="" style="max-width: 130px; max-height: 98px;"/>
<?php
}
?>
<div class="caption">
<h5><b><?php echo $row['name']; ?></b></h5>
<h4><a class="btn btn-success" title="Click to view!" href="user_property_details.php?id=<?php echo $id;?>"><i class="icon-check"></i> VIEW</a> <span class="pull-right">KES<?php echo formatMoney($row['price'],2); ?></span></h4>
</div>
</div>
</li>
<?php } ?>
</ul>
<hr class="soft"/>
</div>
<center>
<?php
echo pagination($statement,$limit,$page);
?>
</center>
<br class="clr"/>
</font>
<!-- Footer ------------------------------------------------------ -->
<hr class="soft">
<div id="footerSection" class="thumbnail">
<?php include('footer2.php');?>
</div>
</div>
</body>