-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfriends.php
More file actions
161 lines (104 loc) · 4.21 KB
/
Copy pathfriends.php
File metadata and controls
161 lines (104 loc) · 4.21 KB
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
<?php
//Define Page Title
$page_title = "Friends - LetsMeet";
include('includes/header.php');
// TOTAL REQUESTS
$get_req_num = $frnd_obj->request_notification($_SESSION['user_id'], false);
// TOTLA FRIENDS
$get_frnd_num = $frnd_obj->get_all_friends($_SESSION['user_id'], false);
// GET MY($_SESSION['user_id']) ALL FRIENDS
$get_all_friends = $frnd_obj->get_all_friends($_SESSION['user_id'], true);
$get_all_req_sender = $frnd_obj->request_notification($_SESSION['user_id'], true);
?>
<div class="home-banner">
<div class="home-banner-overlay">
<div class="home-banner-content ">
<div>
<h3></h3>
</div>
</div>
</div>
</div>
<div class="container">
<div class="p"></div>
<div class="box-bg">
<h4 class="text-center font-bold pb">
New Friend Requests
</h4>
<div class="break-line mt-2"></div>
<div class="row">
<?php
if($get_req_num > 0) {
foreach ($get_all_req_sender as $request) {
?>
<div class="col-md-3">
<div class="friend-box mt-4">
<div class="push-center">
<?php echo '<img src="storage/profiles/'.$request->user_image.'" width="100px" alt="Profile image">' ; ?>
</div>
<div class="text-center font-bold">
<?php echo $request->username ?>
</div>
<div class="text-center">
<small>wants to be your friend</small>
</div>
<div class="pb"></div>
<div class="pt-2 d-flex justify-content-center">
<?php
echo '<div><a href="./user_profile.php?id=' . $request->sender . '"' . 'class="btn btn-secondary btn-sm">View Profile</a></div>';
?>
</div>
</div>
</div>
<?php
}
echo "</div>";
}
else {
echo '<div class="d-flex justify-content-center" style="width:100%;"><div class="alert alert-danger">You have no friend request!</div>';
}
?>
</div>
</div>
<div class="container mt-4">
<div class="p"></div>
<div class="box-bg">
<h4 class="text-center font-bold pb">
My Friends
</h4>
<div class="break-line mt-2"></div>
<div class="row">
<?php
if($get_frnd_num > 0) {
foreach ($get_all_friends as $row) {
?>
<div class="col-md-3">
<div class="friend-box mt-4">
<div class="push-center">
<?php echo '<img src="storage/profiles/'.$row->user_image.'" width="100px" alt="Profile image">' ; ?>
</div>
<div class="text-center font-bold">
<?php echo $row->username ?>
</div>
<div class="pb"></div>
<div class="break-line mt-2"></div>
<div class="text-center">
<?php echo $row->user_fullname ?>
</div>
<div class="pt-2 d-flex justify-content-center">
<?php
echo '<div><a href="./user_profile.php?id=' . $row->id . '"' . 'class="btn btn-secondary btn-sm">View Profile</a></div>';
?>
</div>
</div>
</div>
<?php
}
echo "</div>";
}
else {
echo '<div class="d-flex justify-content-center" style="width:100%;"><div class="alert alert-danger">You have no friends!</div>';
}
?>
</div>
</div>