本文整理汇总了PHP中Relation::removeRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Relation::removeRequest方法的具体用法?PHP Relation::removeRequest怎么用?PHP Relation::removeRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relation
的用法示例。
在下文中一共展示了Relation::removeRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$results['relation'] = $Relation->checkRelation($_SESSION['ifitness_id'], $results['id']);
$results['relation_t'] = $Relation->checkText($results['relation']);
echo json_encode($results);
break;
case 'friend_request':
$user_1 = $_POST['user_1'];
$user_2 = $_POST['user_2'];
$info = $Profile->fetchProfile($user_1);
$data = array('user_id' => $user_2, 'other_id' => $user_1, 'person_name' => $info['name'], 'person_lastname' => $info['surname'], 'type' => 1);
echo $Relation->requestFriend($user_1, $user_2);
echo $Relation->createNotification($data);
break;
case 'remove_request':
$user_1 = $_POST['user_1'];
$user_2 = $_POST['user_2'];
echo $Relation->removeRequest($user_1, $user_2);
break;
case 'accept_request':
$user_1 = $_POST['user_1'];
$user_2 = $_POST['user_2'];
$info_1 = $Profile->fetchProfile($user_1);
$info_2 = $Profile->fetchProfile($user_2);
echo $Relation->acceptRequest($user_1, $user_2, $info_2['name'], $info_2['surname']);
echo $Relation->acceptRequest($user_2, $user_1, $info_1['name'], $info_1['surname']);
break;
case 'unfriend_person':
$id = $_POST['user_1'];
$other_id = $_POST['user_2'];
echo $Relation->unfriendPerson($id, $other_id);
echo $Relation->unfriendPerson($other_id, $id);
break;