本文整理匯總了PHP中Connect::RemoveItemfromList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connect::RemoveItemfromList方法的具體用法?PHP Connect::RemoveItemfromList怎麽用?PHP Connect::RemoveItemfromList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Connect
的用法示例。
在下文中一共展示了Connect::RemoveItemfromList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: explode
$safe = false;
}
if ($safe) {
$authenticated = $connection->Verify($connectinfo, $profid, $token);
if ($authenticated) {
$row = $connection->GetRow($connectinfo, 0, $groupid);
$admin = $row["starter"];
$invitedlist = $row["people_requested"];
if ($admin == $profid) {
$invitedarray = explode(";", $invitedlist);
if (is_array($invitedarray) || is_object($invitedarray)) {
foreach ($invitedarray as $invitee) {
//Delete all traces of the group brah!
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_accepted", $groupid);
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_declined", $groupid);
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_left", $groupid);
$connection->RemoveItemfromList($connectinfo, 1, $invitee, "groups_pending", "groupid:" . strval($groupid), "data");
$connection->RemoveItemfromList($connectinfo, 1, $invitee, "groups_decision", "groupid:" . strval($groupid), "data");
}
}
$sql = $connectinfo->prepare("DELETE FROM Groups WHERE id = :groupid");
$sql->execute(array(':groupid' => $groupid));
} else {
echo "Error - non-admin cannot delete group!";
}
} else {
echo "Error - authorization mismatch";
}
} else {
echo 'Error - invalid supplied post data (not enough info?)';
}
示例2: unserialize
$token = filter_input(INPUT_POST, 'token');
} else {
$safe = false;
}
if ($safe) {
$authenticated = $connection->Verify($connectinfo, $profid, $token);
if ($authenticated) {
//Do only if user has notification
$check = $connection->ListCheck($connectinfo, 1, $profid, "groups_pending", $groupid);
$checkdeclined = $connection->ListCheck($connectinfo, 2, $profid, "groups_declined", $groupid);
$checkleft = $connection->ListCheck($connectinfo, 2, $profid, "groups_left", $groupid);
if ($check == true || $checkdeclined == true || $checkleft == true) {
$targetvalues = $connection->GetValue($connectinfo, 0, $groupid, "people_added");
$targetvaluesarray = unserialize($targetvalues);
$targetid = ReturnTargetID($targetvaluesarray, $profid);
$connection->RemoveItemfromList($connectinfo, 1, $profid, "groups_pending", "groupid:" . strval($groupid), "data");
if ($accepted) {
//Add on to people accepted
$connection->AddtoList($connectinfo, 0, $groupid, "people_accepted", $profid);
//Add to group list of accepted friends
$connection->AddtoList($connectinfo, 2, $profid, "groups_accepted", $groupid);
//Add to profile list of accepted groups
//(Notify group inviter that a new user has accepted group request?
if ($checkdeclined == false && $checkleft == false) {
CreateNotification(2, $connectinfo, $targetid, $profid, $groupid, TRUE);
} else {
//Remove from list of left groups
if ($checkleft) {
$connection->RemovefromList($connectinfo, 2, $profid, "groups_left", $groupid);
}
if ($checkdeclined) {