-
Notifications
You must be signed in to change notification settings - Fork 0
/
att-connect.php
110 lines (94 loc) · 3.62 KB
/
att-connect.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
<?php
include('att-id.php');
if(!isLoggedIn()){
header('location:login.php');
}
?>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
Connect
</title>
<link rel="stylesheet" href="connect.css">
</head>
<body>
<div class = "wrapper" style="padding-bottom: 50px">
<a href=""><div class="button" style="text-decoration: underline">Join Our Community</div></a>
<br>
<div class="sections">
<ul>
<a href="restaurants.php"><li class="sidemenu">Restaurants</li></a>
<a href="attractions.php"><li class="sidemenu">Attractions</li></a>
<a href="events.php"><li class="sidemenu">Events</li></a>
<a href=""><li class="sidemenu">Convenience Stores</li></a>
<a href=""><li class="sidemenu">Hotels</li></a>
<br>
<a href=""><li class="sidemenu">Schools</li></a>
<a href=""><li class="sidemenu">Hospitals</li></a>
<a href=""><li class="sidemenu">Personal Care</li></a>
<a href=""><li class="sidemenu">Leisure</li></a>
</ul>
</div>
<div class="data">
<?php
$user_id = $_SESSION['user']['id'];
$search = "SELECT Name FROM attractions WHERE ID='$id'";
$ssql = mysqli_query($db, $search);
while($sresult=mysqli_fetch_assoc($ssql)){
?>
<div class="title">
<?php
echo $sresult['Name'];
?>
</div>
<?php
}
$query = "SELECT * FROM att WHERE user_id='$user_id' AND event_id='$id' AND comment IS NULL";
$sql0 = mysqli_query($db, $query);
if(mysqli_num_rows($sql0)==0){
$insert = "INSERT INTO att (event_id, user_id) VALUES ('$id', '$user_id')";
$sql = mysqli_query($db, $insert);
}
$query1 = "SELECT * FROM att WHERE event_id='$id' AND comment IS NULL";
$sql1 = mysqli_query($db, $query1);
while($result = mysqli_fetch_assoc($sql1)){
$user_id = $result['user_id'];
$query2 = "SELECT * FROM user WHERE id='$user_id'";
$sql2 = mysqli_query($db, $query2);
?>
<div class="temp">
<?php
while($result1 = mysqli_fetch_assoc($sql2)){
if($result1['username']!=$_SESSION['user']['username']){
?>
<div class="info-user">
<?php
echo $result1['username'];
?>
<br>
<br>
<input type="button" name="view" class="butt friend" value="Add" id="<?php echo $result1["id"]; ?>">
</div>
<br>
<?php
}
}
?>
</div>
<?php
}
?>
</div>
<div class="push"></div>
</div>
<div class="foot">
Created With Love By:
<br>
Anushree Jana;
Shreya Sawant;
Akash Munjial
</div>
</body>
</html>