-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmatchvm.php
275 lines (237 loc) · 9.48 KB
/
matchvm.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
<!DOCTYPE html>
<html>
<head>
<title>
Page
</title>
<style>
body
{
background-attachment: fixed;
}
.box{
margin: 30px;
background-color: #ffffff;
border: 1px solid black;
opacity: 0.8;
}
div.r1 {
padding-left: 200px;
padding-right: 200px;
font-size: 20px;
}
div.pi {
padding-left: 300px;
}
div.tablinks {
background-color:"grey";
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 20px;
}
.tabcontent {
display: none;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
</style>
</head>
<body background="pwofb.jpg">
<?php
session_start();
$con=mysqli_connect('127.0.0.1','root','123456');
if(!$con)
{
echo 'Connection error';
}
if(!mysqli_select_db($con,'project'))
{
echo 'Database not selected';
}
$val=$_POST['vmbtn'];
/*echo "Value of val <br>";
echo $val;*/
$_SESSION['invid']=$val;
$vemail=$_SESSION['lemail'];
$vam=array("one","two","three","four","five","six","seven","eight","nine","ten");
$nam=array("five","six","seven","ate","hgh");
$p=2;
$q=0;
$s="SELECT * FROM pwf WHERE pwfid='$val'";
$trows=mysqli_query($con,$s);
$rrow=mysqli_fetch_assoc($trows);
$flatid=$rrow['pwfflatid'];
?>
<div class="box">
<h1><center>Roommate 1</center></h1>
<center>
<img src="pwfuploads/<?php if($rrow['image'])
echo $rrow['image'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px"><br><br>
</center>
<div id=r1 class=r1>
<fieldset>
<legend>Personal Information</legend>
<div class=pi>
<h2>Name:<?php echo $rrow['fname'] ?> <?php echo $rrow['mname'] ?> <?php echo $rrow['lname'] ?></h2><br>
Contact number : <?php echo $rrow['contact'] ?><br><br>
Sex:<?php echo $rrow['sex'] ?><br><br>
Dob:<?php echo $rrow['ddate'] ?> / <?php echo $rrow['month'] ?> / <?php echo $rrow['year'] ?><br><br>
Caste: <?php echo $rrow['caste'] ?><br><br>
State:<?php echo $rrow['state'] ?><br><br>
City:<?php echo $rrow['city'] ?><br><br>
Occupation:<?php echo $rrow['occupation'] ?><br><br>
</div>
</fieldset>
<br>
<fieldset>
<legend>Habbits, Hobbies and more</legend>
<div class=pi>
Smoking:<?php echo $rrow['smoking'] ?><br><br>
Drinking:<?php echo $rrow['drinking'] ?><br><br>
Does he host parties?:<?php echo $rrow['parties'] ?><br><br>
Visitors:<?php echo $rrow['visitors'] ?><br><br>
Eating Habits:<?php echo $rrow['eat'] ?><br><br>
Food Arrangement:<?php echo $rrow['foodarr'] ?><br><br>
Travelling:<?php echo $rrow['travel'] ?><br><br>
Sleeping Habits:<?php echo $rrow['sleep'] ?><br><br>
Hobbies:<?php echo $rrow['hobbies'] ?><br><br>
</div>
</fieldset>
</div>
<br>
</div>
<?php
$s="SELECT * FROM roommate WHERE rpwfid=(SELECT pwfid FROM pwf WHERE pwfid='$val')";
$trows=mysqli_query($con,$s);
$count=mysqli_num_rows($trows);
// $pq="SELECT * FROM tpwf WHERE pwfid='$val'";
//$pwfres=mysqli_query($con,$pq);
?>
<?php
while($rrow=mysqli_fetch_assoc($trows))
{
?>
<button id=<?php echo $vam[$q]?> class="tablinks" onclick="openCity(event, <?php echo $p?>)" style="background-color: white;float: left; border:none; outline:none; cursor: pointer; padding: 14px 16px; transition: 0.3s; " > Roommate <?php echo $p ?></button>
<div id=<?php echo $p?> class="tabcontent" style="margin-top: 5%;" >
<div class="box">
<h1><center>Roommate <?php echo $p ?></center></h1>
<center>
<img src="pwfuploads/<?php if($rrow['image'])
echo $rrow['image'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px"><br><br>
<!--<h2>Name:<?php echo $rrow['fname'] ?> <?php echo $rrow['mname'] ?> <?php echo $rrow['lname'] ?></h2><br>--></center>
<div id=r1 class=r1>
<fieldset>
<legend>Personal Information</legend>
<div class=pi>
<h2>Name:<?php echo $rrow['fname'] ?> <?php echo $rrow['mname'] ?> <?php echo $rrow['lname'] ?></h2><br>
Sex:<?php echo $rrow['sex'] ?><br><br>
Dob:<?php echo $rrow['ddate'] ?> / <?php echo $rrow['month'] ?> / <?php echo $rrow['year'] ?><br><br>
Caste: <?php echo $rrow['caste'] ?><br><br>
State:<?php echo $rrow['state'] ?><br><br>
City:<?php echo $rrow['city'] ?><br><br>
Occupation:<?php echo $rrow['occupation'] ?><br><br>
</div>
</fieldset>
<br>
<fieldset>
<legend>Habbits, Hobbies and more</legend>
<div class=pi>
Smoking:<?php echo $rrow['smoking'] ?><br><br>
Drinking:<?php echo $rrow['drinking'] ?><br><br>
Does he host parties?:<?php echo $rrow['parties'] ?><br><br>
Visitors:<?php echo $rrow['visitors'] ?><br><br>
Eating Habits:<?php echo $rrow['eat'] ?><br><br>
Food Arrangement:<?php echo $rrow['foodarr'] ?><br><br>
Travelling:<?php echo $rrow['travel'] ?><br><br>
Sleeping Habits:<?php echo $rrow['sleep'] ?><br><br>
Hobbies:<?php echo $rrow['hobbies'] ?><br><br>
</div>
</fieldset>
</div>
<br>
</div>
</div>
<?php
echo $p;
$p=$p+1;
$q=$q+1;
}
?>
<?php
$sql="SELECT * FROM flat WHERE fid=(SELECT pwfflatid FROM pwf WHERE pwfid='$val')";
$r=mysqli_query($con,$sql);
$row=mysqli_fetch_assoc($r);
?>
<div class="box">
<h1><center>FLAT</center></h1>
<center>
<img src="flatuploads/<?php if($row['image1'])
echo $row['image1'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px">
<img src="flatuploads/<?php if($row['image2'])
echo $row['image2'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px">
<img src="flatuploads/<?php if($row['image3'])
echo $row['image3'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px">
<img src="flatuploads/<?php if($row['image4'])
echo $row['image4'];
else
echo "default.png"; ?>" style="width: 200px;height: 200px"><br><br>
</center>
<div id=r1 class=r1>
<fieldset>
<legend>Personal Information</legend>
<div class=pi>
Rent:<?php echo $row['rent'] ?><br><br>
Deposit:<?php echo $row['rent'] ?><br><br>
Address:<?php echo $row['flatnum'] ?> ,<?php echo $row['building'] ?>,<?php echo $row['street'] ?>,<br>
              <?php echo $row['area'] ?>,<br>
              <?php echo $row['zip'] ?><br><br>
Size: <?php echo $row['size'] ?><br><br>
Rooms: <?php echo $row['rooms'] ?><br><br>
Is the flat furnished?:<?php echo $row['furnish'] ?><br><br>
AC available?:<?php echo $row['ac'] ?><br><br>
Electric backup available?:<?php echo $row['eb'] ?><br><br>
Water supply availability?:<?php echo $row['ws'] ?><br><br>
Availability of flat:<?php echo $row['availability'] ?> years<br><br>
Vacancy:<?php echo $row['vacancy'] ?><br><br>
Security:<?php echo $row['security'] ?><br><br>
Parking availability?:<?php echo $row['parking'] ?><br><br>
</div>
</fieldset>
</div>
<br><br>
</div>
<?php
mysqli_close($con);
?>
<script>
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
</body>
</html>