-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookedproperty.php
166 lines (160 loc) · 6.81 KB
/
bookedproperty.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
<?php
session_start();
if(!isset($_SESSION['email'])){
header('location:login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>booked property | hrms</title>
<?php include 'links.php'; ?>
<link rel="shortcut icon" href="img/icon.png" type="image/x-icon">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/viewproperty.css">
</head>
<body class="viewproperty-body">
<header>
<!-- navbar section begins -->
<nav class="navbar navbar-expand-md">
<div class="container">
<a
href="index.php"
class="navbar-brand text-dark font-weight-bold"
>CustomCastle</a
>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#collapsenav"
>
<span>
<img
src="img/menuHamburger.svg"
width="35px"
height="35px"
alt="menu-hamberger-icon"
/>
</span>
</button>
<div
class="collapse navbar-collapse text-center"
id="collapsenav"
>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="index.php" class="nav-link text-dark"
>home</a
>
</li>
<!-- <li class="nav-item">
<a
href="#about_us"
class="nav-link text-dark"
>about us</a
>
</li>
<li class="nav-item">
<a
href="#contact_us"
class="nav-link text-dark"
>contact us</a
>
</li>-->
<!-- <li class="nav-item">
<a
href="dashboard.php"
class="nav-link text-dark"
>dashboard </a
>
</li>
<li class="nav-item signup">
<a
href="logout.php"
class="nav-link text-dark"
>logout</a
>
</li> -->
<div class="btn-group">
<button class="btn btn-sm" type="button">
<?php echo $_SESSION['name']; ?>
</button>
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="dashboard.php">dashboard</a>
<a class="dropdown-item" href="logout.php">log out</a>
</div>
</div>
</ul>
</div>
</div>
</nav>
<!-- navbar ends -->
</header>
<section class="viewproperty-container">
<table class="table table-striped table-hover table-bordered">
<thead class="font-weight-bold">
<tr class="text-uppercase">
<td>sl. no.</td>
<td>property name</td>
<td>address</td>
<td>landmark</td>
<td>city</td>
<td>state</td>
<td>pincode</td>
<td>type</td>
<td>rooms</td>
<td colspan="3">Operations</td>
</tr>
</thead>
<tbody>
<?php
include 'connection.php';
if($_SESSION['name']){
$mail = $_SESSION['email'];
$retrive_query = "select * from property where oemail = '$mail' and bstatus = 1 ";
$resultset = mysqli_query($con,$retrive_query);
$rows = mysqli_num_rows($resultset);
$sl = 1;
while($res = mysqli_fetch_array($resultset)){
?>
<tr>
<td><?php echo $sl; ?></td>
<td><?php echo $res['pname']; ?></td>
<td><?php echo $res['locality']; ?></td>
<td><?php echo $res['landmark']; ?></td>
<td><?php echo $res['city']; ?></td>
<td><?php echo $res['state']; ?></td>
<td><?php echo $res['pincode']; ?></td>
<td><?php echo $res['regtype']; ?></td>
<td><?php
if($res['roomcount'] == 'onebhk')
echo "1 BHK";
if($res['roomcount'] == 'twobhk')
echo "2 BHK";
if($res['roomcount'] == 'threebhk')
echo "3 BHK";
?>
</td>
<td><a href="updateproperty.php?id=<?php echo $res['id']; ?>" data-toggle="tooltip" data-placement="right" title="Update"><i class="fa fa-edit text-success" aria-hidden="true"></i></a></td>
<td><a href="deleteproperty.php?id=<?php echo $res['id']; ?>" data-toggle="tooltip" data-placement="left" title="Delete"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></td>
<td><a href="removebooked.php?id=<?php echo $res['id']; ?>" data-toggle="tooltip" data-placement="right" title="cancel booking"><i class="fa fa-sign-out-alt text-warning" aria-hidden="true"></i></a></td>
</tr>
<?php
$sl++;
}
}
?>
</tbody>
</table>
</section>
<?php include 'footer.php'; ?>
<script src="script/viewproperty.js"></script>
</body>
</html>