Changed friendship buttons. We now use AJAX, changed button style and added FA icons.
This commit is contained in:
18
website/public/API/getFriendshipStatus.php
Normal file
18
website/public/API/getFriendshipStatus.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
require_once ("../../queries/connect.php");
|
||||
require_once ("../../queries/friendship.php");
|
||||
|
||||
if(empty($_POST["usr"])) {
|
||||
header('HTTP/1.1 500 Non enough arguments');
|
||||
}
|
||||
|
||||
$friendship_status = getFriendshipStatus($_POST["usr"]);
|
||||
|
||||
if($friendship_status == -2) {
|
||||
header('HTTP/1.1 500 Query failed');
|
||||
}
|
||||
|
||||
echo $friendship_status;
|
||||
Reference in New Issue
Block a user