-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfriend.php
41 lines (35 loc) · 1.04 KB
/
friend.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
<?php
require_once("files/main.php");
require_once("files/Classes/friendsClass.php");
require_once("files/Classes/StatusMessage.php");
?>
<div class='container' style='padding-top:10px;'>
<div class='jumbotron'>
<h3 class="text-dark display-3 text-center">Contacts</h3>
<?php
$friendsClass = new FriendsClass($con);
$result= $friendsClass->getAllUserstoFriend($loggedInUserName);
if($result!="")
{
echo $result;
}
else{
echo "<h5 class='text-primary display-5 text-center'>";
echo StatusMessage::$NoContacts;
"</h5>";
}
?>
<?php
if(isset($_POST["friendsButton"])){
$relation = $_POST['relation'];
$person = $_POST['person'];
$resultKey = $friendsClass->makefriends($loggedInUserName,$person, $relation);
}
else if(isset($_POST["blockButton"])){
$relation = $_POST['block'];
$person = $_POST['person'];
$resultKey = $friendsClass->blockfriends($loggedInUserName, $person, $relation);
}
?>
</div>
</div>