当前位置: 首页>>代码示例>>PHP>>正文


PHP Connect::RemovefromList方法代码示例

本文整理汇总了PHP中Connect::RemovefromList方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::RemovefromList方法的具体用法?PHP Connect::RemovefromList怎么用?PHP Connect::RemovefromList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Connect的用法示例。


在下文中一共展示了Connect::RemovefromList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

    $token = filter_input(INPUT_POST, 'token');
} else {
    $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 {
开发者ID:96imranahmed,项目名称:Eventory,代码行数:31,代码来源:group_delete.php

示例2: unserialize

 $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) {
             $connection->RemovefromList($connectinfo, 2, $profid, "groups_declined", $groupid);
         }
     }
 } else {
     if ($check == true && $checkdeclined == false && $checkleft == false) {
         //Add on to people declined
         $connection->AddtoList($connectinfo, 2, $profid, "groups_declined", $groupid);
         //Add to profile list of declined group
         $connection->RemoveItemfromList($connectinfo, 1, $profid, "groups_pending", "groupid:" . strval($groupid), "data");
         //Clear "pending" notification
         //(Notify group inviter that a new user has declined group request?)
         CreateNotification(2, $connectinfo, $targetid, $profid, $groupid, FALSE);
     }
开发者ID:96imranahmed,项目名称:Eventory,代码行数:31,代码来源:group_decision.php


注:本文中的Connect::RemovefromList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。